[lkml]   [1999]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Some general LINUX questions on compiling and header files
> I've been looking around and haven't been able to find a few things on Linux
> that I was expecting to find.
> 1. Is there a standard preprocessor token you can check for to know that the
> compilation is on Linux? I'm looking for something like the __sun token that
> is predefined by the compiler, so I can put conditional code in a module I
> share amoungst multiple operating systems.

tried looking at what `uname` returns?
[wakko@ani:/] uname

> 2. Where is the <stddef.h> header file required by ANSI C? I looked in
> /usr/include and didn't see it.

[wakko@ani:/] locate stddef

> 4. When compiling a kernel module, what special flags are required? I would
> expect to have to put in '-r -nostdlib' at the very least.

I don't believe you compile them like you do a program. SCIIW, but modules
should be compiled with -c and not linked. Try ldd'ing one of them:

[wakko@ani:/] ldd /lib/modules/2.2.10/block/floppy.o
not a dynamic executable

Sorry I can't help you on #3

Lab tests show that use of micro$oft causes cancer in lab animals

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:53    [W:0.042 / U:23.488 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site