about summary refs log tree commit diff
path: root/string/strcasestr.c
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim@codesourcery.com>2012-05-28 22:50:15 -0700
committerMaxim Kuvyrkov <maxim@codesourcery.com>2012-08-21 18:07:47 -0700
commit400726deef57d8da8d6c7cd5c8e7891eaabab041 (patch)
tree73509a99d4f1d1e11afd525300e496119865e431 /string/strcasestr.c
parent20a71f2c8ab45b458416422af2eec2b7bc52f66b (diff)
downloadglibc-400726deef57d8da8d6c7cd5c8e7891eaabab041.tar.gz
glibc-400726deef57d8da8d6c7cd5c8e7891eaabab041.tar.xz
glibc-400726deef57d8da8d6c7cd5c8e7891eaabab041.zip
Detect EOL on-the-fly in strstr, strcasestr and memmem.
Diffstat (limited to 'string/strcasestr.c')
-rw-r--r--string/strcasestr.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/string/strcasestr.c b/string/strcasestr.c
index 9e1bde97ae..184ca68deb 100644
--- a/string/strcasestr.c
+++ b/string/strcasestr.c
@@ -1,6 +1,5 @@
 /* Return the offset of one string within another.
-   Copyright (C) 1994, 1996-2000, 2004, 2008, 2009, 2010
-   Free Software Foundation, Inc.
+   Copyright (C) 1994-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -44,6 +43,9 @@
 #define AVAILABLE(h, h_l, j, n_l)			\
   (!memchr ((h) + (h_l), '\0', (j) + (n_l) - (h_l))	\
    && ((h_l) = (j) + (n_l)))
+#define AVAILABLE1(h, h_l, j, n_l) (true)
+#define AVAILABLE2(h, h_l, j, n_l) AVAILABLE (h, h_l, j, n_l)
+#define RET0_IF_0(a) if (!a) goto ret0
 #define CANON_ELEMENT(c) TOLOWER (c)
 #define CMP_FUNC(p1, p2, l)				\
   __strncasecmp ((const char *) (p1), (const char *) (p2), l)