- updated to CVS snapshot 20080221; removed most of the last patches as
they are now in upstream
This commit is contained in:
parent
a030bf001f
commit
443db2fb7c
6 changed files with 1 additions and 422 deletions
|
|
@ -1,46 +0,0 @@
|
|||
diff -up dietlibc-0.31.20080212/test/printf.c.~1~ dietlibc-0.31.20080212/test/printf.c
|
||||
--- dietlibc-0.31.20080212/test/printf.c.~1~ 2004-01-07 16:06:48.000000000 +0100
|
||||
+++ dietlibc-0.31.20080212/test/printf.c 2008-02-13 17:25:35.000000000 +0100
|
||||
@@ -38,7 +38,8 @@
|
||||
#define TEST_SNPRINTF(EXP,SZ, ...) \
|
||||
{ \
|
||||
volatile char * args[] = { EXP, #SZ }; \
|
||||
- int test_sz=MIN((SZ),sizeof(EXP))-1; \
|
||||
+ ssize_t test_sz=MIN((SZ),sizeof(EXP))-1; \
|
||||
+ (void)args; \
|
||||
TEST_INIT(EXP); \
|
||||
rc=snprintf(buf+ALGN,(SZ),__VA_ARGS__); \
|
||||
TEST_CHECK(EXP, test_sz); \
|
||||
@@ -80,6 +80,7 @@ int main()
|
||||
|
||||
TEST("foobar", "%s", "foobar");
|
||||
TEST("01.23", "%05.2f", 1.23);
|
||||
+ TEST("001.2", "%05.2g", 1.23);
|
||||
|
||||
TEST("42", "%i", 42);
|
||||
TEST("", "%.0i", 0);
|
||||
@@ -111,6 +112,24 @@ int main()
|
||||
|
||||
TEST("0x1", "%#x", 1);
|
||||
|
||||
+ TEST("abcX", "%2sX", "abc");
|
||||
+ TEST("abcX", "%-2sX", "abc");
|
||||
+
|
||||
+ TEST("001234", "%.6u", 1234);
|
||||
+ TEST("-001234", "%.6i", -1234);
|
||||
+ TEST(" 1234", "%6u", 1234);
|
||||
+ TEST(" -1234", "%6i", -1234);
|
||||
+ TEST("001234", "%06u", 1234);
|
||||
+ TEST("-01234", "%06i", -1234);
|
||||
+ TEST("1234 ", "%-6u", 1234);
|
||||
+ TEST("-1234 ", "%-6i", -1234);
|
||||
+ TEST("1234", "%.6s", "1234");
|
||||
+ TEST(" 1234", "%6s", "1234");
|
||||
+ TEST("1234 ", "%-6s", "1234");
|
||||
+ TEST(" 01234", "%6.5u", 1234);
|
||||
+ TEST("-01234", "%6.5i", -1234);
|
||||
+ TEST(" 1234", "%6.5s", "1234");
|
||||
+
|
||||
#ifdef XSI_TESTS
|
||||
setlocale(LC_ALL, "de_DE");
|
||||
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
diff -up dietlibc-0.31.20080212/test/printf.c.~1~ dietlibc-0.31.20080212/test/printf.c
|
||||
diff -up dietlibc-0.31.20080212/lib/__v_printf.c.~1~ dietlibc-0.31.20080212/lib/__v_printf.c
|
||||
--- dietlibc-0.31.20080212/lib/__v_printf.c.~1~ 2008-02-13 15:42:52.000000000 +0100
|
||||
+++ dietlibc-0.31.20080212/lib/__v_printf.c 2008-02-13 17:26:13.000000000 +0100
|
||||
@@ -222,7 +222,7 @@ print_out:
|
||||
|
||||
if (flag_dot && width==0) width=preci;
|
||||
if (!flag_dot) preci=sz;
|
||||
- if (!flag_left) { /* do left-side padding */
|
||||
+ if (!flag_left && padwith==' ') { /* do left-side padding with spaces */
|
||||
if (write_pad(&len,fn,width-preci,padwith))
|
||||
return -1;
|
||||
}
|
||||
@@ -230,6 +230,10 @@ print_out:
|
||||
B_WRITE(fn,sign,todo);
|
||||
len+=todo;
|
||||
}
|
||||
+ if (!flag_left && padwith!=' ') { /* do left-side padding with '0' */
|
||||
+ if (write_pad(&len,fn,width-preci,padwith))
|
||||
+ return -1;
|
||||
+ }
|
||||
/* do preci padding */
|
||||
if (write_pad(&len,fn,preci-sz,precpadwith))
|
||||
return -1;
|
||||
@@ -385,7 +389,7 @@ num_printf:
|
||||
|
||||
sz=strlen(s);
|
||||
if (width<sz) width=sz;
|
||||
- padwith='0';
|
||||
+ precpadwith='0';
|
||||
flag_dot=0;
|
||||
flag_hash=0;
|
||||
goto print_out;
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
diff -upN dietlibc-0.31.20080212/lib/strcpy.c.strend dietlibc-0.31.20080212/lib/strcpy.c
|
||||
--- dietlibc-0.31.20080212/lib/strcpy.c.strend 2008-02-14 22:48:00.000000000 +0100
|
||||
+++ dietlibc-0.31.20080212/lib/strcpy.c 2008-02-14 22:48:00.000000000 +0100
|
||||
@@ -26,8 +26,7 @@ strcpy (char *s1, const char *s2)
|
||||
while (1) {
|
||||
l = *(const unsigned long *) s2;
|
||||
if (((l - MKW(0x1ul)) & ~l) & MKW(0x80ul)) {
|
||||
- unsigned char c;
|
||||
- while ((*s1++ = (l & 0xff))) l>>=8;
|
||||
+ while ((*s1++ = GFC(l))) INCSTR(l);
|
||||
return (res);
|
||||
}
|
||||
*(unsigned long *) s1 = l;
|
||||
diff -upN dietlibc-0.31.20080212/lib/strcmp.c.strend dietlibc-0.31.20080212/lib/strcmp.c
|
||||
--- dietlibc-0.31.20080212/lib/strcmp.c.strend 2008-02-14 22:48:00.000000000 +0100
|
||||
+++ dietlibc-0.31.20080212/lib/strcmp.c 2008-02-14 23:02:14.000000000 +0100
|
||||
@@ -35,12 +35,12 @@ strcmp (const char *s1, const char *s2)
|
||||
((((l2 - MKW(0x1ul)) & ~l2) & MKW(0x80ul))) || l1 != l2) {
|
||||
unsigned char c1, c2;
|
||||
while (1) {
|
||||
- c1 = l1 & 0xff;
|
||||
- c2 = l2 & 0xff;
|
||||
+ c1 = GFC(l1);
|
||||
+ c2 = GFC(l2);
|
||||
if (!c1 || c1 != c2)
|
||||
return (c1 - c2);
|
||||
- l1 >>= 8;
|
||||
- l2 >>= 8;
|
||||
+ INCSTR(l1);
|
||||
+ INCSTR(l2);
|
||||
}
|
||||
}
|
||||
}
|
||||
diff -upN dietlibc-0.31.20080212/dietstring.h.strend dietlibc-0.31.20080212/dietstring.h
|
||||
--- dietlibc-0.31.20080212/dietstring.h.strend 2003-12-21 13:06:36.000000000 +0100
|
||||
+++ dietlibc-0.31.20080212/dietstring.h 2008-02-14 23:03:51.000000000 +0100
|
||||
@@ -11,6 +11,16 @@
|
||||
# define STRALIGN(x) (((unsigned long)x&3)?4-((unsigned long)x&3):0)
|
||||
#endif
|
||||
|
||||
+/* GFC(x) - returns first character */
|
||||
+/* INCSTR(x) - moves to next character */
|
||||
+#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
+# define GFC(x) ((x)&0xff)
|
||||
+# define INCSTR(x) do { x >>= 8; } while (0)
|
||||
+#else
|
||||
+# define GFC(x) (((x)>>(sizeof(x)*8-8))&0xff)
|
||||
+# define INCSTR(x) do { x <<= 8; } while (0)
|
||||
+#endif
|
||||
+
|
||||
#define UNALIGNED(x,y) (((unsigned long)x & (sizeof (unsigned long)-1)) ^ ((unsigned long)y & (sizeof (unsigned long)-1)))
|
||||
|
||||
#endif /* _DIET_STRING_H_ */
|
||||
|
|
@ -1,263 +0,0 @@
|
|||
diff -upN dietlibc-0.31.20080212/x86_64/strlen.c.strlen dietlibc-0.31.20080212/x86_64/strlen.c
|
||||
--- dietlibc-0.31.20080212/x86_64/strlen.c.strlen 2007-10-04 18:19:15.000000000 +0200
|
||||
+++ dietlibc-0.31.20080212/x86_64/strlen.c 1970-01-01 01:00:00.000000000 +0100
|
||||
@@ -1 +0,0 @@
|
||||
-#include "alpha/strlen.c"
|
||||
diff -upN dietlibc-0.31.20080212/test/string/strlen.c.strlen dietlibc-0.31.20080212/test/string/strlen.c
|
||||
--- dietlibc-0.31.20080212/test/string/strlen.c.strlen 2003-12-15 14:07:42.000000000 +0100
|
||||
+++ dietlibc-0.31.20080212/test/string/strlen.c 2008-02-14 20:01:08.000000000 +0100
|
||||
@@ -1,10 +1,35 @@
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
+#include <endian.h>
|
||||
+
|
||||
+/* make it large enough to test all possible alignments, number of trailing
|
||||
+ * bytes and word sizes */
|
||||
+#define BUFLEN (__WORDSIZE/8 * 4)
|
||||
|
||||
int main() {
|
||||
- const char* x="foo bar baz";
|
||||
+ /* will hold the string, the trailing zero and a test pattern */
|
||||
+ char buf[BUFLEN + 1 + __WORDSIZE/8];
|
||||
+ size_t len;
|
||||
+
|
||||
assert(strlen("")==0);
|
||||
- assert(strlen(x)==11);
|
||||
- assert(strlen(x+5)==6);
|
||||
+
|
||||
+ for (len=0; len<BUFLEN; ++len) {
|
||||
+ unsigned int mask;
|
||||
+
|
||||
+ buf[len] = len%10 + '0';
|
||||
+ buf[len+1] = '\0';
|
||||
+
|
||||
+ for (mask=0; mask<(1u<<__WORDSIZE/8); ++mask) {
|
||||
+ size_t bit;
|
||||
+ size_t i;
|
||||
+
|
||||
+ for (bit=0; bit<__WORDSIZE/8; ++bit)
|
||||
+ buf[len+2+bit] = (mask & (1u<<bit)) ? 0xff : 0;
|
||||
+
|
||||
+ for (i=0; i<=len; ++i)
|
||||
+ assert(strlen(buf+i)==len+1-i);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
diff -upN dietlibc-0.31.20080212/test/strlen.c.strlen dietlibc-0.31.20080212/test/strlen.c
|
||||
--- dietlibc-0.31.20080212/test/strlen.c.strlen 2007-11-17 15:29:53.000000000 +0100
|
||||
+++ dietlibc-0.31.20080212/test/strlen.c 1970-01-01 01:00:00.000000000 +0100
|
||||
@@ -1,11 +0,0 @@
|
||||
-#include <assert.h>
|
||||
-#include <string.h>
|
||||
-
|
||||
-int main() {
|
||||
- const char* x="foo bar baz";
|
||||
- size_t i;
|
||||
- assert(strlen("")==0);
|
||||
- for (i=0; i<11; ++i)
|
||||
- assert(strlen(x+i)==11-i);
|
||||
- return 0;
|
||||
-}
|
||||
diff -upN dietlibc-0.31.20080212/test/Makefile.strlen dietlibc-0.31.20080212/test/Makefile
|
||||
--- dietlibc-0.31.20080212/test/Makefile.strlen 2003-12-15 14:07:42.000000000 +0100
|
||||
+++ dietlibc-0.31.20080212/test/Makefile 2008-02-14 20:01:08.000000000 +0100
|
||||
@@ -13,7 +13,7 @@ gethostbyname_r getmntent getopt getpass
|
||||
glob grent hasmntopt hello iconv if_nameindex ltostr malloc-debugger md5_testharness \
|
||||
memccpy memchr memcmp memcpy memrchr memusage mktime mmap_test pipe printf printftest \
|
||||
protoent prototypes putenv pwent rand48 read1 readdir regex select sendfile servent siglist \
|
||||
-speed spent sprintf sscanf stdarg strcasecmp strcmp strlen strncat strncpy strptime strrchr \
|
||||
+speed spent sprintf sscanf stdarg strcasecmp strcmp strncat strncpy strptime strrchr \
|
||||
strstr strtol sysenter ungetc waitpid
|
||||
|
||||
test: $(TESTPROGRAMS)
|
||||
diff -upN dietlibc-0.31.20080212/test/runtests.sh.strlen dietlibc-0.31.20080212/test/runtests.sh
|
||||
--- dietlibc-0.31.20080212/test/runtests.sh.strlen 2003-12-15 14:07:42.000000000 +0100
|
||||
+++ dietlibc-0.31.20080212/test/runtests.sh 2008-02-14 20:01:08.000000000 +0100
|
||||
@@ -1,6 +1,6 @@
|
||||
SUBDIRS="dirent inet stdio string stdlib time"
|
||||
|
||||
-TESTPROGRAMS="adjtime argv atexit bsearch byteswap calloc confstr empty flush fputc ffs fnmatch ftw fwrite getaddrinfo getenv getdelim getgrnam gethostbyaddr gethostbyname gethostbyname_r getmntent getopt getpwnam getservbyname getservbyport getusershell glob grent hasmntopt hello iconv if_nameindex ltostr malloc-debugger md5_testharness memccpy memchr memcmp memcpy memrchr memusage mktime mmap_test pipe printf printftest protoent prototypes putenv pwent rand48 readdir regex select sendfile servent siglist speed spent sprintf sscanf stdarg strcasecmp strcmp strlen strncat strncpy strptime strrchr strstr strtol sysenter ungetc waitpid"
|
||||
+TESTPROGRAMS="adjtime argv atexit bsearch byteswap calloc confstr empty flush fputc ffs fnmatch ftw fwrite getaddrinfo getenv getdelim getgrnam gethostbyaddr gethostbyname gethostbyname_r getmntent getopt getpwnam getservbyname getservbyport getusershell glob grent hasmntopt hello iconv if_nameindex ltostr malloc-debugger md5_testharness memccpy memchr memcmp memcpy memrchr memusage mktime mmap_test pipe printf printftest protoent prototypes putenv pwent rand48 readdir regex select sendfile servent siglist speed spent sprintf sscanf stdarg strcasecmp strcmp strncat strncpy strptime strrchr strstr strtol sysenter ungetc waitpid"
|
||||
|
||||
STDIN="read1"
|
||||
PASS="getpass"
|
||||
diff -upN dietlibc-0.31.20080212/sparc64/strlen.c.strlen dietlibc-0.31.20080212/sparc64/strlen.c
|
||||
--- dietlibc-0.31.20080212/sparc64/strlen.c.strlen 2007-10-04 18:19:15.000000000 +0200
|
||||
+++ dietlibc-0.31.20080212/sparc64/strlen.c 1970-01-01 01:00:00.000000000 +0100
|
||||
@@ -1 +0,0 @@
|
||||
-#include "alpha/strlen.c"
|
||||
diff -upN dietlibc-0.31.20080212/ppc64/strlen.c.strlen dietlibc-0.31.20080212/ppc64/strlen.c
|
||||
--- dietlibc-0.31.20080212/ppc64/strlen.c.strlen 2007-10-04 18:19:15.000000000 +0200
|
||||
+++ dietlibc-0.31.20080212/ppc64/strlen.c 1970-01-01 01:00:00.000000000 +0100
|
||||
@@ -1 +0,0 @@
|
||||
-#include "alpha/strlen.c"
|
||||
diff -upN dietlibc-0.31.20080212/lib/strstr.c.strlen dietlibc-0.31.20080212/lib/strstr.c
|
||||
--- dietlibc-0.31.20080212/lib/strstr.c.strlen 2003-08-19 21:34:18.000000000 +0200
|
||||
+++ dietlibc-0.31.20080212/lib/strstr.c 2008-02-14 20:01:08.000000000 +0100
|
||||
@@ -4,7 +4,7 @@
|
||||
char *strstr(const char *haystack, const char *needle) {
|
||||
size_t nl=strlen(needle);
|
||||
size_t hl=strlen(haystack);
|
||||
- int i;
|
||||
+ size_t i;
|
||||
if (!nl) goto found;
|
||||
if (nl>hl) return 0;
|
||||
for (i=hl-nl+1; __likely(i); --i) {
|
||||
diff -upN dietlibc-0.31.20080212/lib/strlen.c.strlen dietlibc-0.31.20080212/lib/strlen.c
|
||||
--- dietlibc-0.31.20080212/lib/strlen.c.strlen 2003-08-19 21:34:18.000000000 +0200
|
||||
+++ dietlibc-0.31.20080212/lib/strlen.c 2008-02-14 21:31:09.000000000 +0100
|
||||
@@ -1,6 +1,7 @@
|
||||
#include <endian.h>
|
||||
#include "dietfeatures.h"
|
||||
#include <string.h>
|
||||
+#include <stdint.h>
|
||||
|
||||
#ifdef WANT_SMALL_STRING_ROUTINES
|
||||
size_t strlen(const char *s) {
|
||||
@@ -10,38 +11,88 @@ size_t strlen(const char *s) {
|
||||
return i;
|
||||
}
|
||||
#else
|
||||
-static const unsigned long magic = 0x01010101;
|
||||
+
|
||||
+#if __WORDSIZE == 64
|
||||
+typedef uint64_t word_t;
|
||||
+#elif __WORDSIZE == 32
|
||||
+typedef uint32_t word_t;
|
||||
+#else
|
||||
+#error unsupported __WORDSIZE
|
||||
+#endif
|
||||
+
|
||||
+static word_t const magic = (word_t)(0x0101010101010101ull);
|
||||
|
||||
size_t strlen(const char *s)
|
||||
{
|
||||
const char *t = s;
|
||||
- unsigned long word;
|
||||
+ word_t word;
|
||||
+ word_t mask;
|
||||
|
||||
- if (!s) return 0;
|
||||
+ if (__unlikely(!s)) return 0;
|
||||
|
||||
/* Byte compare up until word boundary */
|
||||
- for (; ((unsigned long) t & 3); t++)
|
||||
+ for (; ((unsigned long) t & (sizeof(magic)-1)); t++)
|
||||
if (!*t) return t - s;
|
||||
|
||||
/* Word compare */
|
||||
do {
|
||||
- word = *((unsigned long *) t); t += 4;
|
||||
+ word = *((word_t const *) t); t += sizeof word;
|
||||
word = (word - magic) &~ word;
|
||||
word &= (magic << 7);
|
||||
} while (__likely(word == 0));
|
||||
|
||||
-#if BYTE_ORDER == LITTLE_ENDIAN
|
||||
- /* word & 0x80808080 == word */
|
||||
- word = (word - 1) & (magic << 10);
|
||||
- word += (word << 8) + (word << 16);
|
||||
- t += word >> 26;
|
||||
+#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
+ (void)mask;
|
||||
+ switch (sizeof(word)) {
|
||||
+ case 8:
|
||||
+ /* word & 0x8080808080808080 == word */
|
||||
+ word = (word - 1) & (magic << 8);
|
||||
+ word += (word << 32);
|
||||
+ word += (word << 16);
|
||||
+ word += (word << 8);
|
||||
+ t += word >> 56;
|
||||
+ break;
|
||||
+
|
||||
+ case 4:
|
||||
+ /* word & 0x80808080 == word */
|
||||
+ word = (word - 1) & (magic << 10);
|
||||
+ word += (word << 8) + (word << 16);
|
||||
+ t += word >> 26;
|
||||
+ break;
|
||||
+
|
||||
+ default: { char exc[sizeof(word)==8]; (void)exc; }
|
||||
+ }
|
||||
#else
|
||||
- if ((word & 0x80800000) == 0) {
|
||||
- word <<= 16;
|
||||
- t += 2;
|
||||
+ mask = (magic << 7);
|
||||
+
|
||||
+ switch (sizeof(word)) {
|
||||
+ case 8:
|
||||
+ mask <<= 4*8;
|
||||
+ if ((word & mask) == 0) {
|
||||
+ t += 4;
|
||||
+ word <<= 4*8;
|
||||
+ }
|
||||
+ /* fallthrough */
|
||||
+
|
||||
+ case 4:
|
||||
+ mask <<= 2*8;
|
||||
+ if ((word & mask) == 0) {
|
||||
+ t += 2;
|
||||
+ word <<= 2*8;
|
||||
+ }
|
||||
+ /* fallthrough */
|
||||
+
|
||||
+ case 2:
|
||||
+ mask <<= 1*8;
|
||||
+ if ((word & mask) == 0) {
|
||||
+ t += 1;
|
||||
+ word <<= 1*8;
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
+ default: { char exc[sizeof(word)==8]; (void)exc; }
|
||||
}
|
||||
- if ((word & 0x80000000) == 0) t += 1;
|
||||
#endif
|
||||
- return ((const char *) t) - 4 - s;
|
||||
+ return t - sizeof(word) - s;
|
||||
}
|
||||
#endif
|
||||
diff -upN dietlibc-0.31.20080212/ia64/strlen.c.strlen dietlibc-0.31.20080212/ia64/strlen.c
|
||||
--- dietlibc-0.31.20080212/ia64/strlen.c.strlen 2007-10-04 18:19:15.000000000 +0200
|
||||
+++ dietlibc-0.31.20080212/ia64/strlen.c 1970-01-01 01:00:00.000000000 +0100
|
||||
@@ -1 +0,0 @@
|
||||
-#include "alpha/strlen.c"
|
||||
diff -upN dietlibc-0.31.20080212/alpha/strlen.c.strlen dietlibc-0.31.20080212/alpha/strlen.c
|
||||
--- dietlibc-0.31.20080212/alpha/strlen.c.strlen 2001-01-09 18:57:38.000000000 +0100
|
||||
+++ dietlibc-0.31.20080212/alpha/strlen.c 1970-01-01 01:00:00.000000000 +0100
|
||||
@@ -1,32 +0,0 @@
|
||||
-#include <string.h>
|
||||
-
|
||||
-static const unsigned long long magic = 0x0101010101010101LL;
|
||||
-
|
||||
-size_t strlen(const char *s)
|
||||
-{
|
||||
- const char *t = s;
|
||||
- unsigned long long word;
|
||||
-
|
||||
- if (!s) return 0;
|
||||
-
|
||||
- /* Byte compare up until 64 bit word boundary */
|
||||
- for (; ((unsigned long long) t & 7); t++)
|
||||
- if (!*t) return t - s;
|
||||
-
|
||||
- /* Word compare */
|
||||
- do {
|
||||
- word = *((unsigned long long *) t); t += 8;
|
||||
- word = (word - magic) &~ word;
|
||||
- word &= (magic << 7);
|
||||
- } while (word == 0);
|
||||
-
|
||||
- /* word & 0x8080808080808080 == word */
|
||||
- word = (word - 1) & (magic << 8);
|
||||
- word += (word << 32);
|
||||
- word += (word << 16);
|
||||
- word += (word << 8);
|
||||
- t += word >> 56;
|
||||
- return ((const char *) t) - 8 - s;
|
||||
-}
|
||||
-
|
||||
-
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
diff -upN dietlibc-0.31.20080212/lib/strcpy.c.~1~ dietlibc-0.31.20080212/lib/strcpy.c
|
||||
--- dietlibc-0.31.20080212/lib/strcpy.c.~1~ 2003-12-21 13:06:36.000000000 +0100
|
||||
+++ dietlibc-0.31.20080212/lib/strcpy.c 2008-02-14 21:36:45.000000000 +0100
|
||||
@@ -25,7 +25,7 @@ strcpy (char *s1, const char *s2)
|
||||
|
||||
while (1) {
|
||||
l = *(const unsigned long *) s2;
|
||||
- if (((l - MKW(0x1)) & ~l) & MKW(0x80)) {
|
||||
+ if (((l - MKW(0x1ul)) & ~l) & MKW(0x80ul)) {
|
||||
unsigned char c;
|
||||
while ((*s1++ = (l & 0xff))) l>>=8;
|
||||
return (res);
|
||||
diff -upN dietlibc-0.31.20080212/lib/strcmp.c.~1~ dietlibc-0.31.20080212/lib/strcmp.c
|
||||
--- dietlibc-0.31.20080212/lib/strcmp.c.~1~ 2003-12-21 13:06:36.000000000 +0100
|
||||
+++ dietlibc-0.31.20080212/lib/strcmp.c 2008-02-14 21:37:38.000000000 +0100
|
||||
@@ -31,8 +31,8 @@ strcmp (const char *s1, const char *s2)
|
||||
while (1) {
|
||||
l1 = *lx1++;
|
||||
l2 = *lx2++;
|
||||
- if ((((l1 - MKW(0x1)) & ~l1) & MKW(0x80)) ||
|
||||
- ((((l2 - MKW(0x1)) & ~l2) & MKW(0x80))) || l1 != l2) {
|
||||
+ if ((((l1 - MKW(0x1ul)) & ~l1) & MKW(0x80ul)) ||
|
||||
+ ((((l2 - MKW(0x1ul)) & ~l2) & MKW(0x80ul))) || l1 != l2) {
|
||||
unsigned char c1, c2;
|
||||
while (1) {
|
||||
c1 = l1 & 0xff;
|
||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
11c4b650b3644269a8d2a624fd9780ea dietlibc-0.31.20080212.tar.bz2
|
||||
4d42fda6c0f75195337e0753138e752c dietlibc-0.31.20080221.tar.bz2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue