From 43ca395e49c854b6c3bb9abb633e9e072e5df793 Mon Sep 17 00:00:00 2001 From: "kay.sievers@vrfy.org" Date: Fri, 28 Jan 2005 07:53:22 +0100 Subject: [PATCH] [PATCH] klibc: update to version 0.198 --- klibc/klibc.spec | 2 +- klibc/klibc/Makefile | 2 +- klibc/klibc/fread.c | 5 +++-- klibc/klibc/fwrite.c | 7 ++++--- klibc/klibc/sha1hash.c | 2 +- klibc/klibc/strncat.c | 6 ++---- klibc/version | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/klibc/klibc.spec b/klibc/klibc.spec index 272e52bc..02131c7f 100644 --- a/klibc/klibc.spec +++ b/klibc/klibc.spec @@ -1,6 +1,6 @@ Summary: A minimal libc subset for use with initramfs. Name: klibc -Version: 0.194 +Version: 0.198 Release: 1 License: BSD/GPL Group: Development/Libraries diff --git a/klibc/klibc/Makefile b/klibc/klibc/Makefile index d01b2e43..8a9a68bc 100644 --- a/klibc/klibc/Makefile +++ b/klibc/klibc/Makefile @@ -59,7 +59,7 @@ LIB = libc.a INTERP_O = interp.o -all: tests $(CRT0) $(LIB) $(SOLIB) klibc.so +all: tests $(CRT0) $(LIB) $(SOLIB) $(SOHASH) $(INTERP_O) # Add any architecture-specific rules include arch/$(ARCH)/Makefile.inc diff --git a/klibc/klibc/fread.c b/klibc/klibc/fread.c index 8f7dba9c..a49f0d82 100644 --- a/klibc/klibc/fread.c +++ b/klibc/klibc/fread.c @@ -15,9 +15,10 @@ size_t _fread(void *buf, size_t count, FILE *f) while ( count ) { rv = read(fileno(f), p, count); if ( rv == -1 ) { - if ( errno == EINTR ) + if ( errno == EINTR ) { + errno = 0; continue; - else + } else break; } else if ( rv == 0 ) { break; diff --git a/klibc/klibc/fwrite.c b/klibc/klibc/fwrite.c index 0a73188c..ad61c86b 100644 --- a/klibc/klibc/fwrite.c +++ b/klibc/klibc/fwrite.c @@ -15,9 +15,10 @@ size_t _fwrite(const void *buf, size_t count, FILE *f) while ( count ) { rv = write(fileno(f), p, count); if ( rv == -1 ) { - if ( errno == EINTR ) - continue; - else + if ( errno == EINTR ) { + errno = 0; + continue; + } else break; } else if ( rv == 0 ) { break; diff --git a/klibc/klibc/sha1hash.c b/klibc/klibc/sha1hash.c index f81e08b1..28e33999 100644 --- a/klibc/klibc/sha1hash.c +++ b/klibc/klibc/sha1hash.c @@ -263,7 +263,7 @@ unsigned char finalcount[8]; char *mybase64(uint8_t digest[20]) { static const char charz[] = - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+_"; + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"; uint8_t input[21]; static char output[28]; int i, j; diff --git a/klibc/klibc/strncat.c b/klibc/klibc/strncat.c index 0dd9deb9..4d8458d5 100644 --- a/klibc/klibc/strncat.c +++ b/klibc/klibc/strncat.c @@ -12,14 +12,12 @@ char *strncat(char *dst, const char *src, size_t n) char ch; size_t nn = q-dst; - if ( __likely(nn <= n) ) - n -= nn; - while (n--) { *q++ = ch = *p++; if ( !ch ) - break; + return dst; } + *q = '\0'; return dst; } diff --git a/klibc/version b/klibc/version index 3759b0aa..129efcc0 100644 --- a/klibc/version +++ b/klibc/version @@ -1 +1 @@ -0.196 +0.198 -- 2.39.5