2005-10-09

linux problem solved

After a few hours of stuffing around...


I couldn't compile the kernel because I'd always get an error about __ctype_b or __ctype_tolower... highly annoying. I wanted this program


#include < ctype.h >
main(p) { while(isalnum(p)); }


to "expand" to something like this


enum
{
_ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8))
};

extern __const unsigned short int *__ctype_b_loc;

main(p) { while((__ctype_b_loc[(int) ((p))] & (unsigned short int) _ISalnum)); }


except it was always putting __ctype_b instead of __ctype_b_loc. After noticing that editing /usr/include/ctype.h wasn't changing anything a light went on in my head and I looked at the output of gcc -E more carefully - it was using /usr/local/include/ctype.h instead, so I renamed /usr/local/include to /usr/local/include-dontuse and everything works fine again.

0 Comments:

Post a Comment

<< Home