rpms/dietlibc/F-8 dietlibc-0.31-printFG.patch,1.4,1.5
Enrico Scholz (ensc)
fedora-extras-commits at redhat.com
Sat Jun 21 14:16:41 UTC 2008
Author: ensc
Update of /cvs/extras/rpms/dietlibc/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv32460
Modified Files:
dietlibc-0.31-printFG.patch
Log Message:
- do not test for signess of isinf(3); C99 guarantees values of 0
and not 0 and does not differ between positive and negative inf.
'isinf(3)' is a builtin in gcc 4.3 and previous check won't work
anymore. Instead of, test whether value is lesser or greater than
zero.
- renabled the INF testsuite
dietlibc-0.31-printFG.patch:
Index: dietlibc-0.31-printFG.patch
===================================================================
RCS file: /cvs/extras/rpms/dietlibc/F-8/dietlibc-0.31-printFG.patch,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- dietlibc-0.31-printFG.patch 21 Jun 2008 14:13:18 -0000 1.4
+++ dietlibc-0.31-printFG.patch 21 Jun 2008 14:15:50 -0000 1.5
@@ -1,6 +1,6 @@
diff -up dietlibc-0.31.20080409/lib/__dtostr.c.printFG dietlibc-0.31.20080409/lib/__dtostr.c
--- dietlibc-0.31.20080409/lib/__dtostr.c.printFG 2006-07-04 05:33:02.000000000 +0200
-+++ dietlibc-0.31.20080409/lib/__dtostr.c 2008-04-13 23:34:48.000000000 +0200
++++ dietlibc-0.31.20080409/lib/__dtostr.c 2008-04-14 00:36:10.000000000 +0200
@@ -5,13 +5,15 @@
static int copystring(char* buf,int maxlen, const char* s) {
@@ -20,27 +20,22 @@
#if 1
union {
unsigned long long l;
-@@ -31,12 +33,17 @@ int __dtostr(double d,char *buf,unsigned
- signed long e10;
- /* step 3: calculate 10^e10 */
- unsigned int i;
-+ int is_inf;
- double backup=d;
+@@ -35,8 +37,12 @@ int __dtostr(double d,char *buf,unsigned
double tmp;
char *oldbuf=buf;
- if ((i=isinf(d))) return copystring(buf,maxlen,i>0?"inf":"-inf");
- if (isnan(d)) return copystring(buf,maxlen,"nan");
-+ if ((is_inf=isinf(d)))
++ if (isinf(d))
+ return copystring(buf,maxlen,
-+ (is_inf<0)?
++ (d<0)?
+ (flags&0x02?"-INF":"-inf"):
+ (flags&0x02?"INF":"inf"));
+ if (isnan(d)) return copystring(buf,maxlen,flags&0x02?"NAN":"nan");
e10=1+(long)(e*0.30102999566398119802); /* log10(2) */
/* Wir iterieren von Links bis wir bei 0 sind oder maxlen erreicht
* ist. Wenn maxlen erreicht ist, machen wir das nochmal in
-@@ -126,7 +133,7 @@ int __dtostr(double d,char *buf,unsigned
+@@ -126,7 +132,7 @@ int __dtostr(double d,char *buf,unsigned
if (prec2 || prec>(unsigned int)(buf-oldbuf)+1) { /* more digits wanted */
if (!maxlen) return 0; --maxlen;
*buf='.'; ++buf;
@@ -51,7 +46,7 @@
} else {
diff -up dietlibc-0.31.20080409/lib/__v_printf.c.printFG dietlibc-0.31.20080409/lib/__v_printf.c
--- dietlibc-0.31.20080409/lib/__v_printf.c.printFG 2008-02-19 01:28:13.000000000 +0100
-+++ dietlibc-0.31.20080409/lib/__v_printf.c 2008-04-13 23:34:48.000000000 +0200
++++ dietlibc-0.31.20080409/lib/__v_printf.c 2008-04-14 00:36:10.000000000 +0200
@@ -4,6 +4,7 @@
#include <stdlib.h>
#include <string.h>
@@ -138,7 +133,7 @@
sz=strlen(s);
diff -up dietlibc-0.31.20080409/test/printf.c.printFG dietlibc-0.31.20080409/test/printf.c
--- dietlibc-0.31.20080409/test/printf.c.printFG 2008-02-19 01:28:13.000000000 +0100
-+++ dietlibc-0.31.20080409/test/printf.c 2008-04-13 23:36:42.000000000 +0200
++++ dietlibc-0.31.20080409/test/printf.c 2008-04-14 00:36:10.000000000 +0200
@@ -2,11 +2,26 @@
#include <string.h>
#include <stdlib.h>
@@ -190,14 +185,14 @@
+#ifdef INFINITY
+ TEST("inf", "%f", INFINITY);
-+ //TEST("-inf", "%f", -INFINITY);
++ TEST("-inf", "%f", -INFINITY);
+ TEST("INF", "%F", INFINITY);
-+ //TEST("-INF", "%F", -INFINITY);
++ TEST("-INF", "%F", -INFINITY);
+
+ TEST("inf", "%g", INFINITY);
-+ //TEST("-inf", "%g", -INFINITY);
++ TEST("-inf", "%g", -INFINITY);
+ TEST("INF", "%G", INFINITY);
-+ //TEST("-INF", "%G", -INFINITY);
++ TEST("-INF", "%G", -INFINITY);
+#endif
+
+#ifdef NAN
@@ -222,7 +217,7 @@
}
diff -up dietlibc-0.31.20080409/include/stdlib.h.printFG dietlibc-0.31.20080409/include/stdlib.h
--- dietlibc-0.31.20080409/include/stdlib.h.printFG 2007-09-20 20:51:18.000000000 +0200
-+++ dietlibc-0.31.20080409/include/stdlib.h 2008-04-13 23:34:48.000000000 +0200
++++ dietlibc-0.31.20080409/include/stdlib.h 2008-04-14 00:36:10.000000000 +0200
@@ -28,8 +28,12 @@ long double strtold(const char *nptr, ch
long int strtol(const char *nptr, char **endptr, int base) __THROW;
unsigned long int strtoul(const char *nptr, char **endptr, int base) __THROW;
More information about the scm-commits
mailing list