summaryrefslogtreecommitdiff
path: root/sysdeps/i386/i486/bits/string.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/i386/i486/bits/string.h')
-rw-r--r--sysdeps/i386/i486/bits/string.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/sysdeps/i386/i486/bits/string.h b/sysdeps/i386/i486/bits/string.h
index 80fcc48a2b..210bf7f745 100644
--- a/sysdeps/i386/i486/bits/string.h
+++ b/sysdeps/i386/i486/bits/string.h
@@ -979,12 +979,14 @@ __strchr_g (__const char *__s, int __c)
}
+#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
/* Find the first occurrence of C in S. This is the BSD name. */
-#define _HAVE_STRING_ARCH_index 1
-#define index(s, c) \
+# define _HAVE_STRING_ARCH_index 1
+# define index(s, c) \
(__extension__ (__builtin_constant_p (c) \
? __strchr_c (s, ((c) & 0xff) << 8) \
: __strchr_g (s, c)))
+#endif
/* Find the last occurrence of C in S. */
@@ -1075,12 +1077,14 @@ __strrchr_g (__const char *__s, int __c)
#endif
+#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
/* Find the last occurrence of C in S. This is the BSD name. */
-#define _HAVE_STRING_ARCH_rindex 1
-#define rindex(s, c) \
+# define _HAVE_STRING_ARCH_rindex 1
+# define rindex(s, c) \
(__extension__ (__builtin_constant_p (c) \
? __strrchr_c (s, ((c) & 0xff) << 8) \
: __strrchr_g (s, c)))
+#endif
/* Return the length of the initial segment of S which