aboutsummaryrefslogtreecommitdiff
path: root/include/libdecnumber/dconfig.h
diff options
context:
space:
mode:
authorTom Musta <tommusta@gmail.com>2014-04-21 15:54:48 -0500
committerAlexander Graf <agraf@suse.de>2014-06-16 13:24:28 +0200
commit7275585b8c0dda0720255c45489045b0c31092cc (patch)
treee9e557dda076b9e77b53469261272afda3aec152 /include/libdecnumber/dconfig.h
parent0f2d3732202818fb85c09d1c204a08c4d79b70bc (diff)
libdecnumber: Modify dconfig.h to Integrate with QEMU
Modify the dconfig.h header file so that libdecnumber code integrates QEMU configuration. Specifically: - the WORDS_BIGENDIAN preprocessor macro is used in libdecnumber code to determines endianness. It is derived from the existing QEMU macro HOST_WORDS_BIGENDIAN which is defined in config-host.h. - the DECPUN macro determines the number of decimal digits (aka declets) per unit (byte). This is 3 for PowerPC DFP. Signed-off-by: Tom Musta <tommusta@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'include/libdecnumber/dconfig.h')
-rw-r--r--include/libdecnumber/dconfig.h24
1 files changed, 6 insertions, 18 deletions
diff --git a/include/libdecnumber/dconfig.h b/include/libdecnumber/dconfig.h
index ffbad255ce..2f0455a06a 100644
--- a/include/libdecnumber/dconfig.h
+++ b/include/libdecnumber/dconfig.h
@@ -27,26 +27,14 @@
Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA. */
-#ifdef IN_LIBGCC2
+#include "config-host.h"
-#include "tconfig.h"
-#include "coretypes.h"
-#include "tm.h"
-
-#ifndef LIBGCC2_WORDS_BIG_ENDIAN
-#define LIBGCC2_WORDS_BIG_ENDIAN WORDS_BIG_ENDIAN
-#endif
-
-#ifndef LIBGCC2_FLOAT_WORDS_BIG_ENDIAN
-#define LIBGCC2_FLOAT_WORDS_BIG_ENDIAN LIBGCC2_WORDS_BIG_ENDIAN
-#endif
-
-#if LIBGCC2_FLOAT_WORDS_BIG_ENDIAN
+#if defined(HOST_WORDS_BIGENDIAN)
#define WORDS_BIGENDIAN 1
-#endif
-
#else
+#define WORDS_BIGENDIAN 0
+#endif
-#include "config.h"
-
+#ifndef DECDPUN
+#define DECDPUN 3
#endif