This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

let gmp-mparam.h choose the type of mp_limb_t


mips64 n32 has 64-bit registers but has 32-bit longs.  It felt
wasteful to not use 64-bit arithmetic, directly supported by the
hardware, in the glibc-internal gmp code, so I've arranged for
gmp-mparam.h, where it made the most sense to define the macros that
control the type of mp_limb_t, to be included wherever gmp.h was
included.  Ok to install?

Index: ChangeLog
2003-03-14  Alexandre Oliva  <aoliva at redhat dot com>

	* include/gmp.h: Include/gmp-mparam.h.
	* stdlib/strtod.c: Include gmp-mparam.h before gmp.h and
	gmp-impl.h.

Index: include/gmp.h
===================================================================
RCS file: /cvs/glibc/libc/include/gmp.h,v
retrieving revision 1.1
diff -u -p -r1.1 gmp.h
--- include/gmp.h 5 Dec 2000 17:28:08 -0000 1.1
+++ include/gmp.h 14 Mar 2003 04:08:58 -0000
@@ -1,3 +1,7 @@
+/* Include gmp-mparam.h first, such that definitions of _SHORT_LIMB
+   and _LONG_LONG_LIMB in it can take effect into gmp.h.  */
+#include <gmp-mparam.h>
+
 #ifndef __GMP_H__
 
 #include <stdlib/gmp.h>
Index: stdlib/strtod.c
===================================================================
RCS file: /cvs/glibc/libc/stdlib/strtod.c,v
retrieving revision 1.71
diff -u -p -r1.71 strtod.c
--- stdlib/strtod.c 22 Feb 2003 09:11:04 -0000 1.71
+++ stdlib/strtod.c 14 Mar 2003 04:08:59 -0000
@@ -64,9 +64,11 @@
 /* The gmp headers need some configuration frobs.  */
 #define HAVE_ALLOCA 1
 
+/* Include gmp-mparam.h first, such that definitions of _SHORT_LIMB
+   and _LONG_LONG_LIMB in it can take effect into gmp.h.  */
+#include <gmp-mparam.h>
 #include <gmp.h>
 #include <gmp-impl.h>
-#include <gmp-mparam.h>
 #include <longlong.h>
 #include "fpioconst.h"
 
-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva at {redhat dot com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva at {lsd dot ic dot unicamp dot br, gnu.org}
Free Software Evangelist                Professional serial bug killer

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]