diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-08-19 21:27:12 (GMT) |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-08-19 21:27:12 (GMT) |
commit | 26fbe7f1e68bb0c96da32491efcf3696fe6c299b (patch) | |
tree | c4d95289187a64e9c7517bf73d8208026c3d2fb3 /gl/m4/warn-on-use.m4 | |
parent | 5f79e3e9f62ca5487d9881973149136ba1d19d3e (diff) | |
download | monitoring-plugins-26fbe7f1e68bb0c96da32491efcf3696fe6c299b.tar.gz |
Sync with the latest Gnulib code (6f2d632)
Diffstat (limited to 'gl/m4/warn-on-use.m4')
-rw-r--r-- | gl/m4/warn-on-use.m4 | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gl/m4/warn-on-use.m4 b/gl/m4/warn-on-use.m4 index 42daae8..e43beeb 100644 --- a/gl/m4/warn-on-use.m4 +++ b/gl/m4/warn-on-use.m4 | |||
@@ -1,5 +1,5 @@ | |||
1 | # warn-on-use.m4 serial 2 | 1 | # warn-on-use.m4 serial 5 |
2 | dnl Copyright (C) 2010 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2010-2013 Free Software Foundation, Inc. |
3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
5 | dnl with or without modifications, as long as this notice is preserved. | 5 | dnl with or without modifications, as long as this notice is preserved. |
@@ -18,8 +18,8 @@ dnl with or without modifications, as long as this notice is preserved. | |||
18 | # some systems declare functions in the wrong header, then INCLUDES | 18 | # some systems declare functions in the wrong header, then INCLUDES |
19 | # should do likewise. | 19 | # should do likewise. |
20 | # | 20 | # |
21 | # If you assume C89, then it is generally safe to assume declarations | 21 | # It is generally safe to assume declarations for functions declared |
22 | # for functions declared in that standard (such as gets) without | 22 | # in the intersection of C89 and C11 (such as printf) without |
23 | # needing gl_WARN_ON_USE_PREPARE. | 23 | # needing gl_WARN_ON_USE_PREPARE. |
24 | AC_DEFUN([gl_WARN_ON_USE_PREPARE], | 24 | AC_DEFUN([gl_WARN_ON_USE_PREPARE], |
25 | [ | 25 | [ |
@@ -27,6 +27,8 @@ AC_DEFUN([gl_WARN_ON_USE_PREPARE], | |||
27 | [AH_TEMPLATE([HAVE_RAW_DECL_]AS_TR_CPP(m4_defn([gl_decl])), | 27 | [AH_TEMPLATE([HAVE_RAW_DECL_]AS_TR_CPP(m4_defn([gl_decl])), |
28 | [Define to 1 if ]m4_defn([gl_decl])[ is declared even after | 28 | [Define to 1 if ]m4_defn([gl_decl])[ is declared even after |
29 | undefining macros.])])dnl | 29 | undefining macros.])])dnl |
30 | dnl FIXME: gl_Symbol must be used unquoted until we can assume | ||
31 | dnl autoconf 2.64 or newer. | ||
30 | for gl_func in m4_flatten([$2]); do | 32 | for gl_func in m4_flatten([$2]); do |
31 | AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl | 33 | AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl |
32 | AC_CACHE_CHECK([whether $gl_func is declared without a macro], | 34 | AC_CACHE_CHECK([whether $gl_func is declared without a macro], |
@@ -35,8 +37,8 @@ AC_DEFUN([gl_WARN_ON_USE_PREPARE], | |||
35 | [@%:@undef $gl_func | 37 | [@%:@undef $gl_func |
36 | (void) $gl_func;])], | 38 | (void) $gl_func;])], |
37 | [AS_VAR_SET(gl_Symbol, [yes])], [AS_VAR_SET(gl_Symbol, [no])])]) | 39 | [AS_VAR_SET(gl_Symbol, [yes])], [AS_VAR_SET(gl_Symbol, [no])])]) |
38 | AS_VAR_IF(gl_Symbol, [yes], | 40 | AS_VAR_IF(gl_Symbol, [yes], |
39 | [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1]) | 41 | [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1]) |
40 | dnl shortcut - if the raw declaration exists, then set a cache | 42 | dnl shortcut - if the raw declaration exists, then set a cache |
41 | dnl variable to allow skipping any later AC_CHECK_DECL efforts | 43 | dnl variable to allow skipping any later AC_CHECK_DECL efforts |
42 | eval ac_cv_have_decl_$gl_func=yes]) | 44 | eval ac_cv_have_decl_$gl_func=yes]) |