Issue 3266: Python-2.5.2/Modules/mmapmodule.c:915: error: `O_RDWR' undeclared (original) (raw)

Created on 2008-07-03 00:14 by mmokrejs, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (6)
msg69153 - (view) Author: Martin Mokrejs (mmokrejs) Date: 2008-07-03 00:14
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.)
msg69166 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2008-07-03 06:24
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?
msg69175 - (view) Author: Martin Mokrejs (mmokrejs) Date: 2008-07-03 06:56
So adding these two lines helped: # diff /usr/scratch/Python-2.5.2/Modules/mmapmodule.c.ori /usr/scratch/Python-2.5.2/Modules/mmapmodule.c 36a37 > #include <sys/types.h> 38a40 > #include <fcntl.h> #
msg84226 - (view) Author: Jack Diederich (jackdied) * (Python committer) Date: 2009-03-26 21:57
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.
msg112656 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2010-08-03 19:35
Still a problem with 2.7 or later?
msg192603 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2013-07-08 00:02
Compilation works on Solaris 10 and 11 for quite some time. Please reopen the bug report if you still have issues.
History
Date User Action Args
2022-04-11 14:56:36 admin set github: 47516
2013-07-08 00:02:39 christian.heimes set status: open -> closednosy: + christian.heimesmessages: + type: compile errorresolution: fixed
2010-08-03 19:35:32 terry.reedy set nosy: + terry.reedymessages: + versions: + Python 2.7, - Python 2.5
2009-03-26 21:57:15 jackdied set nosy: + jackdiedmessages: +
2009-01-01 02:35:51 pitrou set nosy: + pitrou
2008-07-03 06:56:07 mmokrejs set messages: +
2008-07-03 06:24:44 loewis set nosy: + loewismessages: +
2008-07-03 00:14:13 mmokrejs create