diff options
| author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-12-28 12:13:40 +0100 |
|---|---|---|
| committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-12-28 12:13:40 +0100 |
| commit | b0afb8fe0ff1d87165af9df61501197a06240dda (patch) | |
| tree | 274ac6a96c53ef4c19ab4974ce24a06a233128c5 /gl/stdckdint.in.h | |
| parent | 68fc05381ee5fa0aee1413118fbb3d81ca888b09 (diff) | |
| download | monitoring-plugins-b0afb8fe0ff1d87165af9df61501197a06240dda.tar.gz | |
Sync with Gnulib stable-202507 code (a8ac9f9ce5)
Diffstat (limited to 'gl/stdckdint.in.h')
| -rw-r--r-- | gl/stdckdint.in.h | 41 |
1 files changed, 32 insertions, 9 deletions
diff --git a/gl/stdckdint.in.h b/gl/stdckdint.in.h index 91848806..bb9089b4 100644 --- a/gl/stdckdint.in.h +++ b/gl/stdckdint.in.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* stdckdint.h -- checked integer arithmetic | 1 | /* stdckdint.h -- checked integer arithmetic |
| 2 | 2 | ||
| 3 | Copyright 2022-2024 Free Software Foundation, Inc. | 3 | Copyright 2022-2025 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software: you can redistribute it and/or modify it | 5 | This program is free software: you can redistribute it and/or modify it |
| 6 | under the terms of the GNU Lesser General Public License as published | 6 | under the terms of the GNU Lesser General Public License as published |
| @@ -15,10 +15,30 @@ | |||
| 15 | You should have received a copy of the GNU Lesser General Public License | 15 | You should have received a copy of the GNU Lesser General Public License |
| 16 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | 16 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
| 17 | 17 | ||
| 18 | #ifndef _GL_STDCKDINT_H | 18 | #if __GNUC__ >= 3 |
| 19 | #define _GL_STDCKDINT_H | 19 | @PRAGMA_SYSTEM_HEADER@ |
| 20 | #endif | ||
| 21 | @PRAGMA_COLUMNS@ | ||
| 20 | 22 | ||
| 21 | #include "intprops-internal.h" | 23 | #ifndef _@GUARD_PREFIX@_STDCKDINT_H |
| 24 | |||
| 25 | /* The include_next requires a split double-inclusion guard. */ | ||
| 26 | #if defined __cplusplus ? @HAVE_CXX_STDCKDINT_H@ : @HAVE_C_STDCKDINT_H@ | ||
| 27 | # @INCLUDE_NEXT@ @NEXT_STDCKDINT_H@ | ||
| 28 | #endif | ||
| 29 | |||
| 30 | #ifndef _@GUARD_PREFIX@_STDCKDINT_H | ||
| 31 | #define _@GUARD_PREFIX@_STDCKDINT_H | ||
| 32 | |||
| 33 | /* Do nothing but include the system header if it works properly. */ | ||
| 34 | # if defined __cplusplus ? !@HAVE_WORKING_CXX_STDCKDINT_H@ : !@HAVE_WORKING_C_STDCKDINT_H@ | ||
| 35 | |||
| 36 | /* Avoid redefining macros. */ | ||
| 37 | # undef ckd_add | ||
| 38 | # undef ckd_sub | ||
| 39 | # undef ckd_mul | ||
| 40 | |||
| 41 | # include "intprops-internal.h" | ||
| 22 | 42 | ||
| 23 | /* Store into *R the low-order bits of A + B, A - B, A * B, respectively. | 43 | /* Store into *R the low-order bits of A + B, A - B, A * B, respectively. |
| 24 | Return 1 if the result overflows, 0 otherwise. | 44 | Return 1 if the result overflows, 0 otherwise. |
| @@ -26,10 +46,13 @@ | |||
| 26 | bit-precise integer type, or an enumeration type. | 46 | bit-precise integer type, or an enumeration type. |
| 27 | 47 | ||
| 28 | These are like the standard macros introduced in C23, except that | 48 | These are like the standard macros introduced in C23, except that |
| 29 | arguments should not have side effects. */ | 49 | arguments should not have side effects. The C++26 standard is |
| 50 | expected to add this header and it's macros. */ | ||
| 30 | 51 | ||
| 31 | #define ckd_add(r, a, b) ((bool) _GL_INT_ADD_WRAPV (a, b, r)) | 52 | # define ckd_add(r, a, b) ((bool) _GL_INT_ADD_WRAPV (a, b, r)) |
| 32 | #define ckd_sub(r, a, b) ((bool) _GL_INT_SUBTRACT_WRAPV (a, b, r)) | 53 | # define ckd_sub(r, a, b) ((bool) _GL_INT_SUBTRACT_WRAPV (a, b, r)) |
| 33 | #define ckd_mul(r, a, b) ((bool) _GL_INT_MULTIPLY_WRAPV (a, b, r)) | 54 | # define ckd_mul(r, a, b) ((bool) _GL_INT_MULTIPLY_WRAPV (a, b, r)) |
| 34 | 55 | ||
| 35 | #endif /* _GL_STDCKDINT_H */ | 56 | # endif /* defined __cplusplus ? @HAVE_WORKING_CXX_STDCKDINT_H@ : @HAVE_WORKING_C_STDCKDINT_H@ */ |
| 57 | #endif /* _@GUARD_PREFIX@_STDCKDINT_H */ | ||
| 58 | #endif /* _@GUARD_PREFIX@_STDCKDINT_H */ | ||
