bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/3] xalloc: remove stray includes + dependencies


From: Paul Eggert
Subject: [PATCH 1/3] xalloc: remove stray includes + dependencies
Date: Mon, 10 Oct 2022 18:45:43 -0700

These used to be needed, but are not needed now.
* lib/xalloc.h: Do not include stdlib.h.
[GNULIB_XALLOC]: Do not include "intprops.h".
* lib/xmalloc.c: Include stdint.h here instead, for SIZE_MAX.
* modules/xalloc-die, modules/xvasprintf (Depends-on): Remove stdint.
---
 ChangeLog          | 9 +++++++++
 lib/xalloc.h       | 2 --
 lib/xmalloc.c      | 1 +
 modules/xalloc-die | 1 -
 modules/xvasprintf | 1 -
 5 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 74b496ddee..c918d0e45e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2022-10-10  Paul Eggert  <eggert@cs.ucla.edu>
+
+       xalloc: remove stray includes + dependencies
+       These used to be needed, but are not needed now.
+       * lib/xalloc.h: Do not include stdlib.h.
+       [GNULIB_XALLOC]: Do not include "intprops.h".
+       * lib/xmalloc.c: Include stdint.h here instead, for SIZE_MAX.
+       * modules/xalloc-die, modules/xvasprintf (Depends-on): Remove stdint.
+
 2022-09-30  Paul Eggert  <eggert@cs.ucla.edu>
 
        assert-h: suppress Apple clang 13 false alarms
diff --git a/lib/xalloc.h b/lib/xalloc.h
index 9f4bf8d454..01a9eec8da 100644
--- a/lib/xalloc.h
+++ b/lib/xalloc.h
@@ -20,11 +20,9 @@
 
 #include <stddef.h>
 #include <stdlib.h>
-#include <stdint.h>
 
 #if GNULIB_XALLOC
 # include "idx.h"
-# include "intprops.h"
 #endif
 
 #ifndef _GL_INLINE_HEADER_BEGIN
diff --git a/lib/xmalloc.c b/lib/xmalloc.c
index 3c3cb20799..84cdf1f2fd 100644
--- a/lib/xmalloc.c
+++ b/lib/xmalloc.c
@@ -26,6 +26,7 @@
 
 #include <stdckdint.h>
 #include <stdlib.h>
+#include <stdint.h>
 #include <string.h>
 
 static void * _GL_ATTRIBUTE_PURE
diff --git a/modules/xalloc-die b/modules/xalloc-die
index e8ef52abe8..177b68eb2e 100644
--- a/modules/xalloc-die
+++ b/modules/xalloc-die
@@ -10,7 +10,6 @@ error
 extern-inline
 gettext-h
 exitfail
-stdint
 
 configure.ac:
 gl_MODULE_INDICATOR([xalloc-die])
diff --git a/modules/xvasprintf b/modules/xvasprintf
index ae233148d3..4ebbba470a 100644
--- a/modules/xvasprintf
+++ b/modules/xvasprintf
@@ -15,7 +15,6 @@ xalloc
 xalloc-die
 xsize
 stdarg
-stdint
 errno
 
 configure.ac:
-- 
2.37.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]