diff options
author | Ulrich Drepper <drepper@redhat.com> | 2002-02-03 02:26:37 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2002-02-03 02:26:37 +0000 |
commit | 5c1159b6a9303f5c9f93e8e048d52acc630c2a86 (patch) | |
tree | 2a7f252291a88632101388dd44a6c3786b2f4cb9 /elf | |
parent | b5ef404e0897450bbe1caaff867d8daf40ba0e35 (diff) | |
download | glibc-5c1159b6a9303f5c9f93e8e048d52acc630c2a86.tar glibc-5c1159b6a9303f5c9f93e8e048d52acc630c2a86.tar.gz glibc-5c1159b6a9303f5c9f93e8e048d52acc630c2a86.tar.bz2 glibc-5c1159b6a9303f5c9f93e8e048d52acc630c2a86.zip |
Update.
2002-02-01 H.J. Lu <hjl@gnu.org>
* sysdeps/mips/atomicity.h (exchange_and_add): Use branch
likely.
(atomic_add): Likewise.
(compare_and_swap): Return 0 only when failed to compare. Use
branch likely.
* sysdeps/unix/sysv/linux/mips/sys/tas.h (_test_and_set): Use
branch likely.
2002-02-03 kaz Kojima <kkojima@rr.iij4u.or.jp>
* sysdeps/sh/dl-machine.h (elf_machine_rela): Fix a typo.
2002-02-02 Ulrich Drepper <drepper@redhat.com>
* elf/dl-minimal.c (__strsep): New minimal implementation.
Diffstat (limited to 'elf')
-rw-r--r-- | elf/dl-minimal.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/elf/dl-minimal.c b/elf/dl-minimal.c index 001fc6dcd5..efdc26dc62 100644 --- a/elf/dl-minimal.c +++ b/elf/dl-minimal.c @@ -291,3 +291,45 @@ _itoa (value, buflim, base, upper_case) return bp; } #endif + + +/* The following is not a complete strsep implementation. It cannot + handle empty delimiter strings. But this isn't necessary for the + execution of ld.so. */ +#undef strsep +#undef __strsep +char * +__strsep (char **stringp, const char *delim) +{ + char *begin; + + begin = *stringp; + if (begin != NULL) + { + char *end = begin; + + while (*end != '\0' || (end = NULL)) + { + const char *dp = delim; + + do + if (*dp == *end) + break; + while (*++dp != '\0'); + + if (*dp != '\0') + { + *end++ = '\0'; + break; + } + + ++end; + } + + *stringp = end; + } + + return begin; +} +weak_alias (__strsep, strsep) +strong_alias (__strsep, __strsep_g) |