diff options
author | rmanfredi <rmanfredi@2592e710-e01b-42a5-8df0-11608a6cc53d> | 2014-04-08 10:42:58 +0000 |
---|---|---|
committer | rmanfredi <rmanfredi@2592e710-e01b-42a5-8df0-11608a6cc53d> | 2014-04-08 10:42:58 +0000 |
commit | 316daa956e6274a64839b2fc717161ca6384b68c (patch) | |
tree | 8d7321aaf43f20b4f0455ab543f3269a87dd1ebe | |
parent | 23abf3aa9a6400ac468d296658638c3150c41729 (diff) |
Fixed detection of IEEE-754 floating point byte ordering for Solaris.
git-svn-id: svn://svn.code.sf.net/p/dist/code/trunk/dist@178 2592e710-e01b-42a5-8df0-11608a6cc53d
-rw-r--r-- | mcon/U/d_ieee754.U | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/mcon/U/d_ieee754.U b/mcon/U/d_ieee754.U index 05716bb..1abb0aa 100644 --- a/mcon/U/d_ieee754.U +++ b/mcon/U/d_ieee754.U @@ -35,6 +35,7 @@ ?H:#define IEEE754_BYTEORDER 0x$ieee754_byteorder /* large digits for MSB */ ?H:. ?T:order +?F:!str !try.c ?LINT:set d_ieee754 : check for ieee754 float and their endianness ?X: @@ -58,8 +59,21 @@ if $cc -c $ccflags try.c >/dev/null 2>&1; then elif $contains isIEEE754Sys try$_o >/dev/null 2>&1; then val=$define order=1234 +?X: +?X: On Solaris, "grep" does not work on binary files -- use strings. +?X: else - val=$undef + strings try$_o >str 2>/dev/null + if $contains ISieee754Sys str >/dev/null 2>&1; then + val=$define + order=4321 + elif $contains isIEEE754Sys str >/dev/null 2>&1; then + val=$define + order=1234 + else + val=$undef + fi + $rm -f str fi fi set d_ieee754 |