[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
poll.h replacement
From: |
Ralf Wildenhues |
Subject: |
poll.h replacement |
Date: |
Fri, 3 Mar 2006 10:09:15 +0100 |
User-agent: |
Mutt/1.5.11 |
On powerpc-ibm-aix5.3.0.0, poll is not deemed acceptable: the test in
m4/poll.m4 fails because polling on /dev/null does not work. It does
work to poll on regular files, though. Polling on /dev/tty does not
work either.
This documentation may be helpful:
http://www16.boulder.ibm.com/doc_link/en_US/a_doc_lib/libs/basetrf1/poll.htm#a1289b55
http://www16.boulder.ibm.com/doc_link/en_US/a_doc_lib/files/aixfiles/poll.h.htm#a16691c07
I'm not sure whether the test in m4/poll.m4 should be adjusted or not:
it mentions OS X poll as buggy; judging from the change
http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/3622
it looks to me that the test should fail on AIX 5.3 as well.
In that case, the test is fine, but the build fails later:
| xlc -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\"
-DLIBDIR=\"/usr/local/lib\" -I. -I../../dummy-0/lib -I.. -D_THREAD_SAFE -g
-c ../../dummy-0/lib/poll.c
| "../../dummy-0/lib/poll.c", line 54.1: 1506-343 (S) Redeclaration of rpl_poll
differs from previous declaration on line 119 of "/usr/include/sys/poll.h".
| "../../dummy-0/lib/poll.c", line 54.1: 1506-381 (I) The type "void*" of
parameter 1 in the prototype declaration is not compatible with the
corresponding parameter type "struct pollfd*" in the nonprototype declaration.
because /usr/include/poll.h exists and thus the replacement header is
not added (earlier in gl_FUNC_POLL). The patch below adds it anyway in
case we deem poll() inacceptable. I'm not sure if this is generally the
right thing to do, but this works on AIX.
Cheers,
Ralf
* poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
our replacement poll.h in any case, to avoid a differing
declaration from a system header. Seen on AIX.
Index: m4/poll.m4
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/poll.m4,v
retrieving revision 1.4
diff -u -r1.4 poll.m4
--- m4/poll.m4 15 Jul 2005 10:34:31 -0000 1.4
+++ m4/poll.m4 22 Feb 2006 22:23:19 -0000
@@ -57,6 +57,7 @@
fi
if test $gl_cv_func_poll = no; then
+ POLL_H=poll.h
AC_LIBOBJ(poll)
AC_DEFINE(poll, rpl_poll,
[Define to poll if the replacement function should be used.])
- poll.h replacement,
Ralf Wildenhues <=