| #include <assert.h> | /* Override any gcc2 internal prototype to avoid an error. */ | #ifdef __cplusplus | extern "C" | #endif | /* We use char because int might match the return type of a gcc2 | builtin and then its argument prototype would still apply. */ | char mkdir (); | char (*f) (); BTW, I never quite understood this comment. Could someone explain it to me? Does gcc have functions which are `enabled' only when the first prototype it sees is compatible? | int | main () | { | /* The GNU C library defines this for functions which it implements | to always fail with ENOSYS. Some functions are actually named | something starting with __ and the normal name is an alias. */ I'd love details on this comment too, I don't understand it too well. Am I understanding that if __stub_foo exists, it means that foo doesn't really exist? | #if defined (__stub_mkdir) || defined (__stub___mkdir) | choke me | #else | f = mkdir; | #endif | | ; | return 0; | } | | It works fine with gcc, but not g++. I just tried with `2.95.2' and `2.97 20001101 (experimental)', and both work properly. Do you have additional flags? What compiler exactly are you using?