diff options
author | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2023-09-18 20:59:46 (GMT) |
---|---|---|
committer | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2023-09-18 20:59:46 (GMT) |
commit | 0e70e81133c25274fe2dd2309556b41357dd759b (patch) | |
tree | 9a680b36788ee1ad4e7ecc5ccfeb4494db9fdc72 /gl/m4/limits-h.m4 | |
parent | ce355c80cf6054bfa5e1dcf81f9e2183ef963ee1 (diff) | |
parent | 2ddc75e69db5a3dd379c896d8420c9af20ec1cee (diff) | |
download | monitoring-plugins-0e70e81133c25274fe2dd2309556b41357dd759b.tar.gz |
Merge branch 'master' into mysql_detect_mysqldumprefs/pull/1718/head
Diffstat (limited to 'gl/m4/limits-h.m4')
-rw-r--r-- | gl/m4/limits-h.m4 | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/gl/m4/limits-h.m4 b/gl/m4/limits-h.m4 new file mode 100644 index 0000000..5088fa1 --- /dev/null +++ b/gl/m4/limits-h.m4 | |||
@@ -0,0 +1,41 @@ | |||
1 | dnl Check whether limits.h has needed features. | ||
2 | |||
3 | dnl Copyright 2016-2023 Free Software Foundation, Inc. | ||
4 | dnl This file is free software; the Free Software Foundation | ||
5 | dnl gives unlimited permission to copy and/or distribute it, | ||
6 | dnl with or without modifications, as long as this notice is preserved. | ||
7 | |||
8 | dnl From Paul Eggert. | ||
9 | |||
10 | AC_DEFUN_ONCE([gl_LIMITS_H], | ||
11 | [ | ||
12 | gl_CHECK_NEXT_HEADERS([limits.h]) | ||
13 | |||
14 | AC_CACHE_CHECK([whether limits.h has WORD_BIT, BOOL_WIDTH etc.], | ||
15 | [gl_cv_header_limits_width], | ||
16 | [AC_COMPILE_IFELSE( | ||
17 | [AC_LANG_PROGRAM( | ||
18 | [[#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ | ||
19 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 | ||
20 | #endif | ||
21 | #include <limits.h> | ||
22 | long long llm = LLONG_MAX; | ||
23 | int wb = WORD_BIT; | ||
24 | int ullw = ULLONG_WIDTH; | ||
25 | int bw = BOOL_WIDTH; | ||
26 | ]])], | ||
27 | [gl_cv_header_limits_width=yes], | ||
28 | [gl_cv_header_limits_width=no])]) | ||
29 | if test "$gl_cv_header_limits_width" = yes; then | ||
30 | GL_GENERATE_LIMITS_H=false | ||
31 | else | ||
32 | GL_GENERATE_LIMITS_H=true | ||
33 | fi | ||
34 | ]) | ||
35 | |||
36 | dnl Unconditionally enables the replacement of <limits.h>. | ||
37 | AC_DEFUN([gl_REPLACE_LIMITS_H], | ||
38 | [ | ||
39 | AC_REQUIRE([gl_LIMITS_H]) | ||
40 | GL_GENERATE_LIMITS_H=true | ||
41 | ]) | ||