[Gmp-commit] /var/hg/gmp: 3 new changesets

mercurial at gmplib.org mercurial at gmplib.org
Sun Feb 25 16:22:02 UTC 2018


details:   /var/hg/gmp/rev/29f56453f7c4
changeset: 17568:29f56453f7c4
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Sun Feb 25 17:19:27 2018 +0100
description:
mpq/equal.c: Check size early.

details:   /var/hg/gmp/rev/04bc88ce93f9
changeset: 17569:04bc88ce93f9
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Sun Feb 25 17:21:31 2018 +0100
description:
Avoid empty translation units.

details:   /var/hg/gmp/rev/49fae824cbaf
changeset: 17570:49fae824cbaf
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Sun Feb 25 17:21:44 2018 +0100
description:
Changelog

diffstat:

 ChangeLog               |   6 ++++++
 mpq/equal.c             |  10 +++++-----
 printf/obprintf.c       |   2 ++
 printf/obprntffuns.c    |   2 ++
 printf/obvprintf.c      |   2 ++
 printf/repl-vsnprintf.c |   5 ++---
 6 files changed, 19 insertions(+), 8 deletions(-)

diffs (95 lines):

diff -r 0c67d8cbd906 -r 49fae824cbaf ChangeLog
--- a/ChangeLog	Sun Feb 25 11:37:10 2018 +0100
+++ b/ChangeLog	Sun Feb 25 17:21:44 2018 +0100
@@ -4,6 +4,12 @@
 	* mpq/swap.c: Use *_SWAP_* macros.
 	* mpq/cmp_ui.c: One more little shortcut, comparing fractions to 1.
 	* mpq/get_d.c: Compare (zeros > 0) once, replace tdiv_qr with div_q.
+	* mpq/equal.c: Check size early.
+
+	* printf/obprintf.c: Adda dummy typedef to avoid empty unit.
+	* b/printf/obvprintf.c: Likewise.
+	* b/printf/obprntffuns.c: Likewise.
+	* b/printf/repl-vsnprintf.c: Move #ifdef after #include gmp-impl.h .
 
 2018-02-09  Torbjörn Granlund  <tg at gmplib.org>
 
diff -r 0c67d8cbd906 -r 49fae824cbaf mpq/equal.c
--- a/mpq/equal.c	Sun Feb 25 11:37:10 2018 +0100
+++ b/mpq/equal.c	Sun Feb 25 17:21:44 2018 +0100
@@ -46,6 +46,11 @@
   if (num1_size != num2_size)
     return 0;
 
+  den1_size = SIZ(DEN(op1));
+  den2_size = SIZ(DEN(op2));
+  if (den1_size != den2_size)
+    return 0;
+
   num1_ptr = PTR(NUM(op1));
   num2_ptr = PTR(NUM(op2));
   num1_size = ABS (num1_size);
@@ -53,11 +58,6 @@
     if (num1_ptr[i] != num2_ptr[i])
       return 0;
 
-  den1_size = SIZ(DEN(op1));
-  den2_size = SIZ(DEN(op2));
-  if (den1_size != den2_size)
-    return 0;
-
   den1_ptr = PTR(DEN(op1));
   den2_ptr = PTR(DEN(op2));
   for (i = 0; i < den1_size; i++)
diff -r 0c67d8cbd906 -r 49fae824cbaf printf/obprintf.c
--- a/printf/obprintf.c	Sun Feb 25 11:37:10 2018 +0100
+++ b/printf/obprintf.c	Sun Feb 25 17:21:44 2018 +0100
@@ -55,4 +55,6 @@
   return ret;
 }
 
+#else
+typedef int __gmp_dummy_typedef;
 #endif /* HAVE_OBSTACK_VPRINTF */
diff -r 0c67d8cbd906 -r 49fae824cbaf printf/obprntffuns.c
--- a/printf/obprntffuns.c	Sun Feb 25 11:37:10 2018 +0100
+++ b/printf/obprntffuns.c	Sun Feb 25 17:21:44 2018 +0100
@@ -68,4 +68,6 @@
   (doprnt_reps_t)   gmp_obstack_reps
 };
 
+#else
+typedef int __gmp_dummy_typedef;
 #endif /* HAVE_OBSTACK_VPRINTF */
diff -r 0c67d8cbd906 -r 49fae824cbaf printf/obvprintf.c
--- a/printf/obvprintf.c	Sun Feb 25 11:37:10 2018 +0100
+++ b/printf/obvprintf.c	Sun Feb 25 17:21:44 2018 +0100
@@ -48,4 +48,6 @@
   return __gmp_doprnt (&__gmp_obstack_printf_funs, ob, fmt, ap);
 }
 
+#else
+typedef int __gmp_dummy_typedef;
 #endif /* HAVE_OBSTACK_VPRINTF */
diff -r 0c67d8cbd906 -r 49fae824cbaf printf/repl-vsnprintf.c
--- a/printf/repl-vsnprintf.c	Sun Feb 25 11:37:10 2018 +0100
+++ b/printf/repl-vsnprintf.c	Sun Feb 25 17:21:44 2018 +0100
@@ -35,9 +35,6 @@
 
 #include "config.h"
 
-#if ! HAVE_VSNPRINTF   /* only need this file if we don't have vsnprintf */
-
-
 #define _GNU_SOURCE    /* for strnlen prototype */
 
 #include <stdarg.h>
@@ -66,6 +63,8 @@
 #include "gmp-impl.h"
 
 
+#if ! HAVE_VSNPRINTF   /* only need this file if we don't have vsnprintf */
+
 /* Autoconf notes that AIX 4.3 has a broken strnlen, but fortunately it
    doesn't affect us since __gmp_replacement_vsnprintf is not required on
    that system.  */


More information about the gmp-commit mailing list