[Python-checkins] r43505 - python/branches/release24-maint/Modules/posixmodule.c
georg.brandl
python-checkins at python.org
Fri Mar 31 22:27:27 CEST 2006
Author: georg.brandl
Date: Fri Mar 31 22:27:27 2006
New Revision: 43505
Modified:
python/branches/release24-maint/Modules/posixmodule.c
Log:
Add guards against fcntl() not being available on Windows.
(backport from rev. 43504)
Modified: python/branches/release24-maint/Modules/posixmodule.c
==============================================================================
--- python/branches/release24-maint/Modules/posixmodule.c (original)
+++ python/branches/release24-maint/Modules/posixmodule.c Fri Mar 31 22:27:27 2006
@@ -5459,6 +5459,7 @@
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;
@@ -5472,6 +5473,9 @@
} else {
fp = fdopen(fd, mode);
}
+#else
+ fp = fdopen(fd, mode);
+#endif
Py_END_ALLOW_THREADS
if (fp == NULL)
return posix_error();
More information about the Python-checkins
mailing list