diff options
author | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2010-04-08 01:11:46 (GMT) |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2010-04-13 01:26:35 (GMT) |
commit | 74da141e618ef99959d509cb2e7be35a348a39db (patch) | |
tree | 88ebc38b381a1021fc2d74864a71e230ae591c3d /gl/m4/size_max.m4 | |
parent | c63a4f726a0b6ad8cf6040f947754a81fd4683bb (diff) | |
download | monitoring-plugins-74da141e618ef99959d509cb2e7be35a348a39db.tar.gz |
Sync with the latest Gnulib code (177f525)
Signed-off-by: Thomas Guyot-Sionnest <dermoth@aei.ca>
Diffstat (limited to 'gl/m4/size_max.m4')
-rw-r--r-- | gl/m4/size_max.m4 | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/gl/m4/size_max.m4 b/gl/m4/size_max.m4 index e0e7b3f..ce992db 100644 --- a/gl/m4/size_max.m4 +++ b/gl/m4/size_max.m4 | |||
@@ -1,5 +1,5 @@ | |||
1 | # size_max.m4 serial 7 | 1 | # size_max.m4 serial 9 |
2 | dnl Copyright (C) 2003, 2005-2006, 2008 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2003, 2005-2006, 2008-2010 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. |
@@ -10,8 +10,7 @@ AC_DEFUN([gl_SIZE_MAX], | |||
10 | [ | 10 | [ |
11 | AC_CHECK_HEADERS([stdint.h]) | 11 | AC_CHECK_HEADERS([stdint.h]) |
12 | dnl First test whether the system already has SIZE_MAX. | 12 | dnl First test whether the system already has SIZE_MAX. |
13 | AC_MSG_CHECKING([for SIZE_MAX]) | 13 | AC_CACHE_CHECK([for SIZE_MAX], [gl_cv_size_max], [ |
14 | AC_CACHE_VAL([gl_cv_size_max], [ | ||
15 | gl_cv_size_max= | 14 | gl_cv_size_max= |
16 | AC_EGREP_CPP([Found it], [ | 15 | AC_EGREP_CPP([Found it], [ |
17 | #include <limits.h> | 16 | #include <limits.h> |
@@ -54,11 +53,19 @@ Found it | |||
54 | fi | 53 | fi |
55 | fi | 54 | fi |
56 | ]) | 55 | ]) |
57 | AC_MSG_RESULT([$gl_cv_size_max]) | ||
58 | if test "$gl_cv_size_max" != yes; then | 56 | if test "$gl_cv_size_max" != yes; then |
59 | AC_DEFINE_UNQUOTED([SIZE_MAX], [$gl_cv_size_max], | 57 | AC_DEFINE_UNQUOTED([SIZE_MAX], [$gl_cv_size_max], |
60 | [Define as the maximum value of type 'size_t', if the system doesn't define it.]) | 58 | [Define as the maximum value of type 'size_t', if the system doesn't define it.]) |
61 | fi | 59 | fi |
60 | dnl Don't redefine SIZE_MAX in config.h if config.h is re-included after | ||
61 | dnl <stdint.h>. Remember that the #undef in AH_VERBATIM gets replaced with | ||
62 | dnl #define by AC_DEFINE_UNQUOTED. | ||
63 | AH_VERBATIM([SIZE_MAX], | ||
64 | [/* Define as the maximum value of type 'size_t', if the system doesn't define | ||
65 | it. */ | ||
66 | #ifndef SIZE_MAX | ||
67 | # undef SIZE_MAX | ||
68 | #endif]) | ||
62 | ]) | 69 | ]) |
63 | 70 | ||
64 | dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. | 71 | dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. |