The current toolchain from CVS seems to create an ee-gcc which has a wrong __LONG_MAX__ definition, therby breaking <limits.h> and possibly other things.
Please fix by updating the (builtin?) specs. Thanks.
ee-gcc and __LONG_MAX__
printf("%X", __LONG_MAX__);
7FFFFFFFFFFFFFFF
which is perfectly correct.
7FFFFFFFFFFFFFFF
which is perfectly correct.
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
Which compiler flags are you using ? Actually it seems __LONG_MAX__ is not defined at all (see *long_max_spec in ee/lib/gcc-lib/ee/3.2.2/specs).
Code: Select all
> cat x.c
#ifndef __LONG_MAX__
#error "1"
#endif
#include <limits.h>
#ifndef __LONG_MAX__
#error "2"
#endif
#if __LONG_MAX__ != 9223372036854775807L
#error "3"
#endif
> /opt/cc-i386-linux/cross/ps2/mips64el-ps2.ps2dev-20050412/ee/bin/ee-gcc -v
Reading specs from /opt/cc-i386-linux/cross/ps2/mips64el-ps2.ps2dev-20050412/ee/lib/gcc-lib/ee/3.2.2/specs
Configured with: ../configure --prefix=/opt/cc-i386-linux/cross/ps2/mips64el-ps2.ps2dev-20050412/ee --target=ee --enable-languages=c,c++ --with-newlib --with-headers=/opt/cc-i386-linux/cross/ps2/mips64el-ps2.ps2dev-20050412/ee/ee/include --enable-cxx-flags=-G0
Thread model: single
gcc version 3.2.2
> /opt/cc-i386-linux/cross/ps2/mips64el-ps2.ps2dev-20050412/ee/bin/ee-gcc -c x.c
x.c:2:2: #error "1"
x.c:9:2: #error "3"
ee-gcc -D__LONG_MAX__=9223372036854775807L of course.
Seriously: update your toolchain (both gcc and ps2sdk) using cvs sources.
Seriously: update your toolchain (both gcc and ps2sdk) using cvs sources.
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
The right command line would be -isystem $PS2SDK/common/include
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.