chiark / gitweb /
[PATCH] klibc: update to version 0.198
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>
Fri, 28 Jan 2005 06:53:22 +0000 (07:53 +0100)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 06:21:58 +0000 (23:21 -0700)
klibc/klibc.spec
klibc/klibc/Makefile
klibc/klibc/fread.c
klibc/klibc/fwrite.c
klibc/klibc/sha1hash.c
klibc/klibc/strncat.c
klibc/version

index 272e52bc1abb0fa3f8fb5761d603c51eb4271bc3..02131c7f259219ff63a0277bd3900f3fb68e2e53 100644 (file)
@@ -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
index d01b2e43269b0c75ce7679bcf61637b7c3488eb8..8a9a68bcf78a28b3b7ece4d31b4e691f2a38ef93 100644 (file)
@@ -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
index 8f7dba9c19f269b77ae7ffdb7c395eeb6fd218fb..a49f0d821088a15dc73599de040cd837cac7c412 100644 (file)
@@ -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;
index 0a73188c67847a50e70fec7e8f4acce9b8050664..ad61c86b886d3cf86fd49549244d07af0c947d8b 100644 (file)
@@ -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;
index f81e08b17c44353f0b4b4998a8584bd6a800a1cb..28e33999675502941375f6c85e7ed7cfaa3bbc3c 100644 (file)
@@ -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;
index 0dd9deb984f1323874d64ef8fb5f0d11e8273387..4d8458d5ec88e44b1d83804251479f76724e6512 100644 (file)
@@ -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;
 }
index 3759b0aad007f9717b8c7edf8f5780b1151a1d5c..129efcc00767ab5574793a4c8415802bc67aeb4d 100644 (file)
@@ -1 +1 @@
-0.196
+0.198