]> granicus.if.org Git - sudo/commitdiff
HP-UX may require _XOPEN_SOURCE_EXTENDED to be defined for MSG_WAITALL
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 12 Nov 2013 22:13:54 +0000 (15:13 -0700)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 12 Nov 2013 22:13:54 +0000 (15:13 -0700)
to be visible.

configure
configure.in

index f99f58f0c1161c03a19cf08106e0dfc6a09144d6..ad4fa4daaf49a3ae9c99fd39f0199e290a5f9555 100755 (executable)
--- a/configure
+++ b/configure
@@ -15579,6 +15579,9 @@ fi
 
 done
 
+#
+# Check for large file support.
+#
 # Check whether --enable-largefile was given.
 if test "${enable_largefile+set}" = set; then :
   enableval=$enable_largefile;
@@ -15777,10 +15780,16 @@ rm -rf conftest*
   fi
 fi
 
+#
+# HP-UX may need to define _XOPEN_SOURCE_EXTENDED to expose MSG_WAITALL.
+# Also, HP-UX 11.23 has a broken sys/types.h when large files support
+# is enabled and _XOPEN_SOURCE_EXTENDED is not also defined.
+# The following test will define _XOPEN_SOURCE_EXTENDED in either case.
+#
 case "$host_os" in
-    hpux11.*)
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h needs _XOPEN_SOURCE_EXTENDED" >&5
-$as_echo_n "checking whether sys/types.h needs _XOPEN_SOURCE_EXTENDED... " >&6; }
+    hpux*)
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/socket.h needs _XOPEN_SOURCE_EXTENDED for MSG_WAITALL" >&5
+$as_echo_n "checking whether sys/socket.h needs _XOPEN_SOURCE_EXTENDED for MSG_WAITALL... " >&6; }
 if ${sudo_cv_xopen_source_extended+:} false; then :
   $as_echo_n "(cached) " >&6
 else
@@ -15791,7 +15800,7 @@ $ac_includes_default
 int
 main ()
 {
-
+int a = MSG_WAITALL; return a;
   ;
   return 0;
 }
@@ -15808,7 +15817,7 @@ else
 int
 main ()
 {
-
+int a = MSG_WAITALL; return a;
   ;
   return 0;
 }
index 2cc256fe4a30f3b9af7e2702158fd21dc8fa574c..dbce2d16952a70ede4c599e5841967ec9f334485 100644 (file)
@@ -2113,19 +2113,26 @@ AC_CHECK_HEADERS([procfs.h] [sys/procfs.h], [AC_CHECK_MEMBERS(struct psinfo.pr_t
 #endif
 ])]
 break)
-dnl
-dnl Check for large file support.  HP-UX 11.23 has a broken sys/type.h
-dnl when large files support is enabled so work around it.
-dnl
+#
+# Check for large file support.
+#
 AC_SYS_LARGEFILE
+#
+# HP-UX may need to define _XOPEN_SOURCE_EXTENDED to expose MSG_WAITALL.
+# Also, HP-UX 11.23 has a broken sys/types.h when large files support
+# is enabled and _XOPEN_SOURCE_EXTENDED is not also defined.
+# The following test will define _XOPEN_SOURCE_EXTENDED in either case.
+#
 case "$host_os" in
-    hpux11.*)
-       AC_CACHE_CHECK([whether sys/types.h needs _XOPEN_SOURCE_EXTENDED], [sudo_cv_xopen_source_extended],
+    hpux*)
+       AC_CACHE_CHECK([whether sys/socket.h needs _XOPEN_SOURCE_EXTENDED for MSG_WAITALL], [sudo_cv_xopen_source_extended],
        [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT
-       #include <sys/socket.h>], [])], [sudo_cv_xopen_source_extended=no], [
+       #include <sys/socket.h>], [int a = MSG_WAITALL; return a;])],
+       [sudo_cv_xopen_source_extended=no], [
            AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#define _XOPEN_SOURCE_EXTENDED
            AC_INCLUDES_DEFAULT
-           #include <sys/socket.h>], [])], [sudo_cv_xopen_source_extended=yes],
+           #include <sys/socket.h>], [int a = MSG_WAITALL; return a;])],
+           [sudo_cv_xopen_source_extended=yes],
            [sudo_cv_xopen_source_extended=error])
        ])])
        if test "$sudo_cv_xopen_source_extended" = "yes"; then