mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Moved some #ifdefs around that got put in the wrong place by the
latest OS/2 patch set.
This commit is contained in:
parent
9cb64803aa
commit
bfaf3d6186
1 changed files with 22 additions and 16 deletions
|
@ -1783,6 +1783,21 @@ static char posix_symlink__doc__[] =
|
||||||
"symlink(src, dst) -> None\n\
|
"symlink(src, dst) -> None\n\
|
||||||
Create a symbolic link.";
|
Create a symbolic link.";
|
||||||
|
|
||||||
|
static PyObject *
|
||||||
|
posix_symlink(self, args)
|
||||||
|
PyObject *self;
|
||||||
|
PyObject *args;
|
||||||
|
{
|
||||||
|
return posix_2str(args, symlink);
|
||||||
|
}
|
||||||
|
#endif /* HAVE_SYMLINK */
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef HAVE_TIMES
|
||||||
|
#ifndef HZ
|
||||||
|
#define HZ 60 /* Universal constant :-) */
|
||||||
|
#endif /* HZ */
|
||||||
|
|
||||||
#if defined(PYCC_VACPP) && defined(PYOS_OS2)
|
#if defined(PYCC_VACPP) && defined(PYOS_OS2)
|
||||||
static long
|
static long
|
||||||
system_uptime()
|
system_uptime()
|
||||||
|
@ -1812,21 +1827,7 @@ posix_times(self, args)
|
||||||
(double)0 /* t.tms_cstime / HZ */,
|
(double)0 /* t.tms_cstime / HZ */,
|
||||||
(double)system_uptime() / 1000);
|
(double)system_uptime() / 1000);
|
||||||
}
|
}
|
||||||
#else
|
#else /* not OS2 */
|
||||||
static PyObject *
|
|
||||||
posix_symlink(self, args)
|
|
||||||
PyObject *self;
|
|
||||||
PyObject *args;
|
|
||||||
{
|
|
||||||
return posix_2str(args, symlink);
|
|
||||||
}
|
|
||||||
#endif /* HAVE_SYMLINK */
|
|
||||||
|
|
||||||
#ifdef HAVE_TIMES
|
|
||||||
#ifndef HZ
|
|
||||||
#define HZ 60 /* Universal constant :-) */
|
|
||||||
#endif /* HZ */
|
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
posix_times(self, args)
|
posix_times(self, args)
|
||||||
PyObject *self;
|
PyObject *self;
|
||||||
|
@ -1847,8 +1848,10 @@ posix_times(self, args)
|
||||||
(double)t.tms_cstime / HZ,
|
(double)t.tms_cstime / HZ,
|
||||||
(double)c / HZ);
|
(double)c / HZ);
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* not OS2 */
|
||||||
#endif /* HAVE_TIMES */
|
#endif /* HAVE_TIMES */
|
||||||
|
|
||||||
|
|
||||||
#ifdef MS_WIN32
|
#ifdef MS_WIN32
|
||||||
#define HAVE_TIMES /* so the method table will pick it up */
|
#define HAVE_TIMES /* so the method table will pick it up */
|
||||||
static PyObject *
|
static PyObject *
|
||||||
|
@ -1871,9 +1874,12 @@ posix_times(self, args)
|
||||||
(double)0);
|
(double)0);
|
||||||
}
|
}
|
||||||
#endif /* MS_WIN32 */
|
#endif /* MS_WIN32 */
|
||||||
|
|
||||||
|
#ifdef HAVE_TIMES
|
||||||
static char posix_times__doc__[] =
|
static char posix_times__doc__[] =
|
||||||
"times() -> (utime, stime, cutime, cstime, elapsed_time)\n\
|
"times() -> (utime, stime, cutime, cstime, elapsed_time)\n\
|
||||||
Return a tuple of floating point numbers indicating process times.";
|
Return a tuple of floating point numbers indicating process times.";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_SETSID
|
#ifdef HAVE_SETSID
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue