diff options
Diffstat (limited to 'string')
-rw-r--r-- | string/Makefile | 2 | ||||
-rw-r--r-- | string/Versions | 2 | ||||
-rw-r--r-- | string/strfry.c | 4 | ||||
-rw-r--r-- | string/string.h | 6 |
4 files changed, 10 insertions, 4 deletions
diff --git a/string/Makefile b/string/Makefile index ebdaad85ba..d0e3c8e83b 100644 --- a/string/Makefile +++ b/string/Makefile @@ -34,7 +34,7 @@ routines := strcat strchr strcmp strcoll strcpy strcspn \ mempcpy bcopy bzero ffs ffsll stpcpy stpncpy \ strcasecmp strncase strcasecmp_l strncase_l \ memccpy memcpy wordcopy strsep strcasestr \ - swab strfry memfrob memmem rawmemchr \ + swab strfry memfrob memmem rawmemchr strchrnul \ $(addprefix argz-,append count create ctsep next \ delete extract insert stringify \ addsep replace) \ diff --git a/string/Versions b/string/Versions index fa599fcb59..48562e9e4c 100644 --- a/string/Versions +++ b/string/Versions @@ -58,6 +58,6 @@ libc { } GLIBC_2.1.1 { # s* - __strverscmp; + strchrnul; __strverscmp; } } diff --git a/string/strfry.c b/string/strfry.c index 98aa71aa3f..c13b3da979 100644 --- a/string/strfry.c +++ b/string/strfry.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1996 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1996, 1999 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 @@ -23,7 +23,7 @@ char * strfry (char *string) { - static int init = 0; + static int init; static struct random_data rdata; size_t len, i; diff --git a/string/string.h b/string/string.h index 766913a620..6c913a85c6 100644 --- a/string/string.h +++ b/string/string.h @@ -147,6 +147,12 @@ extern char *strchr __P ((__const char *__s, int __c)); /* Find the last occurrence of C in S. */ extern char *strrchr __P ((__const char *__s, int __c)); +#ifdef __USE_GNU +/* This funciton is similar to `strchr'. But it returns a pointer to + the closing NUL byte in case C is not found in S. */ +extern char *strchrnul __P ((__const char *__s, int __c)); +#endif + /* Return the length of the initial segment of S which consists entirely of characters not in REJECT. */ extern size_t strcspn __P ((__const char *__s, __const char *__reject)); |