From 13e14a6bfd9f29cbfeab0c5161d2a994f97532e7 Mon Sep 17 00:00:00 2001
From: Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>
Date: Thu, 26 Mar 2026 12:53:53 +0100
Subject: Update/gnulib 2026 03 (#2247)
* Sync with the 202601-stable Gnulib code (4a3650d887)
* Ignore more deps stuff in gnulib
* Remove autogenerated gnulib files
* Ignore more gnulib generated headers
---
gl/xmalloc.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
(limited to 'gl/xmalloc.c')
diff --git a/gl/xmalloc.c b/gl/xmalloc.c
index 8a715807..6adc43c0 100644
--- a/gl/xmalloc.c
+++ b/gl/xmalloc.c
@@ -1,6 +1,6 @@
/* xmalloc.c -- malloc with out of memory checking
- Copyright (C) 1990-2000, 2002-2006, 2008-2025 Free Software Foundation, Inc.
+ Copyright (C) 1990-2000, 2002-2006, 2008-2026 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -15,10 +15,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see . */
-#include
-
#define XALLOC_INLINE _GL_EXTERN_INLINE
-
+#include
#include "xalloc.h"
#include "ialloc.h"
@@ -29,7 +27,13 @@
#include
#include
-static void * _GL_ATTRIBUTE_PURE
+/* Pacify GCC up to at least 15.2, which otherwise would incorrectly
+ complain about check_nonnull. */
+#if _GL_GNUC_PREREQ (4, 6)
+# pragma GCC diagnostic ignored "-Wsuggest-attribute=pure"
+#endif
+
+static void *
check_nonnull (void *p)
{
if (!p)
@@ -224,13 +228,13 @@ x2nrealloc (void *p, size_t *pn, size_t s)
void *
xpalloc (void *pa, idx_t *pn, idx_t n_incr_min, ptrdiff_t n_max, idx_t s)
{
- idx_t n0 = *pn;
-
/* The approximate size to use for initial small allocation
requests. This is the largest "small" request for the GNU C
library malloc. */
enum { DEFAULT_MXFAST = 64 * sizeof (size_t) / 4 };
+ idx_t n0 = *pn;
+
/* If the array is tiny, grow it to about (but no greater than)
DEFAULT_MXFAST bytes. Otherwise, grow it by about 50%.
Adjust the growth according to three constraints: N_INCR_MIN,
--
cgit v1.2.3-74-g34f1