diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-08-11 04:08:41 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-08-11 04:08:41 +0000 |
commit | 51ff0f67c733ac9dd1ad405978fe1d7f1141c250 (patch) | |
tree | f7d24b7fce2a5fc1c6ab596a822f1da29072674e /ldso/ldso/ld_string.h | |
parent | 8da741f7d0f39a7c9c122b6318520c6e1975db19 (diff) |
Fix the library searching routine so it is way simpler, and so
it matches the routine in ldd.c
Diffstat (limited to 'ldso/ldso/ld_string.h')
-rw-r--r-- | ldso/ldso/ld_string.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/ldso/ldso/ld_string.h b/ldso/ldso/ld_string.h index fcdb8768b..b94b1c5f9 100644 --- a/ldso/ldso/ld_string.h +++ b/ldso/ldso/ld_string.h @@ -11,6 +11,7 @@ extern void _dl_dprintf(int, const char *, ...); static size_t _dl_strlen(const char * str); +static char *_dl_strcat(char *dst, const char *src); static char * _dl_strcpy(char * dst,const char *src); static int _dl_strcmp(const char * s1,const char * s2); static int _dl_strncmp(const char * s1,const char * s2,size_t len); @@ -18,7 +19,7 @@ static char * _dl_strchr(const char * str,int c); static char *_dl_strrchr(const char *str, int c); static void * _dl_memcpy(void * dst, const void * src, size_t len); static int _dl_memcmp(const void * s1,const void * s2,size_t len); -static void * _dl_memset(void * str,int c,size_t len); +static void *_dl_memset(void * str,int c,size_t len); static char *_dl_get_last_path_component(char *path); static char *_dl_simple_ltoa(char * local, unsigned long i); static char *_dl_simple_ltoahex(char * local, unsigned long i); @@ -36,6 +37,20 @@ static inline size_t _dl_strlen(const char * str) return (ptr - str); } +static inline char *_dl_strcat(char *dst, const char *src) +{ + register char *ptr = dst; + + while (*ptr) + ptr++; + + while (*src) + *ptr++ = *src++; + *ptr = '\0'; + + return dst; +} + static inline char * _dl_strcpy(char * dst,const char *src) { register char *ptr = dst; |