diff options
author | Georg Brandl <georg@python.org> | 2006-03-31 20:27:22 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2006-03-31 20:27:22 (GMT) |
commit | 644b1e7aac8f048ade4709f248c4d66b85800efc (patch) | |
tree | 2e7543ba35a8331bb054302ea243c90db5debddd /Modules/posixmodule.c | |
parent | 814727582a3f13c77b1ed704904aae7990fd728e (diff) | |
download | cpython-644b1e7aac8f048ade4709f248c4d66b85800efc.zip cpython-644b1e7aac8f048ade4709f248c4d66b85800efc.tar.gz cpython-644b1e7aac8f048ade4709f248c4d66b85800efc.tar.bz2 |
Add guards against fcntl() not being available on Windows.
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r-- | Modules/posixmodule.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 631833f..a27a2af 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -5769,6 +5769,7 @@ posix_fdopen(PyObject *self, PyObject *args) return NULL; } Py_BEGIN_ALLOW_THREADS +#if !defined(MS_WINDOWS) && defined(HAVE_FCNTL_H) if (mode[0] == 'a') { /* try to make sure the O_APPEND flag is set */ int flags; @@ -5782,6 +5783,9 @@ posix_fdopen(PyObject *self, PyObject *args) } else { fp = fdopen(fd, mode); } +#else + fp = fdopen(fd, mode); +#endif Py_END_ALLOW_THREADS if (fp == NULL) return posix_error(); |