Skip to contentSkip to conversation

config.h

DISCUSSION Chuck Winters 2 participants 2 messages Dec 10, 2002 – Dec 11, 2002

lore
Share & tools
lore
#0 lore raw

Would it be prudent to include the linux/config.h file in a user level program to check for the existence of certain modules? I know there are other ways, like using autoconf, etc. I was just wondering.

Chuck

#1 lore raw
Quoted 4 lines

Would it be prudent to include the linux/config.h file in a user level program to check for the existence of certain modules? I know there are other ways, like using autoconf, etc. I was just wondering.

No, because modules can be dynamically loaded on-the-fly, completely independent of however the kernel is compiled.

Additionally, config.h (actually just an #include for autoconfig.h) is an automatically generated file which varies depending upon how an INDIVIDUAL USER compiles his/her own INDIVIDUAL kernel. There's no way for you to anticipate the contents of config.h in advance. It's better to use other methods.

Use of config.h would be necessary if you were compiling something directly into the kernel.

Joseph Wagner