From 8ee8f0fbfbb0b373c1a61c6b97f113fb42f635c0 Mon Sep 17 00:00:00 2001 From: sof Date: Fri, 31 May 2002 21:12:29 +0000 Subject: [PATCH] [project @ 2002-05-31 21:12:28 by sof] added struct msghdr feature tests --- acconfig.h | 6 ++++++ aclocal.m4 | 31 ++++++++++++++++++++++++++++++- configure.in | 4 ++++ mk/config.h.in | 6 ++++++ 4 files changed, 46 insertions(+), 1 deletion(-) diff --git a/acconfig.h b/acconfig.h index 43e9bd6..a7f5c67 100644 --- a/acconfig.h +++ b/acconfig.h @@ -75,6 +75,12 @@ /* 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 diff --git a/aclocal.m4 b/aclocal.m4 index 8d3de51..a75df17 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -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 +#include ], [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 +#include ], [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 +]) + diff --git a/configure.in b/configure.in index 0ee6db0..8855fcf 100644 --- a/configure.in +++ b/configure.in @@ -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) diff --git a/mk/config.h.in b/mk/config.h.in index 99b53f9..837e852 100644 --- a/mk/config.h.in +++ b/mk/config.h.in @@ -418,6 +418,12 @@ /* 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 header file. */ #undef HAVE_NETDB_H -- 1.7.10.4