[asterisk-commits] russell: trunk r89361 - in /trunk: ./ include/asterisk/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Nov 17 00:33:07 CST 2007


Author: russell
Date: Sat Nov 17 00:33:07 2007
New Revision: 89361

URL: http://svn.digium.com/view/asterisk?view=rev&rev=89361
Log:
Update the configure script check for sys/poll.h to also provide the result in
include/asterisk/autoconfig.h.  Also, move the conditional include of sys/poll.h
or asterisk/poll-compat.h into asterisk/config.h instead of the two headers it
existed in before.

Modified:
    trunk/configure
    trunk/configure.ac
    trunk/include/asterisk/autoconfig.h.in
    trunk/include/asterisk/channel.h
    trunk/include/asterisk/compat.h
    trunk/include/asterisk/io.h

Modified: trunk/configure
URL: http://svn.digium.com/view/asterisk/trunk/configure?view=diff&rev=89361&r1=89360&r2=89361
==============================================================================
--- trunk/configure (original)
+++ trunk/configure Sat Nov 17 00:33:07 2007
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 89354 .
+# From configure.ac Revision: 89357 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.61.
 #
@@ -12403,11 +12403,13 @@
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <stdio.h>
+#include <sys/types.h> /* for off_t */
+     #include <stdio.h>
 int
 main ()
 {
-return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
+int (*fp) (FILE *, off_t, int) = fseeko;
+     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
   ;
   return 0;
 }
@@ -12447,11 +12449,13 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 #define _LARGEFILE_SOURCE 1
-#include <stdio.h>
+#include <sys/types.h> /* for off_t */
+     #include <stdio.h>
 int
 main ()
 {
-return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
+int (*fp) (FILE *, off_t, int) = fseeko;
+     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
   ;
   return 0;
 }
@@ -15503,6 +15507,11 @@
 fi
 if test $ac_cv_header_sys_poll_h = yes; then
   HAS_POLL=1
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SYS_POLL_H 1
+_ACEOF
+
 fi
 
 

Modified: trunk/configure.ac
URL: http://svn.digium.com/view/asterisk/trunk/configure.ac?view=diff&rev=89361&r1=89360&r2=89361
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Sat Nov 17 00:33:07 2007
@@ -288,7 +288,10 @@
 
 AC_CHECK_FUNCS([glob])
 AC_CHECK_FUNCS([timersub])
-AC_CHECK_HEADER([sys/poll.h], [HAS_POLL=1],)
+AC_CHECK_HEADER([sys/poll.h], 
+   [HAS_POLL=1]
+   AC_DEFINE([HAVE_SYS_POLL_H], 1, [Define to 1 if your system has working sys/poll.h]),
+   )
 AC_SUBST(HAS_POLL)
 
 # https support (in main/http.c) uses funopen on BSD systems,

Modified: trunk/include/asterisk/autoconfig.h.in
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/autoconfig.h.in?view=diff&rev=89361&r1=89360&r2=89361
==============================================================================
--- trunk/include/asterisk/autoconfig.h.in (original)
+++ trunk/include/asterisk/autoconfig.h.in Sat Nov 17 00:33:07 2007
@@ -839,6 +839,9 @@
 
 /* Define to 1 if you have the <sys/param.h> header file. */
 #undef HAVE_SYS_PARAM_H
+
+/* Define to 1 if your system has working sys/poll.h */
+#undef HAVE_SYS_POLL_H
 
 /* Define to 1 if you have the <sys/select.h> header file. */
 #undef HAVE_SYS_SELECT_H

Modified: trunk/include/asterisk/channel.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/channel.h?view=diff&rev=89361&r1=89360&r2=89361
==============================================================================
--- trunk/include/asterisk/channel.h (original)
+++ trunk/include/asterisk/channel.h Sat Nov 17 00:33:07 2007
@@ -125,7 +125,7 @@
 
 #include "asterisk/abstract_jb.h"
 
-#ifdef HAVE_POLL 
+#ifdef HAVE_SYS_POLL_H
 #include <sys/poll.h>
 #else
 #include "asterisk/poll-compat.h"

Modified: trunk/include/asterisk/compat.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/compat.h?view=diff&rev=89361&r1=89360&r2=89361
==============================================================================
--- trunk/include/asterisk/compat.h (original)
+++ trunk/include/asterisk/compat.h Sat Nov 17 00:33:07 2007
@@ -54,6 +54,12 @@
 
 #ifdef HAVE_STRING_H
 #include <string.h>
+#endif
+
+#ifdef HAVE_SYS_POLL_H
+#include <sys/poll.h>
+#else
+#include "asterisk/poll-compat.h"
 #endif
 
 #if !defined(HAVE_ASPRINTF) && !defined(__AST_DEBUG_MALLOC)

Modified: trunk/include/asterisk/io.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/io.h?view=diff&rev=89361&r1=89360&r2=89361
==============================================================================
--- trunk/include/asterisk/io.h (original)
+++ trunk/include/asterisk/io.h Sat Nov 17 00:33:07 2007
@@ -23,7 +23,7 @@
 #ifndef _ASTERISK_IO_H
 #define _ASTERISK_IO_H
 
-#ifdef HAVE_POLL
+#ifdef HAVE_SYS_POLL_H
 #include <sys/poll.h>		/* For POLL* constants */
 #else
 #include "asterisk/poll-compat.h"




More information about the asterisk-commits mailing list