merge from gcc
authorDJ Delorie <dj@redhat.com>
Fri, 25 Jan 2008 19:05:44 +0000 (19:05 +0000)
committerDJ Delorie <dj@redhat.com>
Fri, 25 Jan 2008 19:05:44 +0000 (19:05 +0000)
15 files changed:
libdecnumber/ChangeLog
libdecnumber/Makefile.in
libdecnumber/decCommon.c
libdecnumber/decCommonSymbols.h [new file with mode: 0644]
libdecnumber/decContextSymbols.h
libdecnumber/decDPD.h
libdecnumber/decDPDSymbols.h [new file with mode: 0644]
libdecnumber/decNumberLocal.h
libdecnumber/decNumberSymbols.h
libdecnumber/dpd/decimal128.c
libdecnumber/dpd/decimal128Symbols.h
libdecnumber/dpd/decimal32.c
libdecnumber/dpd/decimal32Symbols.h
libdecnumber/dpd/decimal64.c
libdecnumber/dpd/decimal64Symbols.h

index 939e00ec3f2fd7b8ef0a6ced017ff82048307c83..8e8cf1ac0fa1096d11b66c56913e8efb0951ae65 100644 (file)
@@ -1,3 +1,23 @@
+2008-01-25  Janis Johnson  <janis187@us.ibm.com>
+
+       * decCommonSymbols.h: Commit.
+       * decDPDSybmols.h: Commit.
+
+       * Makefile.in (libdecnumber_a_SOURCES): List Symbols headers.
+       * decCommonSymbols.h: New file.
+       * decCommon.c: Include it.
+       * decDPDSymbols.h: New file.
+       * decDPD.h: Include it.
+       * decNumberLocal.h: Include the two new files.
+       * decContextSymbols.h (DECPOWERS, DECSTICKYTAB): New.
+       * decNumberSymbols.h (LNnn, d2utable): New.
+       * dpd/decimal32Symbols.h (COMBEXP, COMBMSD, DPD2BIN, BIN2DPD): New.
+       * dpd/decimal64Symbols.h (COMBEXP, COMBMSD, DPD2BIN, BIN2DPD): New.
+       * dpd/decimal128Symbols.h (COMBEXP, COMBMSD, DPD2BIN, BIN2DPD): New.
+       * dpd/decimal32.c: Remove redefine of DPD2BIN, BIN2DPD.
+       * dpd/decimal64.c: Ditto.
+       * dpd/decimal128.c: Ditto.
+
 2007-11-26  Thiago Jung Bauermann  <bauerman@br.ibm.com>
 
        * Makefile.in (decimal32.o): Prepend $(srcdir) to dependencies
index 7e0b6acfd54c505dfe907095a7ce9511ac44fbbf..00b16b297dd423d1f74aac7827dbf0d6a7a0d9f7 100644 (file)
@@ -65,9 +65,10 @@ libdecnumber_a_OBJS = decNumber.o decContext.o \
 
 libdecnumber_a_SOURCES = decContext.c decContext.h decDPD.h \
        decNumber.c decNumber.h decNumberLocal.h \
-       dpd/decimal128.c dpd/decimal128.h \
-       dpd/decimal32.c dpd/decimal32.h \
-       dpd/decimal64.c dpd/decimal64.h \
+       decContextSymbols.h decDPDSymbols.h decNumberSymbols.h \
+       dpd/decimal128.c dpd/decimal128.h dpd/decimal128Symbols.h \
+       dpd/decimal32.c dpd/decimal32.h dpd/decimal32Symbols.h \
+       dpd/decimal64.c dpd/decimal64.h dpd/decimal64Symbols.h \
        bid/decimal128.c bid/decimal128.h \
        bid/decimal32.c bid/decimal32.h \
        bid/decimal64.c bid/decimal64.h
index 84e1b2ad530db2374c1f5436da71474a5138a7f6..fa16e792e668058f37129685c06f72502f3426af 100644 (file)
@@ -50,6 +50,8 @@
 /* OR) or the rounding mode read; all other fields are ignored and */
 /* untouched. */
 
+#include "decCommonSymbols.h"
+
 /* names for simpler testing and default context */
 #if DECPMAX==7
   #define SINGLE     1
