summaryrefslogtreecommitdiffstats
path: root/gl/m4/stddef_h.m4
diff options
context:
space:
mode:
Diffstat (limited to 'gl/m4/stddef_h.m4')
-rw-r--r--gl/m4/stddef_h.m416
1 files changed, 7 insertions, 9 deletions
diff --git a/gl/m4/stddef_h.m4 b/gl/m4/stddef_h.m4
index 1303d2e..abfd203 100644
--- a/gl/m4/stddef_h.m4
+++ b/gl/m4/stddef_h.m4
@@ -1,5 +1,5 @@
1# stddef_h.m4 serial 11 1# stddef_h.m4 serial 12
2dnl Copyright (C) 2009-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -14,7 +14,7 @@ AC_DEFUN_ONCE([gl_STDDEF_H],
14 dnl Persuade OpenBSD <stddef.h> to declare max_align_t. 14 dnl Persuade OpenBSD <stddef.h> to declare max_align_t.
15 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) 15 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
16 16
17 STDDEF_H= 17 GL_GENERATE_STDDEF_H=false
18 18
19 dnl Test whether the type max_align_t exists and whether its alignment 19 dnl Test whether the type max_align_t exists and whether its alignment
20 dnl "is as great as is supported by the implementation in all contexts". 20 dnl "is as great as is supported by the implementation in all contexts".
@@ -41,12 +41,12 @@ AC_DEFUN_ONCE([gl_STDDEF_H],
41 ]) 41 ])
42 if test $gl_cv_type_max_align_t = no; then 42 if test $gl_cv_type_max_align_t = no; then
43 HAVE_MAX_ALIGN_T=0 43 HAVE_MAX_ALIGN_T=0
44 STDDEF_H=stddef.h 44 GL_GENERATE_STDDEF_H=true
45 fi 45 fi
46 46
47 if test $gt_cv_c_wchar_t = no; then 47 if test $gt_cv_c_wchar_t = no; then
48 HAVE_WCHAR_T=0 48 HAVE_WCHAR_T=0
49 STDDEF_H=stddef.h 49 GL_GENERATE_STDDEF_H=true
50 fi 50 fi
51 51
52 AC_CACHE_CHECK([whether NULL can be used in arbitrary expressions], 52 AC_CACHE_CHECK([whether NULL can be used in arbitrary expressions],
@@ -58,12 +58,10 @@ AC_DEFUN_ONCE([gl_STDDEF_H],
58 [gl_cv_decl_null_works=no])]) 58 [gl_cv_decl_null_works=no])])
59 if test $gl_cv_decl_null_works = no; then 59 if test $gl_cv_decl_null_works = no; then
60 REPLACE_NULL=1 60 REPLACE_NULL=1
61 STDDEF_H=stddef.h 61 GL_GENERATE_STDDEF_H=true
62 fi 62 fi
63 63
64 AC_SUBST([STDDEF_H]) 64 if $GL_GENERATE_STDDEF_H; then
65 AM_CONDITIONAL([GL_GENERATE_STDDEF_H], [test -n "$STDDEF_H"])
66 if test -n "$STDDEF_H"; then
67 gl_NEXT_HEADERS([stddef.h]) 65 gl_NEXT_HEADERS([stddef.h])
68 fi 66 fi
69]) 67])