diff options
author | Thomas Wouters <thomas@python.org> | 2001-07-11 22:35:31 (GMT) |
---|---|---|
committer | Thomas Wouters <thomas@python.org> | 2001-07-11 22:35:31 (GMT) |
commit | e38b2f1f00f46e24eaf83182799f4f515ffb410d (patch) | |
tree | 3318084926879333c95c7a3d032fa5646d4bba55 /configure.in | |
parent | 3230d5c96111660f9b8c6f4fc0f86c545dd94df5 (diff) | |
download | cpython-e38b2f1f00f46e24eaf83182799f4f515ffb410d.zip cpython-e38b2f1f00f46e24eaf83182799f4f515ffb410d.tar.gz cpython-e38b2f1f00f46e24eaf83182799f4f515ffb410d.tar.bz2 |
Re-do the broken-nice() patch to break less platforms. Hopefully none :P
Also note that it isn't just Linux nice() that is broken: at least FreeBSD
and BSDI also have this problem. os.nice() should probably just be emulated
using getpriority()/setpriority(), if they are available, but I'll get to
that later.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/configure.in b/configure.in index 6359a46..8977512 100644 --- a/configure.in +++ b/configure.in @@ -545,7 +545,7 @@ signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \ sys/audioio.h sys/file.h sys/lock.h sys/modem.h db_185.h db.h \ sys/param.h sys/select.h sys/socket.h sys/time.h sys/times.h \ sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \ -ndbm.h db1/ndbm.h gdbm/ndbm.h) +ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h) AC_HEADER_DIRENT # checks for typedefs @@ -1671,6 +1671,23 @@ fi AC_CHECK_LIB(readline, rl_completion_matches, AC_DEFINE(HAVE_RL_COMPLETION_MATCHES), , -ltermcap) +AC_MSG_CHECKING(for broken nice()) +AC_CACHE_VAL(ac_cv_broken_nice, [ +AC_TRY_RUN([ +int main() +{ + int val1 = nice(1); + if (val1 != -1 && val1 == nice(2)) + exit(0); + exit(1); +} +],ac_cv_broken_nice=yes, ac_cv_broken_nice=no)]) +AC_MSG_RESULT($ac_cv_broken_nice) +if test "$ac_cv_broken_nice" = yes +then + AC_DEFINE(HAVE_BROKEN_NICE) +fi + # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS! # Add sys/socket.h to confdefs.h cat >> confdefs.h <<\EOF |