2N/Adnl A placeholder for POSIX 2008 <stddef.h>, for platforms that have issues.
2N/A# stddef_h.m4 serial 2
2N/Adnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
2N/Adnl This file is free software; the Free Software Foundation
2N/Adnl gives unlimited permission to copy and/or distribute it,
2N/Adnl with or without modifications, as long as this notice is preserved.
2N/A
2N/AAC_DEFUN([gl_STDDEF_H],
2N/A[
2N/A AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
2N/A AC_REQUIRE([gt_TYPE_WCHAR_T])
2N/A if test $gt_cv_c_wchar_t = no; then
2N/A HAVE_WCHAR_T=0
2N/A STDDEF_H=stddef.h
2N/A fi
2N/A AC_CACHE_CHECK([whether NULL can be used in arbitrary expressions],
2N/A [gl_cv_decl_null_works],
2N/A [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stddef.h>
2N/A int test[2 * (sizeof NULL == sizeof (void *)) -1];
2N/A]])],
2N/A [gl_cv_decl_null_works=yes],
2N/A [gl_cv_decl_null_works=no])])
2N/A if test $gl_cv_decl_null_works = no; then
2N/A REPLACE_NULL=1
2N/A STDDEF_H=stddef.h
2N/A fi
2N/A if test -n "$STDDEF_H"; then
2N/A gl_CHECK_NEXT_HEADERS([stddef.h])
2N/A fi
2N/A])
2N/A
2N/AAC_DEFUN([gl_STDDEF_MODULE_INDICATOR],
2N/A[
2N/A dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
2N/A AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
2N/A gl_MODULE_INDICATOR_SET_VARIABLE([$1])
2N/A])
2N/A
2N/AAC_DEFUN([gl_STDDEF_H_DEFAULTS],
2N/A[
2N/A dnl Assume proper GNU behavior unless another module says otherwise.
2N/A REPLACE_NULL=0; AC_SUBST([REPLACE_NULL])
2N/A HAVE_WCHAR_T=1; AC_SUBST([HAVE_WCHAR_T])
2N/A STDDEF_H=''; AC_SUBST([STDDEF_H])
2N/A])