]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
obstack: use signed chunk sizes
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 5 May 2025 21:02:20 +0000 (14:02 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 5 May 2025 21:16:22 +0000 (14:16 -0700)
* lib/obstack.in.h (_OBSTACK_CHUNK_SIZE_T) [!__GL_GNULIB_HEADER]:
Now long, not unsigned long, since that’s what glibc does.

ChangeLog
lib/obstack.in.h

index 8967f3d54fd2716bc0060e63d048cd78788d5f56..eb0ba5d16615e0bc7bd6d8bf32be41b08fd72669 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2025-05-05  Paul Eggert  <eggert@cs.ucla.edu>
 
+       obstack: use signed chunk sizes
+       * lib/obstack.in.h (_OBSTACK_CHUNK_SIZE_T) [!__GL_GNULIB_HEADER]:
+       Now long, not unsigned long, since that’s what glibc does.
+
        obstack: fix undefined behavior if big alignment
        * lib/obstack.c: Include stddef.h, for offsetof.
        (align_size_up): New static function.
index 232414b6b4c98f60935b69a67ee260da32e99efb..d5a0ceff6d8d974630ef71a66e4f6b8e0378e295 100644 (file)
 /* For backward compatibility, glibc limits object sizes to int range.  */
 # define _OBSTACK_INDEX_T int
 # define _OBSTACK_SIZE_T unsigned int
-# define _OBSTACK_CHUNK_SIZE_T unsigned long
+# define _OBSTACK_CHUNK_SIZE_T long int
 # define _OBSTACK_CAST(type, expr) ((type) (expr))
 # define _OBSTACK_CHUNK_CONTENTS_SIZE 4
 #endif