diff --git a/libdecnumber/decCommonSymbols.h b/libdecnumber/decCommonSymbols.h
new file mode 100644 (file)
index 0000000..ee01652
--- /dev/null
@@ -0,0 +1,9 @@
+#if !defined(DECCOMMONSYMBOLS)
+#define DECCOMMONSYMBOLS
+
+#ifdef IN_LIBGCC2
+#define DECCOMBFROM __decCOMBFROM
+#define DECCOMBMSD __decCOMBMSD
+#endif
+
+#endif
index 38830a916dc397eb846abbd403c467a7037cc59f..464605365970ceece65062370c41d76232294687 100644 (file)
@@ -17,6 +17,8 @@
 #define decContextTestSavedStatus __decContextTestSavedStatus
 #define decContextTestStatus __decContextTestStatus
 #define decContextZeroStatus __decContextZeroStatus
+#define DECPOWERS __decPOWERS
+#define DECSTICKYTAB __decSTICKYTAB
 #endif
 
 #endif
index 8e0347c6aa85f6413e9a0b05c65339389a67e01f..a4710d64391842637f810260287f0e249195960d 100644 (file)
@@ -34,7 +34,9 @@
 /* ------------------------------------------------------------------------ */
 /* ------------------------------------------------------------------------ */
 /* For details, see: http://www2.hursley.ibm.com/decimal/DPDecimal.html            */
-/*                                                                         */
+
+#include "decDPDSymbols.h"
+
 /* This include file defines several DPD and BCD conversion tables:        */
 /*                                                                         */
 /*   uint16_t BCD2DPD[2458];    -- BCD -> DPD (0x999 => 2457)              */
diff --git a/libdecnumber/decDPDSymbols.h b/libdecnumber/decDPDSymbols.h
new file mode 100644 (file)
index 0000000..847248d
--- /dev/null
@@ -0,0 +1,15 @@
+#if !defined(DECDPDSYMBOLS)
+#define DECDPDSYMBOLS
+
+#ifdef IN_LIBGCC2
+#define BCD2DPD __decBCD2DPD
+#define BIN2BCD8 __decBIN2BCD8
+#define BIN2CHAR __decBIN2CHAR
+#define BIN2DPD __decBIN2DPD
+#define DPD2BCD8 __decDPD2BCD8
+#define DPD2BIN __decDPD2BIN
+#define DPD2BINK __decDPD2BINK
+#define DPD2BINM __decDPD2BINM
+#endif
+
+#endif
index 891a0841c894edae4df4f62898c5a1eb3678a31a..c07e8cd6ef42a7e51944d9bd8969bfe3d29dabad 100644 (file)
   extern const uByte  DECSTICKYTAB[10]; /* re-round digits if sticky  */
   extern const uInt   DECPOWERS[10];   /* powers of ten table        */
   /* The following are included from decDPD.h                        */
+#include "decDPDSymbols.h"
   extern const uShort DPD2BIN[1024];   /* DPD -> 0-999               */
   extern const uShort BIN2DPD[1000];   /* 0-999 -> DPD               */
   extern const uInt   DPD2BINK[1024];  /* DPD -> 0-999000            */
   #define DFISSNAN(df)   ((DFWORD(df, 0)&0x7e000000)==0x7e000000)
 
   /* Shared lookup tables                                            */
+#include "decCommonSymbols.h"
   extern const uInt   DECCOMBMSD[64];  /* Combination field -> MSD   */
   extern const uInt   DECCOMBFROM[48]; /* exp+msd -> Combination     */
 
index e638a070b1c60c6cfac665abea2315d860b70b0f..93558961bcd4a523c6ed97eaeafba6bb7b13dc5f 100644 (file)
@@ -64,6 +64,8 @@
 #define decNumberVersion __decNumberVersion
 #define decNumberXor __decNumberXor
 #define decNumberZero __decNumberZero
+#define LNnn __decLNnn
+#define d2utable __decd2utable
 #endif
 
 #endif
index 6aa98b5a21de9a6af03a1f23dc017861848019b9..0e32ceb181c68b654eee6ba47fdfcb16bd0d168a 100644 (file)
 #include "decimal128.h"              /* our primary include */
 
 /* Utility routines and tables [in decimal64.c] */
