aboutsummaryrefslogtreecommitdiffhomepage
path: root/configure.ac
diff options
context:
space:
mode:
authorGravatar Keith Winstein <keithw@mit.edu>2012-05-23 03:19:36 -0400
committerGravatar Keith Winstein <keithw@mit.edu>2012-05-23 03:19:36 -0400
commit5e86700a0ae74b75cf49319cb201004a70e30f0b (patch)
tree4679cfc1beb4af3829b2eb9df80174790e7d70e1 /configure.ac
parent7700984bbb9dbc31a8efc57a414d2e7315a83240 (diff)
Fix OS X 10.5 problem where FD_ISSET() argument isn't const
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac14
1 files changed, 14 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index a177aad..8d0e0ed 100644
--- a/configure.ac
+++ b/configure.ac
@@ -218,6 +218,20 @@ int pipefd[2];
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])
+AC_MSG_CHECKING([whether FD_ISSET() argument is const])
+AC_LANG_PUSH(C++)
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/select.h>
+class T {
+public:
+ fd_set fds;
+ bool Fun( void ) const { return FD_ISSET( 0, &fds ); } };]],
+[[T x; return x.Fun();]])],
+ [AC_DEFINE([FD_ISSET_IS_CONST], [1],
+ [Define if FD_ISSET() fd_set argument is const.])
+ AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])])
+AC_LANG_POP(C++)
+
AC_CHECK_DECLS([__builtin_bswap64, __builtin_ctz])
AC_CHECK_DECL([mach_absolute_time],