mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
OS/2 EMX port changes (Modules part of patch #450267):
Modules/ _hotshot.c dbmmodule.c fcntlmodule.c main.c pwdmodule.c readline.c selectmodule.c signalmodule.c termios.c timemodule.c unicodedata.c
This commit is contained in:
parent
38b504e9e3
commit
7bf6833e17
11 changed files with 47 additions and 11 deletions
|
@ -222,12 +222,17 @@ 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 */
|
||||
#define LOCK_NB 4 /* don't block when locking */
|
||||
#define LOCK_UN 8 /* unlock */
|
||||
#endif
|
||||
#endif /* LOCK_SH */
|
||||
{
|
||||
struct flock l;
|
||||
if (code == LOCK_UN)
|
||||
|
@ -275,6 +280,7 @@ fcntl_lockf(PyObject *self, PyObject *args)
|
|||
}
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
#endif /* defined(PYOS_OS2) && defined(PYCC_GCC) */
|
||||
}
|
||||
|
||||
static char lockf_doc [] =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue