rpms/dietlibc/F-8 dietlibc-0.31-testsuite.patch,1.1,1.2
Enrico Scholz (ensc)
fedora-extras-commits at redhat.com
Sat Jun 21 14:10:37 UTC 2008
Author: ensc
Update of /cvs/extras/rpms/dietlibc/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv32095
Modified Files:
dietlibc-0.31-testsuite.patch
Log Message:
fixed a lot of borken printf(3) format specifiers
dietlibc-0.31-testsuite.patch:
Index: dietlibc-0.31-testsuite.patch
===================================================================
RCS file: /cvs/extras/rpms/dietlibc/F-8/dietlibc-0.31-testsuite.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- dietlibc-0.31-testsuite.patch 21 Jun 2008 13:50:40 -0000 1.1
+++ dietlibc-0.31-testsuite.patch 21 Jun 2008 14:09:50 -0000 1.2
@@ -1,6 +1,6 @@
diff -up dietlibc-0.31.20080409/test/getmntent.c.testsuite dietlibc-0.31.20080409/test/getmntent.c
--- dietlibc-0.31.20080409/test/getmntent.c.testsuite 2003-12-15 14:07:42.000000000 +0100
-+++ dietlibc-0.31.20080409/test/getmntent.c 2008-04-13 15:49:19.000000000 +0200
++++ dietlibc-0.31.20080409/test/getmntent.c 2008-04-13 23:16:30.000000000 +0200
@@ -33,10 +33,6 @@ while ((e = getmntent(fstab))) {
printf("closing /etc/fstab\n");
@@ -13,9 +13,41 @@
return 0;
}
-
+diff -up dietlibc-0.31.20080409/test/stdio/tst-fphex.c.testsuite dietlibc-0.31.20080409/test/stdio/tst-fphex.c
+--- dietlibc-0.31.20080409/test/stdio/tst-fphex.c.testsuite 2003-12-15 14:07:42.000000000 +0100
++++ dietlibc-0.31.20080409/test/stdio/tst-fphex.c 2008-04-13 23:16:30.000000000 +0200
+@@ -37,7 +37,7 @@ int main (int argc, char **argv) {
+ int n = snprintf (buf, sizeof buf, t->fmt, t->value);
+ if (n != strlen (t->expect) || strcmp (buf, t->expect) != 0)
+ {
+- printf ("%s\tExpected \"%s\" (%u)\n\tGot \"%s\" (%d, %u)\n",
++ printf ("%s\tExpected \"%s\" (%zu)\n\tGot \"%s\" (%d, %zu)\n",
+ t->fmt, t->expect, strlen (t->expect), buf, n, strlen (buf));
+ result = 1;
+ }
+diff -up dietlibc-0.31.20080409/test/byteswap.c.testsuite dietlibc-0.31.20080409/test/byteswap.c
+--- dietlibc-0.31.20080409/test/byteswap.c.testsuite 2003-12-15 14:07:42.000000000 +0100
++++ dietlibc-0.31.20080409/test/byteswap.c 2008-04-13 23:16:30.000000000 +0200
+@@ -9,12 +9,12 @@ int main() {
+ snprintf(buf,100,"%x %x", bswap_16(0x1234), bswap_16(0x5678));
+ assert(strcmp(buf, "3412 7856") == 0);
+
+- printf("%lx\n",bswap_32(0x12345678));
+- snprintf(buf,100,"%lx", bswap_32(0x12345678));
++ printf("%x\n",(unsigned int)bswap_32(0x12345678));
++ snprintf(buf,100,"%x", (unsigned int)bswap_32(0x12345678));
+ assert(strcmp(buf, "78563412") == 0);
+
+- printf("%qx\n",bswap_64(0x123456789ABCDEFull));
+- snprintf(buf,100,"%qx", bswap_64(0x123456789ABCDEFull));
++ printf("%llx\n",(unsigned long long)bswap_64(0x123456789ABCDEFull));
++ snprintf(buf,100,"%llx", (unsigned long long)bswap_64(0x123456789ABCDEFull));
+ assert(strcmp(buf, "efcdab8967452301") == 0);
+ return 0;
+ }
diff -up dietlibc-0.31.20080409/test/runtests.sh.testsuite dietlibc-0.31.20080409/test/runtests.sh
---- dietlibc-0.31.20080409/test/runtests.sh.testsuite 2008-04-13 14:54:58.000000000 +0200
-+++ dietlibc-0.31.20080409/test/runtests.sh 2008-04-13 14:54:58.000000000 +0200
+--- dietlibc-0.31.20080409/test/runtests.sh.testsuite 2008-04-13 23:16:30.000000000 +0200
++++ dietlibc-0.31.20080409/test/runtests.sh 2008-04-13 23:16:30.000000000 +0200
@@ -1,6 +1,6 @@
SUBDIRS="dirent inet stdio string stdlib time"
@@ -24,9 +56,39 @@
STDIN="read1"
PASS="getpass"
+diff -up dietlibc-0.31.20080409/test/cycles.c.testsuite dietlibc-0.31.20080409/test/cycles.c
+--- dietlibc-0.31.20080409/test/cycles.c.testsuite 2004-08-24 12:10:48.000000000 +0200
++++ dietlibc-0.31.20080409/test/cycles.c 2008-04-13 23:16:30.000000000 +0200
+@@ -24,7 +24,7 @@ int main(int argc,char* argv[]) {
+ if (!fork()) { execve(argv[1],argv+1,environ); exit(1); }
+ wait(0);
+ RDTSC(b);
+- printf("%llu cycles\n",b-a);
++ printf("%llu cycles\n",(unsigned long long)(b-a));
+
+ return 0;
+ }
+diff -up dietlibc-0.31.20080409/test/sysenter.c.testsuite dietlibc-0.31.20080409/test/sysenter.c
+--- dietlibc-0.31.20080409/test/sysenter.c.testsuite 2003-12-15 14:07:42.000000000 +0100
++++ dietlibc-0.31.20080409/test/sysenter.c 2008-04-13 23:16:30.000000000 +0200
+@@ -11,11 +11,11 @@ int main() {
+ int i;
+ for (i=0; environ[i]; ++i) ;
+ for (x=(struct elf_aux*)(environ+i+1); x->type; ++x) {
+- printf("%d %x\n",x->type,x->value);
++ printf("%ld %lx\n",x->type,x->value);
+ if (x->type==AT_PAGESZ)
+- printf("pagesize %d\n",x->value);
++ printf("pagesize %ld\n",x->value);
+ else if (x->type==AT_SYSINFO)
+- printf("vsyscall %p\n",x->value);
++ printf("vsyscall %p\n",(void *)x->value);
+ }
+ return 0;
+ }
diff -up dietlibc-0.31.20080409/test/Makefile.testsuite dietlibc-0.31.20080409/test/Makefile
---- dietlibc-0.31.20080409/test/Makefile.testsuite 2008-04-13 14:54:58.000000000 +0200
-+++ dietlibc-0.31.20080409/test/Makefile 2008-04-13 14:54:58.000000000 +0200
+--- dietlibc-0.31.20080409/test/Makefile.testsuite 2008-04-13 23:16:30.000000000 +0200
++++ dietlibc-0.31.20080409/test/Makefile 2008-04-13 23:16:30.000000000 +0200
@@ -10,7 +10,7 @@ LCOMPAT=-lcompat
TESTPROGRAMS=adjtime argv asprintf atexit bsearch byteswap calloc confstr cycles empty flush fnmatch \
fputc ftw fwrite getaddrinfo getenv getgrnam gethostbyaddr gethostbyname \
@@ -36,9 +98,44 @@
memccpy memchr memcmp 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 strncat strncpy strptime strrchr \
+diff -up dietlibc-0.31.20080409/test/bsearch.c.testsuite dietlibc-0.31.20080409/test/bsearch.c
+--- dietlibc-0.31.20080409/test/bsearch.c.testsuite 2003-12-15 14:07:42.000000000 +0100
++++ dietlibc-0.31.20080409/test/bsearch.c 2008-04-13 23:16:30.000000000 +0200
+@@ -35,7 +35,7 @@ int main() {
+ die("bsearch returned NULL\n");
+ }
+ if (k != array+i) die("bsearch found wrong element\n");
+- printf("%d\n",k-array);
++ printf("%ld\n",k-array);
+ }
+ }
+ return 0;
+diff -up dietlibc-0.31.20080409/test/printftest.c.testsuite dietlibc-0.31.20080409/test/printftest.c
+--- dietlibc-0.31.20080409/test/printftest.c.testsuite 2003-12-15 14:07:42.000000000 +0100
++++ dietlibc-0.31.20080409/test/printftest.c 2008-04-13 23:16:50.000000000 +0200
+@@ -101,8 +101,8 @@ int main()
+ printf("#%i#\n",18);
+ printf("#%d#\n",18);
+ printf("#%u#\n",18);
+- printf("#%lu#\n",18);
+- printf("#%li#\n",18);
++ printf("#%lu#\n",18l);
++ printf("#%li#\n",18l);
+ printf("#%-+#06d#\n", -123);
+ printf("#%-+#6d#\n", -123);
+ printf("#%+#06d#\n", -123);
+@@ -142,7 +142,7 @@ int main()
+ buf);
+ memset(buf2,0,sizeof(buf));
+ i=snprintf(buf2, 256, "%.9999u", 10);
+- printf("%i %i\n",i,strlen(buf2));
++ printf("%i %li\n",i,strlen(buf2));
+
+ printf ("snprintf (\"%%.999999u\", 10) == %d\n",
+ snprintf(buf2, sizeof(buf2), "%.999999u", 10));
diff -up dietlibc-0.31.20080409/test/stdlib/tst-malloc.c.testsuite dietlibc-0.31.20080409/test/stdlib/tst-malloc.c
--- dietlibc-0.31.20080409/test/stdlib/tst-malloc.c.testsuite 2003-12-15 14:07:42.000000000 +0100
-+++ dietlibc-0.31.20080409/test/stdlib/tst-malloc.c 2008-04-13 14:54:58.000000000 +0200
++++ dietlibc-0.31.20080409/test/stdlib/tst-malloc.c 2008-04-13 23:16:30.000000000 +0200
@@ -21,13 +21,15 @@
#include <stdlib.h>
#include <stdio.h>
@@ -68,9 +165,51 @@
p = realloc (p, 0);
if (p != NULL)
+diff -up dietlibc-0.31.20080409/test/stdlib/tst-strtod.c.testsuite dietlibc-0.31.20080409/test/stdlib/tst-strtod.c
+--- dietlibc-0.31.20080409/test/stdlib/tst-strtod.c.testsuite 2003-12-15 14:07:42.000000000 +0100
++++ dietlibc-0.31.20080409/test/stdlib/tst-strtod.c 2008-04-13 23:16:30.000000000 +0200
+@@ -149,10 +149,10 @@ main (int argc, char ** argv)
+ }
+
+ const char input2[] = "+1.000000000116415321826934814453125";
+- if (strtold (input2, NULL) != +1.000000000116415321826934814453125)
++ if (strtold (input2, NULL) != +1.000000000116415321826934814453125L)
+ {
+ printf ("input2: %La != %La\n", strtold (input2, NULL),
+- +1.000000000116415321826934814453125);
++ +1.000000000116415321826934814453125L);
+ status = 1;
+ }
+
+diff -up dietlibc-0.31.20080409/test/rand48.c.testsuite dietlibc-0.31.20080409/test/rand48.c
+--- dietlibc-0.31.20080409/test/rand48.c.testsuite 2002-05-29 15:20:40.000000000 +0200
++++ dietlibc-0.31.20080409/test/rand48.c 2008-04-13 23:16:30.000000000 +0200
+@@ -6,16 +6,16 @@ main (void)
+ {
+ static unsigned short data[7] = { 1, 2, 3, 4, 5, 6, 7 };
+
+- printf ("one %X\n", mrand48 ());
+- printf ("two %X\n", mrand48 ());
+- printf ("three %X\n", mrand48 ());
++ printf ("one %lX\n", mrand48 ());
++ printf ("two %lX\n", mrand48 ());
++ printf ("three %lX\n", mrand48 ());
+
+ lcong48 (data);
+ printf ("after lcong48:\n");
+
+- printf ("one %X\n", mrand48 ());
+- printf ("two %X\n", mrand48 ());
+- printf ("three %X\n", mrand48 ());
++ printf ("one %lX\n", mrand48 ());
++ printf ("two %lX\n", mrand48 ());
++ printf ("three %lX\n", mrand48 ());
+
+ return 0;
+ }
diff -up dietlibc-0.31.20080409/test/time/tst-strftime.c.testsuite dietlibc-0.31.20080409/test/time/tst-strftime.c
--- dietlibc-0.31.20080409/test/time/tst-strftime.c.testsuite 2003-12-15 14:07:42.000000000 +0100
-+++ dietlibc-0.31.20080409/test/time/tst-strftime.c 2008-04-13 14:54:58.000000000 +0200
++++ dietlibc-0.31.20080409/test/time/tst-strftime.c 2008-04-13 23:16:30.000000000 +0200
@@ -49,18 +49,18 @@ int main (void) {
if (res == 0)
@@ -95,7 +234,7 @@
}
diff -up dietlibc-0.31.20080409/test/time/tst-strptime.c.testsuite dietlibc-0.31.20080409/test/time/tst-strptime.c
--- dietlibc-0.31.20080409/test/time/tst-strptime.c.testsuite 2003-12-15 14:07:42.000000000 +0100
-+++ dietlibc-0.31.20080409/test/time/tst-strptime.c 2008-04-13 14:54:58.000000000 +0200
++++ dietlibc-0.31.20080409/test/time/tst-strptime.c 2008-04-13 23:16:30.000000000 +0200
@@ -41,10 +41,12 @@ static const struct
{ "C", "03/03/00", "%D", 5, 62, 2, 3 },
{ "C", "9/9/99", "%x", 4, 251, 8, 9 },
@@ -152,9 +291,43 @@
{
printf ("not all of `%s' read\n", day_tests[i].input);
result = 1;
+diff -up dietlibc-0.31.20080409/test/mktime.c.testsuite dietlibc-0.31.20080409/test/mktime.c
+--- dietlibc-0.31.20080409/test/mktime.c.testsuite 2004-03-27 01:47:00.000000000 +0100
++++ dietlibc-0.31.20080409/test/mktime.c 2008-04-13 23:16:30.000000000 +0200
+@@ -9,15 +9,15 @@ int main() {
+ t.tm_mday=29;
+ t.tm_mon=2;
+ t.tm_year=100;
+- printf("%d\n",mktime(&t));
++ printf("%ld\n",(long)mktime(&t));
+ t.tm_mday=1;
+ t.tm_mon=3;
+ t.tm_year=102;
+- printf("%d\n",mktime(&t));
++ printf("%ld\n",(long)mktime(&t));
+ t.tm_mday=1;
+ t.tm_mon=6;
+ t.tm_year=102;
+- printf("%d\n",mktime(&t));
++ printf("%ld\n",(long)mktime(&t));
+ return 0;
+ }
+
+diff -up dietlibc-0.31.20080409/test/asprintf.c.testsuite dietlibc-0.31.20080409/test/asprintf.c
+--- dietlibc-0.31.20080409/test/asprintf.c.testsuite 2003-12-15 14:07:42.000000000 +0100
++++ dietlibc-0.31.20080409/test/asprintf.c 2008-04-13 23:16:30.000000000 +0200
+@@ -13,7 +13,7 @@ int main(int argc, char **argv) {
+ assert(strlen(path) == asprintlen);
+
+ printf("%s\n", path);
+- asprintlen=asprintf(&path, "/proc" "/%d/stat", strlen(argv[1]));
++ asprintlen=asprintf(&path, "/proc" "/%zu/stat", strlen(argv[1]));
+ assert(strlen(path) == asprintlen);
+ printf("%s\n", path);
+
diff -up /dev/null dietlibc-0.31.20080409/test/math.c
--- /dev/null 2008-03-18 07:40:22.289057188 +0100
-+++ dietlibc-0.31.20080409/test/math.c 2008-04-13 14:54:58.000000000 +0200
++++ dietlibc-0.31.20080409/test/math.c 2008-04-13 23:16:30.000000000 +0200
@@ -0,0 +1,18 @@
+#include <math.h>
+#include <float.h>
@@ -174,3 +347,19 @@
+
+ return 0;
+}
+diff -up dietlibc-0.31.20080409/test/speed.c.testsuite dietlibc-0.31.20080409/test/speed.c
+--- dietlibc-0.31.20080409/test/speed.c.testsuite 2003-12-15 14:07:42.000000000 +0100
++++ dietlibc-0.31.20080409/test/speed.c 2008-04-13 23:16:30.000000000 +0200
+@@ -7,10 +7,10 @@ int main() {
+ int i;
+ time_t t;
+
+- printf("%d\n", time(0));
++ printf("%ld\n", (long)time(0));
+ for (i=0; i<10000000; ++i)
+ t=time(0);
+
+- printf("%d\n", time(0));
++ printf("%ld\n", (long)time(0));
+ return 0;
+ }
More information about the fedora-extras-commits
mailing list