mrjbom wrote:
I use this script to compile.
What's wrong? How to fix it?
You changed that script since yesterday. Look into the file that is giving you problems, my copy of it only includes another stdint.h in hosted mode. Else it will include the stdint-gcc.h. So, if you just set the compiler to freestanding (which you did until yesterday), the problem should go away. And you have to set it to freestanding, since your kernel is not in a hosted environment.
Solar wrote:
Ahem. It's certainly ill-advised unless you're in the business of implementing a standard library, but it is also certainly possible.
For the hosted headers, yes. The freestanding ones however usually require compiler magic to implement. You cannot in general know which basic type is signed and has the width of a pointer, but GCC will helpfully predefine __PTRDIFF_T__ for you (Edit: Sorry, I meant __PTRDIFF_TYPE__). That sort of thing. And stdarg.h can
only be implemented as compiler magic (the GCC version being given above).
Of course, if you like needless work, you can have a stdint.h for every single ABI you can support. Or you can just use the compiler version, your call.