[project @ 2002-05-31 21:12:28 by sof]
authorsof <unknown>
Fri, 31 May 2002 21:12:29 +0000 (21:12 +0000)
committersof <unknown>
Fri, 31 May 2002 21:12:29 +0000 (21:12 +0000)
added struct msghdr feature tests

acconfig.h
aclocal.m4
configure.in
mk/config.h.in

index 43e9bd6..a7f5c67 100644 (file)
 /* Define if you need -ldl to get dlopen() */
 #undef HAVE_LIBDL
 
+/* Define if struct msghdr contains msg_accrights field */
+#undef HAVE_MSGHDR_MSG_ACCRIGHTS
+
+/* Define if struct msghdr contains msg_control field */
+#undef HAVE_MSGHDR_MSG_CONTROL
+
 /* Define if we can see RTLD_NEXT in dlfcn.h */
 #undef HAVE_RTLDNEXT
 
index 8d3de51..a75df17 100644 (file)
@@ -1,4 +1,4 @@
-dnl $Id: aclocal.m4,v 1.102 2002/05/22 09:02:40 simonmar Exp $
+dnl $Id: aclocal.m4,v 1.103 2002/05/31 21:12:28 sof Exp $
 dnl 
 dnl Extra autoconf macros for the Glasgow fptools
 dnl
@@ -1254,3 +1254,32 @@ else
   $2="";
 fi;
 ])
+
+dnl
+dnl Check to see whether 'struct msghdr' contains msg_control
+dnl 
+AC_DEFUN(FPTOOLS_MSGHDR_MSG_CONTROL,
+[AC_CACHE_CHECK([for msg_control in struct msghdr], fptools_cv_struct_msghdr_msg_control,
+[AC_TRY_COMPILE([#include <sys/uio.h>
+#include <sys/socket.h>], [struct msghdr m; m.msg_control;],
+fptools_cv_struct_msghdr_msg_control=yes, fptools_cv_struct_msghdr_msg_control=no)])
+if test $fptools_cv_struct_msghdr_msg_control = yes; then
+  AC_DEFINE(HAVE_MSGHDR_MSG_CONTROL)
+fi
+AC_SUBST(HAVE_MSGHDR_MSG_CONTROL)dnl
+])
+
+dnl
+dnl Check to see whether 'struct msghdr' contains msg_accrights
+dnl 
+AC_DEFUN(FPTOOLS_MSGHDR_MSG_ACCRIGHTS,
+[AC_CACHE_CHECK([for msg_accrights in struct msghdr], fptools_cv_struct_msghdr_msg_accrights,
+[AC_TRY_COMPILE([#include <sys/uio.h>
+#include <sys/socket.h>], [struct msghdr m; m.msg_accrights;],
+fptools_cv_struct_msghdr_msg_accrights=yes, fptools_cv_struct_msghdr_msg_accrights=no)])
+if test $fptools_cv_struct_msghdr_msg_accrights = yes; then
+  AC_DEFINE(HAVE_MSGHDR_MSG_ACCRIGHTS)
+fi
+AC_SUBST(HAVE_MSGHDR_MSG_ACCRIGHTS)dnl
+])
+
index 0ee6db0..8855fcf 100644 (file)
@@ -734,6 +734,10 @@ AC_STRUCT_ST_BLKSIZE
 dnl ** do we have long longs?
 FPTOOLS_C_LONG_LONG
 
+dnl ** check what fields struct msghdr contains
+FPTOOLS_MSGHDR_MSG_ACCRIGHTS
+FPTOOLS_MSGHDR_MSG_CONTROL
+
 dnl ** what are the sizes of various types
 dnl    (these must come before GHC_CHECK_ALIGNMENT)
 AC_CHECK_SIZEOF(char,               1)
index 99b53f9..837e852 100644 (file)
 /* Define if you have the `mprotect' function. */
 #undef HAVE_MPROTECT
 
+/* Define if struct msghdr contains msg_accrights field */
+#undef HAVE_MSGHDR_MSG_ACCRIGHTS
+
+/* Define if struct msghdr contains msg_control field */
+#undef HAVE_MSGHDR_MSG_CONTROL
+
 /* Define if you have the <netdb.h> header file. */
 #undef HAVE_NETDB_H