rpms/dietlibc/F-8 dietlibc-0.31-printFG.patch,1.2,1.3

Enrico Scholz (ensc) fedora-extras-commits at redhat.com
Sat Jun 21 14:12:57 UTC 2008


Author: ensc

Update of /cvs/extras/rpms/dietlibc/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv32216

Modified Files:
	dietlibc-0.31-printFG.patch 
Log Message:
use a better definition for INFINITY
whitespace cleanup


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.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- dietlibc-0.31-printFG.patch	21 Jun 2008 14:03:46 -0000	1.2
+++ dietlibc-0.31-printFG.patch	21 Jun 2008 14:12:09 -0000	1.3
@@ -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 22:26:13.000000000 +0200
++++ dietlibc-0.31.20080409/lib/__dtostr.c	2008-04-13 23:34:48.000000000 +0200
 @@ -5,13 +5,15 @@
  
  static int copystring(char* buf,int maxlen, const char* s) {
@@ -51,7 +51,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 22:26:32.000000000 +0200
++++ dietlibc-0.31.20080409/lib/__v_printf.c	2008-04-13 23:34:48.000000000 +0200
 @@ -4,6 +4,7 @@
  #include <stdlib.h>
  #include <string.h>
@@ -138,8 +138,8 @@
  	  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 22:26:13.000000000 +0200
-@@ -2,11 +2,24 @@
++++ dietlibc-0.31.20080409/test/printf.c	2008-04-13 23:36:42.000000000 +0200
+@@ -2,11 +2,26 @@
  #include <string.h>
  #include <stdlib.h>
  #include <assert.h>
@@ -151,7 +151,9 @@
  #define ALGN		5
  
 +#ifndef INFINITY
-+#  define INFINITY	(DBL_MAX * DBL_MAX)
++#  if (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3))
++#    define INFINITY	(__builtin_inf())
++#  endif
 +#endif
 +
 +#ifndef NAN
@@ -164,33 +166,63 @@
  // https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=112986
  #if 0
  #undef  assert
-@@ -131,6 +144,23 @@ int main()
+@@ -60,7 +75,7 @@
+   TEST_SNPRINTF(EXP,  0,                __VA_ARGS__);		\
+   TEST_SNPRINTF(EXP,  sizeof(EXP)+ALGN, __VA_ARGS__);		\
+   TEST_SNPRINTF_NULL(EXP, __VA_ARGS__)
+-  
++
+ 
+ int main()
+ {
+@@ -101,7 +116,7 @@ int main()
+   TEST("42.23",   "%5.2f",  42.23);
+   TEST("42.23",   "%5.4g",  42.23);
+   TEST(" 42.2",   "%5.3g",  42.23);
+-  
++
+   TEST("   1",     "%*i",   4, 1);
+   TEST("   1",     "%4i",   1);
+   TEST("1   ",     "%-4i",  1);
+@@ -131,13 +146,32 @@ int main()
    TEST("-01234",   "%6.5i", -1234);
    TEST("  1234",   "%6.5s", "1234");
  
-+  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);
-+
-+#ifdef NAN  
-+  TEST("nan",  	"%f", NAN);
-+  TEST("NAN",  	"%F", NAN);
-+  TEST("nan",  	"%g", NAN);
-+  TEST("NAN",  	"%G", NAN);
++#ifdef 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);
 +#endif
-+  
++
++#ifdef NAN
++  TEST("nan",	"%f", NAN);
++  TEST("NAN",	"%F", NAN);
++  TEST("nan",	"%g", NAN);
++  TEST("NAN",	"%G", NAN);
++#endif
++
  #ifdef XSI_TESTS
    setlocale(LC_ALL, "de_DE");
-   
+-  
++
+   TEST("1.234",    "%'u", 1234);
+   TEST("2 1",      "%2$u %1$u",  1, 2);
+ #endif
+-  
+-  
++
++
+   return EXIT_SUCCESS;
+ }
 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 22:26:13.000000000 +0200
++++ dietlibc-0.31.20080409/include/stdlib.h	2008-04-13 23:34:48.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 fedora-extras-commits mailing list