diff options
author | Guido van Rossum <guido@python.org> | 2001-01-05 14:45:49 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-01-05 14:45:49 (GMT) |
commit | cadfaeca7f2297f52903eac6b7067f0efbc8b745 (patch) | |
tree | 52413291f8c8c05012649886831e91d55d138bd2 /configure.in | |
parent | 47955241011a7042405545a7427808bd01d901f2 (diff) | |
download | cpython-cadfaeca7f2297f52903eac6b7067f0efbc8b745.zip cpython-cadfaeca7f2297f52903eac6b7067f0efbc8b745.tar.gz cpython-cadfaeca7f2297f52903eac6b7067f0efbc8b745.tar.bz2 |
Configuration test for working getc_unlocked() (and flockfile() and
funlockfile()).
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/configure.in b/configure.in index 07072c5..77ab0a3 100644 --- a/configure.in +++ b/configure.in @@ -1291,6 +1291,20 @@ then AC_DEFINE(SIGNED_RIGHT_SHIFT_ZERO_FILLS) fi +# check for getc_unlocked and related locking functions +AC_MSG_CHECKING(for getc_unlocked() and friends) +AC_CACHE_VAL(ac_cv_have_getc_unlocked, [ +AC_TRY_LINK([#include <stdio.h>],[ + FILE *f = fopen("/dev/null", "r"); + flockfile(f); + getc_unlocked(f); + funlockfile(f); +], ac_cv_have_getc_unlocked=yes, ac_cv_have_getc_unlocked=no)]) +AC_MSG_RESULT($ac_cv_have_getc_unlocked) +if test "$ac_cv_have_getc_unlocked" = yes +then + AC_DEFINE(HAVE_GETC_UNLOCKED) +fi # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS! # Add sys/socket.h to confdefs.h |