bug-gnulib
[Top][All Lists]
Advanced

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

memrchr on cygwin


From: Eric Blake
Subject: memrchr on cygwin
Date: Mon, 29 Jan 2007 22:02:31 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

memrchr.c used size_t without pulling in the right headers:

gcc -std=gnu99  -I.   -I/usr/local/include   -g2 -Wall -Werror -MT memrchr.o -
MD -MP -MF .deps/memrchr.Tpo -c -o memrchr.o memrchr.c
memrchr.c:45: error: parse error before "size_t"
memrchr.c: In function `memrchr':
memrchr.c:53: error: `c_in' undeclared (first use in this function)
memrchr.c:53: error: (Each undeclared identifier is reported only once
memrchr.c:53: error: for each function it appears in.)
memrchr.c:57: error: `s' undeclared (first use in this function)
memrchr.c:57: error: `n' undeclared (first use in this function)
memrchr.c:58: error: `size_t' undeclared (first use in this function)
memrchr.c:58: error: parse error before "char_ptr"
memrchr.c:59: error: parse error before ')' token
make[1]: *** [memrchr.o] Error 1

OK to apply this?

2007-01-29  Eric Blake  <address@hidden>

        * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
        size_t as needed.

Index: lib/memrchr.c
===================================================================
RCS file: /sources/gnulib/gnulib/lib/memrchr.c,v
retrieving revision 1.9
diff -u -r1.9 memrchr.c
--- lib/memrchr.c       26 Jan 2007 22:16:55 -0000      1.9
+++ lib/memrchr.c       29 Jan 2007 22:01:40 -0000
@@ -24,13 +24,13 @@
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 #if defined _LIBC
-# include <string.h>
 # include <memcopy.h>
 #else
 # include <config.h>
 # define reg_char char
 #endif
 
+#include <string.h>
 #include <limits.h>
 
 #undef __memrchr






reply via email to

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