diff options
Diffstat (limited to 'gl/m4/extern-inline.m4')
| -rw-r--r-- | gl/m4/extern-inline.m4 | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/gl/m4/extern-inline.m4 b/gl/m4/extern-inline.m4 index a4ac5ea5..8a12bddd 100644 --- a/gl/m4/extern-inline.m4 +++ b/gl/m4/extern-inline.m4 | |||
| @@ -1,13 +1,28 @@ | |||
| 1 | dnl 'extern inline' a la ISO C99. | 1 | dnl 'extern inline' a la ISO C99. |
| 2 | 2 | ||
| 3 | dnl Copyright 2012-2021 Free Software Foundation, Inc. | 3 | dnl Copyright 2012-2022 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| 7 | 7 | ||
| 8 | AC_DEFUN([gl_EXTERN_INLINE], | 8 | AC_DEFUN([gl_EXTERN_INLINE], |
| 9 | [ | 9 | [ |
| 10 | AH_VERBATIM([extern_inline], | 10 | AC_CACHE_CHECK([whether ctype.h defines __header_inline], |
| 11 | [gl_cv_have___header_inline], | ||
| 12 | [AC_PREPROC_IFELSE( | ||
| 13 | [AC_LANG_SOURCE([[#include <ctype.h> | ||
| 14 | #ifndef __header_inline | ||
| 15 | #error "<ctype.h> does not define __header_inline" | ||
| 16 | #endif | ||
| 17 | ]])], | ||
| 18 | [gl_cv_have___header_inline=yes], | ||
| 19 | [gl_cv_have___header_inline=no])]) | ||
| 20 | if test "$gl_cv_have___header_inline" = yes; then | ||
| 21 | AC_DEFINE([HAVE___HEADER_INLINE], [1], | ||
| 22 | [Define to 1 if ctype.h defines __header_inline.]) | ||
| 23 | fi | ||
| 24 | |||
| 25 | AH_VERBATIM([HAVE___HEADER_INLINE_1], | ||
| 11 | [/* Please see the Gnulib manual for how to use these macros. | 26 | [/* Please see the Gnulib manual for how to use these macros. |
| 12 | 27 | ||
| 13 | Suppress extern inline with HP-UX cc, as it appears to be broken; see | 28 | Suppress extern inline with HP-UX cc, as it appears to be broken; see |
| @@ -54,7 +69,7 @@ AC_DEFUN([gl_EXTERN_INLINE], | |||
| 54 | */ | 69 | */ |
| 55 | #if (((defined __APPLE__ && defined __MACH__) \ | 70 | #if (((defined __APPLE__ && defined __MACH__) \ |
| 56 | || defined __DragonFly__ || defined __FreeBSD__) \ | 71 | || defined __DragonFly__ || defined __FreeBSD__) \ |
| 57 | && (defined __header_inline \ | 72 | && (defined HAVE___HEADER_INLINE \ |
| 58 | ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ | 73 | ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ |
| 59 | && ! defined __clang__) \ | 74 | && ! defined __clang__) \ |
| 60 | : ((! defined _DONT_USE_CTYPE_INLINE_ \ | 75 | : ((! defined _DONT_USE_CTYPE_INLINE_ \ |
