diff options
| author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2024-10-31 16:27:12 +0100 |
|---|---|---|
| committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2024-10-31 16:27:12 +0100 |
| commit | 5be04ec2ceb1df77afbca4fcbf9e92a712612d6f (patch) | |
| tree | 2b2e1c71dffae827c8e45cd4cccc375093d03486 /gl/m4/limits-h.m4 | |
| parent | 6d1d1dac32841d5ca6ee51bb09b30a6c604b17e2 (diff) | |
| download | monitoring-plugins-5be04ec2ceb1df77afbca4fcbf9e92a712612d6f.tar.gz | |
Sync with the latest Gnulib code (d4ec02b3cc)
Diffstat (limited to 'gl/m4/limits-h.m4')
| -rw-r--r-- | gl/m4/limits-h.m4 | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/gl/m4/limits-h.m4 b/gl/m4/limits-h.m4 index 5088fa16..1b619e1e 100644 --- a/gl/m4/limits-h.m4 +++ b/gl/m4/limits-h.m4 | |||
| @@ -1,10 +1,12 @@ | |||
| 1 | dnl Check whether limits.h has needed features. | 1 | # limits-h.m4 |
| 2 | 2 | # serial 1 | |
| 3 | dnl Copyright 2016-2023 Free Software Foundation, Inc. | 3 | dnl Copyright 2016-2024 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 | dnl Check whether limits.h has needed features. | ||
| 9 | |||
| 8 | dnl From Paul Eggert. | 10 | dnl From Paul Eggert. |
| 9 | 11 | ||
| 10 | AC_DEFUN_ONCE([gl_LIMITS_H], | 12 | AC_DEFUN_ONCE([gl_LIMITS_H], |
| @@ -23,14 +25,27 @@ AC_DEFUN_ONCE([gl_LIMITS_H], | |||
| 23 | int wb = WORD_BIT; | 25 | int wb = WORD_BIT; |
| 24 | int ullw = ULLONG_WIDTH; | 26 | int ullw = ULLONG_WIDTH; |
| 25 | int bw = BOOL_WIDTH; | 27 | int bw = BOOL_WIDTH; |
| 28 | int bm = BOOL_MAX; | ||
| 29 | int mblm = MB_LEN_MAX; | ||
| 26 | ]])], | 30 | ]])], |
| 27 | [gl_cv_header_limits_width=yes], | 31 | [gl_cv_header_limits_width=yes], |
| 28 | [gl_cv_header_limits_width=no])]) | 32 | [gl_cv_header_limits_width=no])]) |
| 29 | if test "$gl_cv_header_limits_width" = yes; then | 33 | GL_GENERATE_LIMITS_H=true |
| 30 | GL_GENERATE_LIMITS_H=false | 34 | AS_IF([test "$gl_cv_header_limits_width" = yes], |
| 31 | else | 35 | [AC_CACHE_CHECK([whether limits.h has SSIZE_MAX], |
| 32 | GL_GENERATE_LIMITS_H=true | 36 | [gl_cv_header_limits_ssize_max], |
| 33 | fi | 37 | [AC_COMPILE_IFELSE( |
| 38 | [AC_LANG_SOURCE( | ||
| 39 | [[#include <limits.h> | ||
| 40 | #ifndef SSIZE_MAX | ||
| 41 | #error "SSIZE_MAX is not defined" | ||
| 42 | #endif | ||
| 43 | ]])], | ||
| 44 | [gl_cv_header_limits_ssize_max=yes], | ||
| 45 | [gl_cv_header_limits_ssize_max=no])]) | ||
| 46 | if test "$gl_cv_header_limits_ssize_max" = yes; then | ||
| 47 | GL_GENERATE_LIMITS_H=false | ||
| 48 | fi]) | ||
| 34 | ]) | 49 | ]) |
| 35 | 50 | ||
| 36 | dnl Unconditionally enables the replacement of <limits.h>. | 51 | dnl Unconditionally enables the replacement of <limits.h>. |
