[PATCH app-xdm 16/19] config: use AC_CHECK_HEADERS for sys/param.h

Mark Kettenis mark.kettenis at xs4all.nl
Thu Sep 9 06:37:44 PDT 2010


> From: Gaetan Nadon <memsize at videotron.ca>
> Date: Thu, 09 Sep 2010 09:05:18 -0400
> 
> This is the FreeBSD porting guide recommended
> method to check for BSD 4.3 Net2 or newer systems.
> 
> Signed-off-by: Gaetan Nadon <memsize at videotron.ca>

Should work fine on OpenBSD as well.

Reviewed-by: Mark Kettenis <kettenis at openbsd.org>

> ---
>  auth.c       |   10 ++++++----
>  chooser.c    |   10 ++++++----
>  configure.ac |    2 +-
>  3 files changed, 13 insertions(+), 9 deletions(-)
> 
> diff --git a/auth.c b/auth.c
> index 59434ec..1cf03e8 100644
> --- a/auth.c
> +++ b/auth.c
> @@ -99,10 +99,12 @@ from The Open Group.
>  # define SYSV_SIOCGIFCONF
>  #endif
>  
> -#ifdef CSRG_BASED
> -# include <sys/param.h>
> -# if (BSD >= 199103)
> -#  define VARIABLE_IFREQ
> +#ifdef HAVE_SYS_PARAM_H
> +#include <sys/param.h>
> +# ifdef BSD
> +#  if (BSD >= 199103)
> +#   define VARIABLE_IFREQ
> +#  endif
>  # endif
>  #endif
>  
> diff --git a/chooser.c b/chooser.c
> index 1e59a11..d3d08ea 100644
> --- a/chooser.c
> +++ b/chooser.c
> @@ -101,10 +101,12 @@ in this Software without prior written authorization from The Open Group.
>  # include    <netdir.h>
>  #endif
>  
> -#ifdef CSRG_BASED
> -# include <sys/param.h>
> -# if (BSD >= 199103)
> -#  define VARIABLE_IFREQ
> +#ifdef HAVE_SYS_PARAM_H
> +#include <sys/param.h>
> +# ifdef BSD
> +#  if (BSD >= 199103)
> +#   define VARIABLE_IFREQ
> +#  endif
>  # endif
>  #endif
>  
> diff --git a/configure.ac b/configure.ac
> index ac7e828..22f60dd 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -89,7 +89,7 @@ if test "x$HAS_SETUSERCONTEXT" = "xyes" ; then
>  fi
>  
>  AC_CHECK_FUNCS([daemon sigaction openlog asprintf])
> -AC_CHECK_HEADERS([grp.h syslog.h])
> +AC_CHECK_HEADERS([grp.h syslog.h sys/param.h])
>  AC_TYPE_SIGNAL
>  
>  XTRANS_CONNECTION_FLAGS
> -- 
> 1.6.0.4


More information about the xorg-devel mailing list