]> Savannah Git Hosting - gnulib.git/commitdiff
rawmemchr: Fix use in relocatable-prog-wrapper (regression 2021-08-20).
authorBruno Haible <bruno@clisp.org>
Sat, 21 Aug 2021 22:32:40 +0000 (00:32 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 21 Aug 2021 22:32:40 +0000 (00:32 +0200)
* lib/rawmemchr.c: Restore test of HAVE_RAWMEMCHR.
* modules/relocatable-prog-wrapper (Depends-on): Add stdalign.

ChangeLog
lib/rawmemchr.c
modules/relocatable-prog-wrapper

index bf6c9d66bd377bc73e6a8b7a79dc61edba780986..a0a20e496f2e120706b0e6f26b90960d3d0eaee8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2021-08-21  Bruno Haible  <bruno@clisp.org>
+
+       rawmemchr: Fix use in relocatable-prog-wrapper (regression 2021-08-20).
+       * lib/rawmemchr.c: Restore test of HAVE_RAWMEMCHR.
+       * modules/relocatable-prog-wrapper (Depends-on): Add stdalign.
+
 2021-08-20  Paul Eggert  <eggert@cs.ucla.edu>
 
        rawmemchr: modernize and simplify
index 469bfa3cd6c92724991ef09bddfbc7bad304184d..e7a00b80306284964a5b41f6a989a3317a024dd9 100644 (file)
 /* Specification.  */
 #include <string.h>
 
-#include <limits.h>
-#include <stdalign.h>
-#include <stdint.h>
+/* A function definition is only needed if HAVE_RAWMEMCHR is not defined.  */
+#if !HAVE_RAWMEMCHR
 
-#include "verify.h"
+# include <limits.h>
+# include <stdalign.h>
+# include <stdint.h>
+
+# include "verify.h"
 
 /* Find the first occurrence of C in S.  */
 void *
@@ -118,3 +121,5 @@ rawmemchr (const void *s, int c_in)
     char_ptr++;
   return (void *) char_ptr;
 }
+
+#endif
index d816033ee4e366bd0778d591f17a0eda03d0466d..fa56916217866fb8b00dec813bb4413608770a7b 100644 (file)
@@ -64,6 +64,7 @@ largefile
 libc-config
 pathmax
 ssize_t
+stdalign
 stdbool
 stddef
 stdint