]> git.proxmox.com Git - qemu.git/commitdiff
change HOST_SOLARIS to CONFIG_SOLARIS{_VERSION}
authorJuan Quintela <quintela@redhat.com>
Mon, 27 Jul 2009 14:12:40 +0000 (16:12 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 27 Jul 2009 19:09:16 +0000 (14:09 -0500)
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
configure
cpu-exec.c
dyngen-exec.h
fpu/softfloat-native.c
fpu/softfloat-native.h
fpu/softfloat.h
kqemu.c
osdep.c
target-mips/cpu.h
tcg/sparc/tcg-target.h

index e9ed09df97d2c95c5eb47d9ab2befce2f5201add..2600728f2e3efcda0354ac94faf397b1ad106056 100755 (executable)
--- a/configure
+++ b/configure
@@ -1588,7 +1588,8 @@ fi
 
 if test "$solaris" = "yes" ; then
   echo "CONFIG_SOLARIS=y" >> $config_host_mak
-  echo "#define HOST_SOLARIS $solarisrev" >> $config_host_h
+  echo "#define CONFIG_SOLARIS 1" >> $config_host_h
+  echo "#define CONFIG_SOLARIS_VERSION $solarisrev" >> $config_host_h
   if test "$needs_libsunmath" = "yes" ; then
     echo "NEEDS_LIBSUNMATH=yes" >> $config_host_mak
     echo "#define NEEDS_LIBSUNMATH 1" >> $config_host_h
index 2385d56bc30d2be3980b2fb70b905d0bd799a381..ae2fcd0827ad4f9d5375f139820c3762ed62fac2 100644 (file)
@@ -38,7 +38,7 @@
 #endif
 #endif
 
-#if defined(__sparc__) && !defined(HOST_SOLARIS)
+#if defined(__sparc__) && !defined(CONFIG_SOLARIS)
 // Work around ugly bugs in glibc that mangle global register contents
 #undef env
 #define env cpu_single_env
@@ -258,7 +258,7 @@ int cpu_exec(CPUState *env1)
     /* prepare setjmp context for exception handling */
     for(;;) {
         if (setjmp(env->jmp_env) == 0) {
-#if defined(__sparc__) && !defined(HOST_SOLARIS)
+#if defined(__sparc__) && !defined(CONFIG_SOLARIS)
 #undef env
                     env = cpu_single_env;
 #define env cpu_single_env
@@ -414,7 +414,7 @@ int cpu_exec(CPUState *env1)
                             env->interrupt_request &= ~(CPU_INTERRUPT_HARD | CPU_INTERRUPT_VIRQ);
                             intno = cpu_get_pic_interrupt(env);
                             qemu_log_mask(CPU_LOG_TB_IN_ASM, "Servicing hardware INT=0x%02x\n", intno);
-#if defined(__sparc__) && !defined(HOST_SOLARIS)
+#if defined(__sparc__) && !defined(CONFIG_SOLARIS)
 #undef env
                     env = cpu_single_env;
 #define env cpu_single_env
@@ -644,7 +644,7 @@ int cpu_exec(CPUState *env1)
                 while (env->current_tb) {
                     tc_ptr = tb->tc_ptr;
                 /* execute the generated code */
-#if defined(__sparc__) && !defined(HOST_SOLARIS)
+#if defined(__sparc__) && !defined(CONFIG_SOLARIS)
 #undef env
                     env = cpu_single_env;
 #define env cpu_single_env
@@ -1435,7 +1435,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
     siginfo_t *info = pinfo;
     int is_write;
     uint32_t insn;
-#if !defined(__arch64__) || defined(HOST_SOLARIS)
+#if !defined(__arch64__) || defined(CONFIG_SOLARIS)
     uint32_t *regs = (uint32_t *)(info + 1);
     void *sigmask = (regs + 20);
     /* XXX: is there a standard glibc define ? */
index c0077634e51b467308761f1e3182e0de6eba971d..c1072cdccb0d471aeb7893b360360e3cbe2e02cb 100644 (file)
@@ -75,7 +75,7 @@ extern int printf(const char *, ...);
 #define AREG1 "s0"
 #define AREG2 "s1"
 #elif defined(__sparc__)
-#ifdef HOST_SOLARIS
+#ifdef CONFIG_SOLARIS
 #define AREG0 "g2"
 #define AREG1 "g3"
 #define AREG2 "g4"
index 2af07a3f8f987df26067cffef1359b7cd7437da6..95769848383d207e84ae6c07420b2256b2e31e3e 100644 (file)
@@ -2,7 +2,7 @@
    context is supported */
 #include "softfloat.h"
 #include <math.h>
-#if defined(HOST_SOLARIS)
+#if defined(CONFIG_SOLARIS)
 #include <fenv.h>
 #endif
 
@@ -10,7 +10,7 @@ void set_float_rounding_mode(int val STATUS_PARAM)
 {
     STATUS(float_rounding_mode) = val;
 #if defined(HOST_BSD) && !defined(__APPLE__) ||         \
-    (defined(HOST_SOLARIS) && HOST_SOLARIS < 10)
+    (defined(CONFIG_SOLARIS) && CONFIG_SOLARIS_VERSION < 10)
     fpsetround(val);
 #elif defined(__arm__)
     /* nothing to do */
@@ -26,7 +26,8 @@ void set_floatx80_rounding_precision(int val STATUS_PARAM)
 }
 #endif
 
-#if defined(HOST_BSD) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10)
+#if defined(HOST_BSD) || \
+    (defined(CONFIG_SOLARIS) && CONFIG_SOLARIS_VERSION < 10)
 #define lrint(d)               ((int32_t)rint(d))
 #define llrint(d)              ((int64_t)rint(d))
 #define lrintf(f)              ((int32_t)rint(f))
@@ -34,7 +35,8 @@ void set_floatx80_rounding_precision(int val STATUS_PARAM)
 #define sqrtf(f)               ((float)sqrt(f))
 #define remainderf(fa, fb)     ((float)remainder(fa, fb))
 #define rintf(f)               ((float)rint(f))
-#if !defined(__sparc__) && defined(HOST_SOLARIS) && HOST_SOLARIS < 10
+#if !defined(__sparc__) && \
+    (defined(CONFIG_SOLARIS) && CONFIG_SOLARIS_VERSION < 10)
 extern long double rintl(long double);
 extern long double scalbnl(long double, int);
 
@@ -349,7 +351,8 @@ uint64_t float64_to_uint64_round_to_zero (float64 a STATUS_PARAM)
 /*----------------------------------------------------------------------------
 | Software IEC/IEEE double-precision operations.
 *----------------------------------------------------------------------------*/
-#if defined(__sun__) && defined(HOST_SOLARIS) && HOST_SOLARIS < 10
+#if defined(__sun__) && \
+    (defined(CONFIG_SOLARIS) && CONFIG_SOLARIS_VERSION < 10)
 static inline float64 trunc(float64 x)
 {
     return x < 0 ? -floor(-x) : floor(x);
index a28c76947236b4f8758731441339e2ca215e328f..839e5b15660dbd8a5c5357cefb003995725d8293 100644 (file)
@@ -1,7 +1,7 @@
 /* Native implementation of soft float functions */
 #include <math.h>
 
-#if (defined(HOST_BSD) && !defined(__APPLE__)) || defined(HOST_SOLARIS)
+#if (defined(HOST_BSD) && !defined(__APPLE__)) || defined(CONFIG_SOLARIS)
 #include <ieeefp.h>
 #define fabsf(f) ((float)fabs(f))
 #else
@@ -19,8 +19,9 @@
  *   Solaris 10 with GCC4 does not need these macros as they
  *   are defined in <iso/math_c99.h> with a compiler directive
  */
-#if defined(HOST_SOLARIS) && (( HOST_SOLARIS <= 9 ) || ((HOST_SOLARIS >= 10) \
-                                                        && (__GNUC__ < 4))) \
+#if defined(CONFIG_SOLARIS) && \
+           ((CONFIG_SOLARIS_VERSION <= 9 ) || \
+           ((CONFIG_SOLARIS_VERSION >= 10) && (__GNUC__ < 4))) \
     || (defined(__OpenBSD__) && (OpenBSD < 200811))
 /*
  * C99 7.12.3 classification macros
@@ -111,7 +112,7 @@ typedef union {
 /*----------------------------------------------------------------------------
 | Software IEC/IEEE floating-point rounding mode.
 *----------------------------------------------------------------------------*/
-#if (defined(HOST_BSD) && !defined(__APPLE__)) || defined(HOST_SOLARIS)
+#if (defined(HOST_BSD) && !defined(__APPLE__)) || defined(CONFIG_SOLARIS)
 #if defined(__OpenBSD__)
 #define FE_RM FP_RM
 #define FE_RP FP_RP
index 850a01f080ebb1b150eb8f0502f212776b426088..b9537c144f8d3771425c0849ca7a6d9af2a5ce16 100644 (file)
@@ -32,7 +32,7 @@ these four paragraphs for those parts of this code that are retained.
 #ifndef SOFTFLOAT_H
 #define SOFTFLOAT_H
 
-#if defined(HOST_SOLARIS) && defined(NEEDS_LIBSUNMATH)
+#if defined(CONFIG_SOLARIS) && defined(NEEDS_LIBSUNMATH)
 #include <sunmath.h>
 #endif
 
diff --git a/kqemu.c b/kqemu.c
index 825c0f13f1f4268d1f0ebe44536d059d9e3254e4..5611bc89467af4819ce94fa8ea937f0ad4c98465 100644 (file)
--- a/kqemu.c
+++ b/kqemu.c
@@ -25,7 +25,7 @@
 #include <sys/mman.h>
 #include <sys/ioctl.h>
 #endif
-#ifdef HOST_SOLARIS
+#ifdef CONFIG_SOLARIS
 #include <sys/ioccom.h>
 #endif
 #include <stdlib.h>
diff --git a/osdep.c b/osdep.c
index 410e43681b866bbe3616f0f9e15af08871b84236..b2e3b4167257dd79e98fa9c1709e69141767a5ad 100644 (file)
--- a/osdep.c
+++ b/osdep.c
@@ -28,7 +28,7 @@
 #include <errno.h>
 #include <unistd.h>
 #include <fcntl.h>
-#ifdef HOST_SOLARIS
+#ifdef CONFIG_SOLARIS
 #include <sys/types.h>
 #include <sys/statvfs.h>
 #endif
@@ -116,7 +116,7 @@ static void *kqemu_vmalloc(size_t size)
     int map_anon = 0;
     const char *tmpdir;
     char phys_ram_file[1024];
-#ifdef HOST_SOLARIS
+#ifdef CONFIG_SOLARIS
     struct statvfs stfs;
 #else
     struct statfs stfs;
@@ -129,7 +129,7 @@ static void *kqemu_vmalloc(size_t size)
     if (phys_ram_fd < 0) {
         tmpdir = getenv("QEMU_TMPDIR");
         if (!tmpdir)
-#ifdef HOST_SOLARIS
+#ifdef CONFIG_SOLARIS
             tmpdir = "/tmp";
         if (statvfs(tmpdir, &stfs) == 0) {
 #else
index bb9a49b98512c0b623c49ff19ded5c878361889f..5115cd6fcfd59c76f995a9515d79a550e4db080e 100644 (file)
@@ -14,7 +14,7 @@
 
 // uint_fast8_t and uint_fast16_t not in <sys/int_types.h>
 // XXX: move that elsewhere
-#if defined(HOST_SOLARIS) && HOST_SOLARIS < 10
+#if defined(CONFIG_SOLARIS) && CONFIG_SOLARIS_VERSION < 10
 typedef unsigned char           uint_fast8_t;
 typedef unsigned int            uint_fast16_t;
 #endif
index 97f353305d96ae4955cd2d9fb92b40f0f2b13d10..e8f8f65ee1853501b4b9e5157f0310b31c2f5496 100644 (file)
@@ -95,7 +95,7 @@ enum {
 
 
 /* Note: must be synced with dyngen-exec.h and Makefile.target */
-#ifdef HOST_SOLARIS
+#ifdef CONFIG_SOLARIS
 #define TCG_AREG0 TCG_REG_G2
 #define TCG_AREG1 TCG_REG_G3
 #define TCG_AREG2 TCG_REG_G4