From ec91d8b59d5c8b314bc50cc6feedeeaf6fe3493c Mon Sep 17 00:00:00 2001 From: "\"Steven J. Hill\"" Date: Wed, 23 Aug 2006 03:38:46 +0000 Subject: Merge from trunk. --- libc/string/generic/strchrnul.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libc/string/generic/strchrnul.c') diff --git a/libc/string/generic/strchrnul.c b/libc/string/generic/strchrnul.c index e699a6dfa..17e32ab44 100644 --- a/libc/string/generic/strchrnul.c +++ b/libc/string/generic/strchrnul.c @@ -24,6 +24,7 @@ #include #include +#ifdef __USE_GNU libc_hidden_proto(strchrnul) libc_hidden_proto(abort) @@ -41,8 +42,8 @@ char *strchrnul (const char *s, int c_in) /* Handle the first few characters by reading one character at a time. Do this until CHAR_PTR is aligned on a longword boundary. */ - for (char_ptr = s; ((unsigned long int) char_ptr - & (sizeof (longword) - 1)) != 0; + for (char_ptr = (const unsigned char *) s; + ((unsigned long int) char_ptr & (sizeof (longword) - 1)) != 0; ++char_ptr) if (*char_ptr == c || *char_ptr == '\0') return (void *) char_ptr; @@ -165,3 +166,4 @@ char *strchrnul (const char *s, int c_in) return NULL; } libc_hidden_def(strchrnul) +#endif -- cgit v1.2.3