summaryrefslogtreecommitdiff
path: root/lib/string.in.h
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2009-06-19 13:01:11 +0200
committerAndy Wingo <wingo@pobox.com>2009-06-19 13:01:11 +0200
commitffca4c2203d85bc4d9e348d77053d21112e665af (patch)
tree74de2f6d886c455186ad1ebb412d10dc30c914cb /lib/string.in.h
parent5b55e29320449c8c68112129e1cadbfa7944af11 (diff)
downloadguile-ffca4c2203d85bc4d9e348d77053d21112e665af.tar.gz
gnulib-tool --import canonicalize-lgpl
Diffstat (limited to 'lib/string.in.h')
-rw-r--r--lib/string.in.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/lib/string.in.h b/lib/string.in.h
index ca029d7c0..fe1142562 100644
--- a/lib/string.in.h
+++ b/lib/string.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <string.h>.
- Copyright (C) 1995-1996, 2001-2008 Free Software Foundation, Inc.
+ Copyright (C) 1995-1996, 2001-2009 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -49,6 +49,21 @@ extern "C" {
#endif
+/* Return the first instance of C within N bytes of S, or NULL. */
+#if @GNULIB_MEMCHR@
+# if @REPLACE_MEMCHR@
+# define memchr rpl_memchr
+extern void *memchr (void const *__s, int __c, size_t __n)
+ __attribute__ ((__pure__));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef memchr
+# define memchr(s,c,n) \
+ (GL_LINK_WARNING ("memchr has platform-specific bugs - " \
+ "use gnulib module memchr for portability" ), \
+ memchr (s, c, n))
+#endif
+
/* Return the first occurrence of NEEDLE in HAYSTACK. */
#if @GNULIB_MEMMEM@
# if @REPLACE_MEMMEM@