Some typo in the sources showing up on Solaris 2.6 only? building 'mmap' extension gcc -shared -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -I/usr/scratch/Python-2.5.2/./Include -I. -IInclude -I./Include -I/usr/local/include -I/usr/scratch/Python-2.5.2/Include -I/usr/scratch/Python-2.5.2 -c /usr/scratch/Python-2.5.2/Modules/mmapmodule.c -o build/temp.solaris-2.6-sun4u-2.5/usr/scratch/Python-2.5.2/Modules/mmapmodule.o /usr/scratch/Python-2.5.2/Modules/mmapmodule.c: In function `new_mmap_object': /usr/scratch/Python-2.5.2/Modules/mmapmodule.c:915: warning: implicit declaration of function `open' /usr/scratch/Python-2.5.2/Modules/mmapmodule.c:915: error: `O_RDWR' undeclared (first use in this function) /usr/scratch/Python-2.5.2/Modules/mmapmodule.c:915: error: (Each undeclared identifier is reported only once /usr/scratch/Python-2.5.2/Modules/mmapmodule.c:915: error: for each function it appears in.)
Why do you think there is a typo? O_RDWR is a valid constant that should be provided on all Unix-like systems. Can you please find out from the open(2) man page: a) whether Solaris 2.6 supports the O_RDWR constant, b) what header files to include, and c) whether including these header files solves the problem?
survey of other modules that use O_RDRW The following include sys/type.h and fcntl.h unconditionally: bsdmodule.c, dbmmoudle.c, _fileio.c posixmodule.c includes them after doing an #ifdef check mmapmodule.c currently (2.7 trunk) includes sys/types.h with an ifdef check, but fcntl.h not at all.