aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Modules/fcntlmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/fcntlmodule.c')
-rw-r--r--Modules/fcntlmodule.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/Modules/fcntlmodule.c b/Modules/fcntlmodule.c
index 6b7e3fc6e1d..bc2c181dce1 100644
--- a/Modules/fcntlmodule.c
+++ b/Modules/fcntlmodule.c
@@ -325,11 +325,6 @@ fcntl_lockf(PyObject *self, PyObject *args)
&lenobj, &startobj, &whence))
return NULL;
-#if defined(PYOS_OS2) && defined(PYCC_GCC)
- PyErr_SetString(PyExc_NotImplementedError,
- "lockf not supported on OS/2 (EMX)");
- return NULL;
-#else
#ifndef LOCK_SH
#define LOCK_SH 1 /* shared lock */
#define LOCK_EX 2 /* exclusive lock */
@@ -383,7 +378,6 @@ fcntl_lockf(PyObject *self, PyObject *args)
}
Py_INCREF(Py_None);
return Py_None;
-#endif /* defined(PYOS_OS2) && defined(PYCC_GCC) */
}
PyDoc_STRVAR(lockf_doc,
@@ -467,6 +461,9 @@ all_ins(PyObject* d)
#ifdef F_DUPFD
if (ins(d, "F_DUPFD", (long)F_DUPFD)) return -1;
#endif
+#ifdef F_DUPFD_CLOEXEC
+ if (ins(d, "F_DUPFD_CLOEXEC", (long)F_DUPFD_CLOEXEC)) return -1;
+#endif
#ifdef F_GETFD
if (ins(d, "F_GETFD", (long)F_GETFD)) return -1;
#endif