At least on netbsd: #include <stdint.h> #include <sys/time.h> int main() { return 0; } > /usr/pkg/gcc8snapshot/bin/gcc -ffreestanding -Wsystem-headers test.c In file included from /usr/include/amd64/int_limits.h:36, from /usr/include/sys/stdint.h:92, from /usr/include/sys/bswap.h:9, from /usr/include/amd64/bswap.h:13, from /usr/include/sys/endian.h:107, from /usr/include/amd64/endian.h:3, from /usr/pkg/gcc8snapshot/lib/gcc/x86_64--netbsd/8.0.0/include-fixed/sys/types.h:107, from /usr/include/sys/time.h:38, from test.c:2: /usr/include/sys/common_int_limits.h:46: warning: "INT8_MIN" redefined #define INT8_MIN (-__INT8_MAX__-1) In file included from /usr/pkg/gcc8snapshot/lib/gcc/x86_64--netbsd/8.0.0/include/stdint.h:11, from test.c:1: /usr/pkg/gcc8snapshot/lib/gcc/x86_64--netbsd/8.0.0/include/stdint-gcc.h:103: note: this is the location of the previous definition # define INT8_MIN (-INT8_MAX - 1) Repeating for a lot of things. using -save-temps, it seems we have include order: fixincludes stdint.h: #undef WORKING_THING #define WORKING_THING 0x7f normal stdint.h: #define WORKING_THING 0x7F
Can you attcah both fixed and unfixed sys/types.h?
Created attachment 43145 [details] fixed sys/types.h
Created attachment 43146 [details] Normal sys/types.h