diff -ruN qemu/configure qemu-2/configure --- qemu/configure 2006-04-26 12:07:35.000000000 -0400 +++ qemu-2/configure 2006-04-27 02:46:01.988208000 -0400 @@ -148,9 +148,6 @@ make="gmake" install="ginstall" solarisrev=`uname -r | cut -f2 -d.` - if test $solarisrev -lt 10 ; then - presolaris10="yes" - fi fi # find source path @@ -640,9 +637,7 @@ fi if test "$solaris" = "yes" ; then echo "CONFIG_SOLARIS=yes" >> $config_mak - if test "$presolaris10" = "yes" ; then - echo "#define _PRESOLARIS10 1" >> $config_h - fi + echo "#define SOLARISREV $solarisrev" >> $config_h fi if test "$gdbstub" = "yes" ; then echo "CONFIG_GDBSTUB=yes" >> $config_mak diff -ruN qemu/fpu/softfloat-native.h qemu-2/fpu/softfloat-native.h --- qemu/fpu/softfloat-native.h 2006-04-26 11:55:55.000000000 -0400 +++ qemu-2/fpu/softfloat-native.h 2006-04-27 08:29:37.460606000 -0400 @@ -1,12 +1,62 @@ /* Native implementation of soft float functions */ #include -#if defined(_BSD) && !defined(__APPLE__) + +/* + * include if __sun__ or ( *BSD and not APPLE) + */ +#if defined(__sun__) || ( defined(_BSD) && !defined(__APPLE__)) #include +#endif + +/* + * include if ( APPLE and not *BSD ), including + * Solaris systems OS greater than 9 + */ +#if !defined(_BSD) || defined(__APPLE__) +/* + * define some things needed to compile qemu on Solaris 8/9 + * since is not available those versions of Solaris. + */ +#if defined(SOLARISREV) +#if SOLARISREV <= 9 +#define FE_TONEAREST 0 +#define FE_DOWNWARD 1 +#define FE_UPWARD 2 +#define FE_TOWARDZERO 3 +#define fabsf(f)((float)fabs(f)) #else -#if !defined(_PRESOLARIS10) #include #endif #endif +#endif + + +#if defined(__sun__) +/* + * Define some C99-7.12.3 classification macros and + * some C99-.12.4 for Solaris systems OS less than 10, + * or Solaris 10 systems running GCC 3.x or less. + * Solaris 10 with GCC4 does not need these macros as they + * are defined in with a compiler directive + */ +#if ( SOLARISREV <= 9 ) || ( ( SOLARISREV >= 10 ) && (__GNUC__ <= 4) ) +/* + * C99 7.12.3 classification macros + * and + * C99 7.12.14 comparison macros + * + * ... do not work on Solaris 10 using GNU CC 3.4.x. + * Try to workaround the missing / broken C99 math macros. + */ + +#define isnormal(x) (fpclass(x) >= FP_NZERO) +#define isgreater(x, y) ((!unordered(x, y)) && ((x) > (y))) +#define isgreaterequal(x, y) ((!unordered(x, y)) && ((x) >= (y))) +#define isless(x, y) ((!unordered(x, y)) && ((x) < (y))) +#define islessequal(x, y) ((!unordered(x, y)) && ((x) <= (y))) +#define isunordered(x,y) unordered(x, y) +#endif +#endif typedef float float32; typedef double float64;