Add missing C func to link
This commit is contained in:
parent
55f206e2cd
commit
6f5b771b7d
1 changed files with 15 additions and 0 deletions
|
@ -66,3 +66,18 @@ char *strcpy(char *dest, const char *src)
|
|||
/* nothing */;
|
||||
return tmp;
|
||||
}
|
||||
|
||||
int strcmp(const char *cs, const char *ct)
|
||||
{
|
||||
unsigned char c1, c2;
|
||||
|
||||
while (1) {
|
||||
c1 = *cs++;
|
||||
c2 = *ct++;
|
||||
if (c1 != c2)
|
||||
return c1 < c2 ? -1 : 1;
|
||||
if (!c1)
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue