[Python-checkins] r43504 - python/trunk/Modules/posixmodule.c
georg.brandl
python-checkins at python.org
Fri Mar 31 22:27:23 CEST 2006
Author: georg.brandl
Date: Fri Mar 31 22:27:22 2006
New Revision: 43504
Modified:
python/trunk/Modules/posixmodule.c
Log:
Add guards against fcntl() not being available on Windows.
Modified: python/trunk/Modules/posixmodule.c
==============================================================================
--- python/trunk/Modules/posixmodule.c (original)
+++ python/trunk/Modules/posixmodule.c Fri Mar 31 22:27:22 2006
@@ -5769,6 +5769,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;
@@ -5782,6 +5783,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