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();
participants (1)
-
georg.brandl