]> sjero.net Git - wget/blobdiff - lib/string.in.h
Merge getpass with quote, plus my NEWS entry.
[wget] / lib / string.in.h
index 5c7597cefb1e41b69c21723e001736e19fbe8933..41e765cc2bb3bbd2d1572f84c7e1523796af299a 100644 (file)
@@ -93,6 +93,22 @@ extern void *memrchr (void const *, int, size_t)
      memrchr (a, b, c))
 #endif
 
+/* Find the first occurrence of C in S.  More efficient than
+   memchr(S,C,N), at the expense of undefined behavior if C does not
+   occur within N bytes.  */
+#if @GNULIB_RAWMEMCHR@
+# if ! @HAVE_RAWMEMCHR@
+extern void *rawmemchr (void const *__s, int __c_in)
+  __attribute__ ((__pure__));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef rawmemchr
+# define rawmemchr(a,b) \
+    (GL_LINK_WARNING ("rawmemchr is unportable - " \
+                      "use gnulib module rawmemchr for portability"), \
+     rawmemchr (a, b))
+#endif
+
 /* Copy SRC to DST, returning the address of the terminating '\0' in DST.  */
 #if @GNULIB_STPCPY@
 # if ! @HAVE_STPCPY@