Fix the broken poll test. (#387260, Christian Persch)

2006-12-18  Matthias Clasen  <mclasen@redhat.com>

        * configure.in: Fix the broken poll test.  (#387260,
        Christian Persch)
This commit is contained in:
Matthias Clasen
2006-12-19 15:26:02 +00:00
committed by Matthias Clasen
parent 7e07c46121
commit f92287ebdc
2 changed files with 14 additions and 11 deletions

View File

@@ -1,5 +1,8 @@
2006-12-18 Matthias Clasen <mclasen@redhat.com> 2006-12-18 Matthias Clasen <mclasen@redhat.com>
* configure.in: Fix the broken poll test. (#387260,
Christian Persch)
* glib/gmain.c (child_watch_helper_thread): Readd a * glib/gmain.c (child_watch_helper_thread): Readd a
return which was removed as dead code a while ago. return which was removed as dead code a while ago.
icc may consider it dead, but gcc doesn't like non-void icc may consider it dead, but gcc doesn't like non-void

View File

@@ -2122,13 +2122,14 @@ else
glib_cv_value_POLLNVAL=32 glib_cv_value_POLLNVAL=32
fi fi
# Check for Mac OS X's broken poll AC_MSG_CHECKING([for broken poll])
if test $cross_compiling != yes ; then AC_RUN_IFELSE([AC_LANG_SOURCE([[
AC_MSG_CHECKING(for broken poll)
AC_TRY_RUN([[
#include <stdlib.h> #include <stdlib.h>
#include <fcntl.h> #include <fcntl.h>
#include <poll.h> #include <poll.h>
#ifdef HAVE_SYS_POLL_H
#include <sys/poll.h>
#endif
int main(void) { int main(void) {
struct pollfd fds[1]; struct pollfd fds[1];
int fd; int fd;
@@ -2140,13 +2141,12 @@ if test $cross_compiling != yes ; then
exit(1); /* Does not work for devices -- fail */ exit(1); /* Does not work for devices -- fail */
} }
exit(0); exit(0);
}]], }]])],
broken_poll=no, [broken_poll=no],
broken_poll=yes [broken_poll=yes
AC_DEFINE(BROKEN_POLL,1,[poll doesn't work on devices]) AC_DEFINE(BROKEN_POLL,1,[poll doesn't work on devices])],
) [broken_poll="no (cross compiling)"])
AC_MSG_RESULT($broken_poll) AC_MSG_RESULT($broken_poll)
fi
dnl ********************** dnl **********************
dnl *** Win32 API libs *** dnl *** Win32 API libs ***