From: Kim De Mey Date: Wed, 11 Jun 2014 08:37:32 +0000 (+0200) Subject: Detect endianness at configuration with Autoconf AC_C_BIGENDIAN feature X-Git-Tag: jq-1.5rc1~199^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=refs%2Fpull%2F400%2Fhead;p=jq Detect endianness at configuration with Autoconf AC_C_BIGENDIAN feature --- diff --git a/configure.ac b/configure.ac index 8171c21..238405e 100644 --- a/configure.ac +++ b/configure.ac @@ -103,6 +103,12 @@ if test $have___thread = yes; then fi AC_MSG_RESULT($have___thread) +AC_C_BIGENDIAN( + AC_DEFINE([IEEE_MC68k], 1, [machine is bigendian]), + AC_DEFINE([IEEE_8087], 1, [machine is littleendian]), + AC_MSG_ERROR(unknown endianess), + AC_MSG_ERROR(universial endianess not supported) +) AC_SUBST([BUNDLER], ["$bundle_cmd"]) diff --git a/jv_dtoa.c b/jv_dtoa.c index b832526..4de92e4 100644 --- a/jv_dtoa.c +++ b/jv_dtoa.c @@ -187,7 +187,6 @@ * used for input more than STRTOD_DIGLIM digits long (default 40). */ -#define IEEE_8087 #define NO_ERRNO #define NO_HEX_FP #define No_Hex_NaN