-/* DPD2BIN and the reverse are renamed to prevent link-time conflict */
-/* if decQuad is also built in the same executable */
-#define DPD2BIN DPD2BINx
-#define BIN2DPD BIN2DPDx
 extern const uInt   COMBEXP[32], COMBMSD[32];
 extern const uShort DPD2BIN[1024];
 extern const uShort BIN2DPD[1000];     /* [not used] */
index da9d76beaf6ae5c66986032d0427735cba875991..b30687c2b4b87380423b8d1c8caf6760984deff3 100644 (file)
 #define decimal128ToEngString __decimal128ToEngString
 #define decimal128ToNumber __decimal128ToNumber
 #define decimal128ToString __decimal128ToString
+#define COMBEXP __decnnCOMBEXP
+#define COMBMSD __decnnCOMBMSD
+
+/* DPD2BIN and BIN2DPD are used in support for decimal32/decimal64/decimal128
+   and also in support for decSingle/decDouble/decQuad.  Rename them in case
+   both types of support are used in the same executable.  */
+#undef DPD2BIN
+#define DPD2BIN __decnnDPD2BIN
+#undef BIN2DPD
+#define BIN2DPD __decnnBIN2DPD
 #endif
 
 #endif
index 692c2f70ecbdebe4fce0650c8646ae5582936eb3..42bddf172afc2309da464f235bd7d47bcf066dd6 100644 (file)
 #include "decimal32.h"       /* our primary include */
 
 /* Utility tables and routines [in decimal64.c] */
-/* DPD2BIN and the reverse are renamed to prevent link-time conflict */
-/* if decQuad is also built in the same executable */
-#define DPD2BIN DPD2BINx
-#define BIN2DPD BIN2DPDx
 extern const uInt   COMBEXP[32], COMBMSD[32];
 extern const uShort DPD2BIN[1024];
 extern const uShort BIN2DPD[1000];
index de119346c4ccdf6b92832498df4973e83e0dd0ce..c4aa74fdfd3d514a0bab90e6f1b30e7b6ebf12ca 100644 (file)
 #define decimal32ToEngString __decimal32ToEngString
 #define decimal32ToNumber __decimal32ToNumber
 #define decimal32ToString __decimal32ToString
+#define COMBEXP __decnnCOMBEXP
+#define COMBMSD __decnnCOMBMSD
+
+/* DPD2BIN and BIN2DPD are used in support for decimal32/decimal64/decimal128
+   and also in support for decSingle/decDouble/decQuad.  Rename them in case
+   both types of support are used in the same executable.  */
+#undef DPD2BIN
+#define DPD2BIN __decnnDPD2BIN
+#undef BIN2DPD
+#define BIN2DPD __decnnBIN2DPD
 #endif
 
 #endif
index 359214e5dbe1cc6ac7339824688894a64e036fff..c3617c46c088a3cf14bfb41801e0695c6bb6b3ae 100644 (file)
 #include "decimal64.h"       /* our primary include */
 
 /* Utility routines and tables [in decimal64.c]; externs for C++ */
-/* DPD2BIN and the reverse are renamed to prevent link-time conflict */
-/* if decQuad is also built in the same executable */
-#define DPD2BIN DPD2BINx
-#define BIN2DPD BIN2DPDx
 extern const uInt COMBEXP[32], COMBMSD[32];
 extern const uShort DPD2BIN[1024];
 extern const uShort BIN2DPD[1000];
index cf965bf5bd8d0d58128f2e60682a7d35ed6d1b7b..efb64463817ad4f7bd76e78c91d0a65ed8eafa5a 100644 (file)
 #define decimal64ToEngString __decimal64ToEngString
 #define decimal64ToNumber __decimal64ToNumber
 #define decimal64ToString __decimal64ToString
+#define COMBEXP __decnnCOMBEXP
+#define COMBMSD __decnnCOMBMSD
+
+/* DPD2BIN and BIN2DPD are used in support for decimal32/decimal64/decimal128
+   and also in support for decSingle/decDouble/decQuad.  Rename them in case
+   both types of support are used in the same executable.  */
+#undef DPD2BIN
+#define DPD2BIN __decnnDPD2BIN
+#undef BIN2DPD
+#define BIN2DPD __decnnBIN2DPD
 #endif
 
 #endif