[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:

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

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.


        * 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 @@
   if test $gl_cv_func_poll = no; then
+    POLL_H=poll.h
     AC_DEFINE(poll, rpl_poll,
       [Define to poll if the replacement function should be used.])

reply via email to

[Prev in Thread] Current Thread [Next in Thread]