[PATCH] klibc: update to version 0.196
This commit is contained in:
committed by
Greg KH
parent
5178355672
commit
c3a8dac6ff
+1
-1
@@ -1,5 +1,5 @@
|
||||
VERSION := $(shell cat version)
|
||||
SUBDIRS = klibc
|
||||
SUBDIRS = klibc ash ipconfig nfsmount utils kinit gzip
|
||||
|
||||
all:
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
__extern void *memccpy(void *, const void *, int, size_t);
|
||||
__extern void *memchr(const void *, int, size_t);
|
||||
__extern void *memrchr(const void *, int, size_t);
|
||||
__extern int memcmp(const void *, const void *, size_t);
|
||||
__extern void *memcpy(void *, const void *, size_t);
|
||||
__extern void *memmove(void *, const void *, size_t);
|
||||
@@ -20,6 +21,7 @@ __extern int strcasecmp(const char *, const char *);
|
||||
__extern int strncasecmp(const char *, const char *, size_t);
|
||||
__extern char *strcat(char *, const char *);
|
||||
__extern char *strchr(const char *, int);
|
||||
__extern char *strrchr(const char *, int);
|
||||
__extern int strcmp(const char *, const char *);
|
||||
__extern char *strcpy(char *, const char *);
|
||||
__extern size_t strcspn(const char *, const char *);
|
||||
@@ -34,7 +36,6 @@ __extern int strncmp(const char *, const char *, size_t);
|
||||
__extern char *strncpy(char *, const char *, size_t);
|
||||
__extern size_t strlcpy(char *, const char *, size_t);
|
||||
__extern char *strpbrk(const char *, const char *);
|
||||
__extern char *strrchr(const char *, int);
|
||||
__extern char *strsep(char **, const char *);
|
||||
__extern size_t strspn(const char *, const char *);
|
||||
__extern char *strstr(const char *, const char *);
|
||||
|
||||
@@ -30,7 +30,7 @@ LIBOBJS = vsnprintf.o snprintf.o vsprintf.o sprintf.o \
|
||||
sigaction.o sigpending.o sigprocmask.o sigsuspend.o \
|
||||
brk.o sbrk.o malloc.o realloc.o calloc.o mmap.o \
|
||||
memcpy.o memcmp.o memset.o memccpy.o memmem.o memswap.o \
|
||||
memmove.o memchr.o \
|
||||
memmove.o memchr.o memrchr.o \
|
||||
strcasecmp.o strncasecmp.o strndup.o strerror.o \
|
||||
strcat.o strchr.o strcmp.o strcpy.o strdup.o strlen.o strnlen.o \
|
||||
strncat.o strlcpy.o strlcat.o \
|
||||
|
||||
@@ -51,6 +51,7 @@ int getopt(int argc, char * const *argv, const char *optstring)
|
||||
optind += 2;
|
||||
} else {
|
||||
/* Missing argument */
|
||||
optind++;
|
||||
return (optstring[0] == ':') ? ':' : '?';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ void *memchr(const void *s, int c, size_t n)
|
||||
while ( n-- ) {
|
||||
if ( *sp == (unsigned char)c )
|
||||
return (void *)sp;
|
||||
sp++;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* memrchr.c
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
|
||||
void *memrchr(const void *s, int c, size_t n)
|
||||
{
|
||||
const unsigned char *sp =
|
||||
(const unsigned char *)s + n - 1;
|
||||
|
||||
while ( n-- ) {
|
||||
if ( *sp == (unsigned char)c )
|
||||
return (void *)sp;
|
||||
sp--;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
+1
-1
@@ -1 +1 @@
|
||||
0.194
|
||||
0.196
|
||||
|
||||
Reference in New Issue
Block a user