Mercurial > hg > octave-lojdl > gnulib-hg
changeset 6748:427cd89c6d7b
AIX 5.3 also has a broken poll(), reported Ralf Wildenhues.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Mon, 24 Apr 2006 11:32:59 +0000 |
parents | bd5c81f4c585 |
children | 912476e213eb |
files | m4/ChangeLog m4/poll.m4 |
diffstat | 2 files changed, 15 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,3 +1,9 @@ +2006-04-23 Bruno Haible <bruno@clisp.org> + + * poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the poll() + implementation in AIX. + Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>. + 2006-03-04 Eric Blake <ebb9@byu.net> * strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
--- a/m4/poll.m4 +++ b/m4/poll.m4 @@ -1,4 +1,4 @@ -# poll.m4 serial 5 +# poll.m4 serial 6 dnl Copyright (c) 2003, 2005, 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -16,7 +16,7 @@ AC_CHECK_FUNC(poll, [# Check whether poll() works on special files (like /dev/null) and - # and ttys (like /dev/tty). On MacOS X 10.4.0, it doesn't. + # and ttys (like /dev/tty). On MacOS X 10.4.0 and AIX 5.3, it doesn't. AC_TRY_RUN([ #include <fcntl.h> #include <poll.h> @@ -25,7 +25,8 @@ struct pollfd ufd; /* Try /dev/null for reading. */ ufd.fd = open ("/dev/null", O_RDONLY); - if (ufd.fd < 0) /* If /dev/null does not exist, it's not MacOS X. */ + if (ufd.fd < 0) + /* If /dev/null does not exist, it's not MacOS X nor AIX. */ return 0; ufd.events = POLLIN; ufd.revents = 0; @@ -33,7 +34,8 @@ return 1; /* Try /dev/null for writing. */ ufd.fd = open ("/dev/null", O_WRONLY); - if (ufd.fd < 0) /* If /dev/null does not exist, it's not MacOS X. */ + if (ufd.fd < 0) + /* If /dev/null does not exist, it's not MacOS X nor AIX. */ return 0; ufd.events = POLLOUT; ufd.revents = 0; @@ -45,10 +47,10 @@ [gl_cv_func_poll=yes], [gl_cv_func_poll=no], [# When cross-compiling, assume that poll() works everywhere except on - # MacOS X, regardless of its version. + # MacOS X or AIX, regardless of its version. AC_EGREP_CPP([MacOSX], [ -#if defined(__APPLE__) && defined(__MACH__) -This is MacOSX +#if (defined(__APPLE__) && defined(__MACH__)) || defined(_AIX) +This is MacOSX or AIX #endif ], [gl_cv_func_poll=no], [gl_cv_func_poll=yes])])]) if test $gl_cv_func_poll = yes; then