summaryrefslogtreecommitdiffstats
path: root/gl/xalloc-oversized.h
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2025-12-28 12:13:40 +0100
committerLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2025-12-28 12:13:40 +0100
commitb0afb8fe0ff1d87165af9df61501197a06240dda (patch)
tree274ac6a96c53ef4c19ab4974ce24a06a233128c5 /gl/xalloc-oversized.h
parent68fc05381ee5fa0aee1413118fbb3d81ca888b09 (diff)
downloadmonitoring-plugins-b0afb8fe0ff1d87165af9df61501197a06240dda.tar.gz
Sync with Gnulib stable-202507 code (a8ac9f9ce5)
Diffstat (limited to 'gl/xalloc-oversized.h')
-rw-r--r--gl/xalloc-oversized.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/gl/xalloc-oversized.h b/gl/xalloc-oversized.h
index 7f30f83e..0f66bd06 100644
--- a/gl/xalloc-oversized.h
+++ b/gl/xalloc-oversized.h
@@ -1,6 +1,6 @@
1/* xalloc-oversized.h -- memory allocation size checking 1/* xalloc-oversized.h -- memory allocation size checking
2 2
3 Copyright (C) 1990-2000, 2003-2004, 2006-2024 Free Software Foundation, Inc. 3 Copyright (C) 1990-2000, 2003-2004, 2006-2025 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
@@ -47,7 +47,8 @@
47#if 7 <= __GNUC__ && !defined __clang__ && PTRDIFF_MAX < SIZE_MAX 47#if 7 <= __GNUC__ && !defined __clang__ && PTRDIFF_MAX < SIZE_MAX
48# define xalloc_oversized(n, s) \ 48# define xalloc_oversized(n, s) \
49 __builtin_mul_overflow_p (n, s, (ptrdiff_t) 1) 49 __builtin_mul_overflow_p (n, s, (ptrdiff_t) 1)
50#elif 5 <= __GNUC__ && !defined __ICC && PTRDIFF_MAX < SIZE_MAX 50#elif 5 <= __GNUC__ && !defined __clang__ && !defined __ICC \
51 && PTRDIFF_MAX < SIZE_MAX
51# define xalloc_oversized(n, s) \ 52# define xalloc_oversized(n, s) \
52 (__builtin_constant_p (n) && __builtin_constant_p (s) \ 53 (__builtin_constant_p (n) && __builtin_constant_p (s) \
53 ? __xalloc_oversized (n, s) \ 54 ? __xalloc_oversized (n, s) \