Issue 24217: O_RDWR undefined in mmapmodule.c (original) (raw)

Created on 2015-05-17 15:20 by Jeffrey.Armstrong, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
mmapmodule.py3.5.0a3.HAVE_FCNTL_H.diff Jeffrey.Armstrong,2015-05-17 15:29 Patch for mmapmodule to include fcntl.h explicitly on all UNIX-y platforms
Messages (5)
msg243404 - (view) Author: Jeffrey Armstrong (Jeffrey.Armstrong) * Date: 2015-05-17 15:20
While compiling on Linux/x86 with Open Watcom, I've run into the following at link time in Modules/mmapmodule.c: ./Modules/mmapmodule.c(1223): Error! E1011: Symbol 'O_RDWR' has not been declared The constant isn't defined because fcntl.h isn't included. Looking at the top of the file, it appears that, for the Apple platform only, this header is included, but no others. In order to support more runtime libraries outside of GNU libc, I would suggest including fcntl.h for all UNIX-y platforms, especially because the POSIX standard dictates that this constant be defined in fcntl.h. I don't know how it finds its way in under GCC/GNU libc, but an explicit include might be better.
msg243406 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2015-05-17 15:24
I think it's more portable with a #ifdef HAVE_FCNTL_H block around the include.
msg243407 - (view) Author: Jeffrey Armstrong (Jeffrey.Armstrong) * Date: 2015-05-17 15:29
Indeed, I agree. Let's try this new patch.
msg247878 - (view) Author: Jeffrey Armstrong (Jeffrey.Armstrong) * Date: 2015-08-02 15:27
There is a patch attached to this report for greater than 2 months. Should I mark this as "won't fix?"
msg247890 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-08-02 19:17
New changeset 1838f37a8d9e by Benjamin Peterson in branch '3.4': include fcntl.h on all *nix platforms (closes #24217) https://hg.python.org/cpython/rev/1838f37a8d9e New changeset 25ba5e7af08a by Benjamin Peterson in branch '3.5': Merge 3.4 (#24217) https://hg.python.org/cpython/rev/25ba5e7af08a New changeset 4ed9cc2203b3 by Benjamin Peterson in branch 'default': merge 3.5 (#24217) https://hg.python.org/cpython/rev/4ed9cc2203b3 New changeset 2e635a0e0207 by Benjamin Peterson in branch '2.7': include fcntl.h on all *nix platforms (closes #24217) https://hg.python.org/cpython/rev/2e635a0e0207
History
Date User Action Args
2022-04-11 14:58:17 admin set github: 68405
2015-08-02 19:17:49 python-dev set status: open -> closednosy: + python-devmessages: + resolution: fixedstage: resolved
2015-08-02 15:27:26 Jeffrey.Armstrong set messages: +
2015-05-17 15:29:37 Jeffrey.Armstrong set files: - mmapmodule.py3.5.0a3.diff
2015-05-17 15:29:11 Jeffrey.Armstrong set files: + mmapmodule.py3.5.0a3.HAVE_FCNTL_H.diffmessages: +
2015-05-17 15:24:35 christian.heimes set nosy: + christian.heimesmessages: +
2015-05-17 15:20:16 Jeffrey.Armstrong create