mirror of https://github.com/python/cpython
Added configuration tests for presence of alarm(), pause(), and getpwent()
This commit is contained in:
parent
5de31fc094
commit
1171ee6aaf
|
@ -90,6 +90,7 @@ pwd_getpwnam(self, args)
|
||||||
return mkpwent(p);
|
return mkpwent(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_GETPWENT
|
||||||
static PyObject *
|
static PyObject *
|
||||||
pwd_getpwall(self, args)
|
pwd_getpwall(self, args)
|
||||||
PyObject *self;
|
PyObject *self;
|
||||||
|
@ -113,11 +114,14 @@ pwd_getpwall(self, args)
|
||||||
}
|
}
|
||||||
return d;
|
return d;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static PyMethodDef pwd_methods[] = {
|
static PyMethodDef pwd_methods[] = {
|
||||||
{"getpwuid", pwd_getpwuid},
|
{"getpwuid", pwd_getpwuid},
|
||||||
{"getpwnam", pwd_getpwnam},
|
{"getpwnam", pwd_getpwnam},
|
||||||
|
#ifdef HAVE_GETPWENT
|
||||||
{"getpwall", pwd_getpwall},
|
{"getpwall", pwd_getpwall},
|
||||||
|
#endif
|
||||||
{NULL, NULL} /* sentinel */
|
{NULL, NULL} /* sentinel */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -147,7 +147,7 @@ signal_handler(sig_num)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef DONT_HAVE_SIG_ALARM
|
#ifdef HAVE_ALARM
|
||||||
static PyObject *
|
static PyObject *
|
||||||
signal_alarm(self, args)
|
signal_alarm(self, args)
|
||||||
PyObject *self; /* Not used */
|
PyObject *self; /* Not used */
|
||||||
|
@ -161,7 +161,7 @@ signal_alarm(self, args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef DONT_HAVE_SIG_PAUSE
|
#ifdef HAVE_PAUSE
|
||||||
static PyObject *
|
static PyObject *
|
||||||
signal_pause(self, args)
|
signal_pause(self, args)
|
||||||
PyObject *self; /* Not used */
|
PyObject *self; /* Not used */
|
||||||
|
@ -254,12 +254,12 @@ signal_get_signal(self, args)
|
||||||
|
|
||||||
/* List of functions defined in the module */
|
/* List of functions defined in the module */
|
||||||
static PyMethodDef signal_methods[] = {
|
static PyMethodDef signal_methods[] = {
|
||||||
#ifndef DONT_HAVE_SIG_ALARM
|
#ifdef HAVE_ALARM
|
||||||
{"alarm", signal_alarm},
|
{"alarm", signal_alarm},
|
||||||
#endif
|
#endif
|
||||||
{"signal", signal_signal},
|
{"signal", signal_signal},
|
||||||
{"getsignal", signal_get_signal},
|
{"getsignal", signal_get_signal},
|
||||||
#ifndef DONT_HAVE_SIG_PAUSE
|
#ifdef HAVE_PAUSE
|
||||||
{"pause", signal_pause},
|
{"pause", signal_pause},
|
||||||
#endif
|
#endif
|
||||||
{"default_int_handler", signal_default_int_handler},
|
{"default_int_handler", signal_default_int_handler},
|
||||||
|
|
|
@ -151,6 +151,9 @@
|
||||||
/* The number of bytes in a long. */
|
/* The number of bytes in a long. */
|
||||||
#undef SIZEOF_LONG
|
#undef SIZEOF_LONG
|
||||||
|
|
||||||
|
/* Define if you have the alarm function. */
|
||||||
|
#undef HAVE_ALARM
|
||||||
|
|
||||||
/* Define if you have the chown function. */
|
/* Define if you have the chown function. */
|
||||||
#undef HAVE_CHOWN
|
#undef HAVE_CHOWN
|
||||||
|
|
||||||
|
@ -193,6 +196,9 @@
|
||||||
/* Define if you have the getpid function. */
|
/* Define if you have the getpid function. */
|
||||||
#undef HAVE_GETPID
|
#undef HAVE_GETPID
|
||||||
|
|
||||||
|
/* Define if you have the getpwent function. */
|
||||||
|
#undef HAVE_GETPWENT
|
||||||
|
|
||||||
/* Define if you have the gettimeofday function. */
|
/* Define if you have the gettimeofday function. */
|
||||||
#undef HAVE_GETTIMEOFDAY
|
#undef HAVE_GETTIMEOFDAY
|
||||||
|
|
||||||
|
@ -220,6 +226,9 @@
|
||||||
/* Define if you have the nice function. */
|
/* Define if you have the nice function. */
|
||||||
#undef HAVE_NICE
|
#undef HAVE_NICE
|
||||||
|
|
||||||
|
/* Define if you have the pause function. */
|
||||||
|
#undef HAVE_PAUSE
|
||||||
|
|
||||||
/* Define if you have the plock function. */
|
/* Define if you have the plock function. */
|
||||||
#undef HAVE_PLOCK
|
#undef HAVE_PLOCK
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
|
||||||
# From configure.in Revision: 1.61
|
# From configure.in Revision: 1.63
|
||||||
|
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated automatically using autoconf version 2.12
|
# Generated automatically using autoconf version 2.12
|
||||||
|
@ -2480,9 +2480,9 @@ fi
|
||||||
|
|
||||||
|
|
||||||
# checks for library functions
|
# checks for library functions
|
||||||
for ac_func in chown clock dlopen execv flock fork ftime ftruncate \
|
for ac_func in alarm chown clock dlopen execv flock fork ftime ftruncate \
|
||||||
gethostname_r getpeername getpgrp getpid gettimeofday getwd \
|
gethostname_r getpeername getpgrp getpid getpwent gettimeofday getwd \
|
||||||
kill link lstat mkfifo nice plock putenv readlink \
|
kill link lstat mkfifo nice pause plock putenv readlink \
|
||||||
select setgid setuid setsid setpgid setpgrp setvbuf \
|
select setgid setuid setsid setpgid setpgrp setvbuf \
|
||||||
sigaction siginterrupt sigrelse strftime symlink \
|
sigaction siginterrupt sigrelse strftime symlink \
|
||||||
tcgetpgrp tcsetpgrp times truncate uname waitpid
|
tcgetpgrp tcsetpgrp times truncate uname waitpid
|
||||||
|
|
|
@ -379,9 +379,9 @@ DLINCLDIR=${dldir}
|
||||||
LIBS="$LIBS -ldl -ldld"], AC_MSG_RESULT(no))
|
LIBS="$LIBS -ldl -ldld"], AC_MSG_RESULT(no))
|
||||||
|
|
||||||
# checks for library functions
|
# checks for library functions
|
||||||
AC_CHECK_FUNCS(chown clock dlopen execv flock fork ftime ftruncate \
|
AC_CHECK_FUNCS(alarm chown clock dlopen execv flock fork ftime ftruncate \
|
||||||
gethostname_r getpeername getpgrp getpid gettimeofday getwd \
|
gethostname_r getpeername getpgrp getpid getpwent gettimeofday getwd \
|
||||||
kill link lstat mkfifo nice plock putenv readlink \
|
kill link lstat mkfifo nice pause plock putenv readlink \
|
||||||
select setgid setuid setsid setpgid setpgrp setvbuf \
|
select setgid setuid setsid setpgid setpgrp setvbuf \
|
||||||
sigaction siginterrupt sigrelse strftime symlink \
|
sigaction siginterrupt sigrelse strftime symlink \
|
||||||
tcgetpgrp tcsetpgrp times truncate uname waitpid)
|
tcgetpgrp tcsetpgrp times truncate uname waitpid)
|
||||||
|
|
Loading…
Reference in New Issue