summaryrefslogtreecommitdiff
path: root/m4/stddef_h.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/stddef_h.m4')
-rw-r--r--m4/stddef_h.m417
1 files changed, 16 insertions, 1 deletions
diff --git a/m4/stddef_h.m4 b/m4/stddef_h.m4
index a2322ebb7e..aa012219fc 100644
--- a/m4/stddef_h.m4
+++ b/m4/stddef_h.m4
@@ -1,4 +1,4 @@
-# stddef_h.m4 serial 13
+# stddef_h.m4 serial 14
dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -68,6 +68,21 @@ AC_DEFUN_ONCE([gl_STDDEF_H],
GL_GENERATE_STDDEF_H=true
fi
+ AC_CACHE_CHECK([for unreachable],
+ [gl_cv_func_unreachable],
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <stddef.h>
+ ]],
+ [[unreachable ();
+ ]])],
+ [gl_cv_func_unreachable=yes],
+ [gl_cv_func_unreachable=no])
+ ])
+ if test $gl_cv_func_unreachable = no; then
+ GL_GENERATE_STDDEF_H=true
+ fi
+
if $GL_GENERATE_STDDEF_H; then
gl_NEXT_HEADERS([stddef.h])
fi