Browse Source

With the Official Declaration of coff being dead, we can
forget about wrapper functions and just use weak symbols.
-Erik

Eric Andersen 24 years ago
parent
commit
a1f0a08481
1 changed files with 3 additions and 12 deletions
  1. 3 12
      libc/string/string.c

+ 3 - 12
libc/string/string.c

@@ -78,10 +78,7 @@ int strcmp(const char *s1, const char *s2)
 #endif
 
 #ifdef L_strcoll
-int strcoll(const char *s1, const char *s2)
-{
-	return( strcmp(s1, s2));
-}
+__asm__(".weak strcoll; strcoll = strcmp");
 #endif	
 
 /********************** Function strncat ************************************/
@@ -167,10 +164,7 @@ char *strchr(const char *str, int c)
 #endif
 
 #ifdef L_index
-char *index (const char *s, int c)
-{
-	    return( strchr(s, c));
-}
+__asm__(".weak index; index = strchr");
 #endif
 
 /********************** Function strrchr ************************************/
@@ -195,10 +189,7 @@ char *strrchr(const char *str, int c)
 #endif
 
 #ifdef L_rindex
-char *rindex (const char *s, int c)
-{
-	    return( strrchr(s, c));
-}
+__asm__(".weak rindex; rindex = strrchr");
 #endif
 
 /********************** Function strdup ************************************/