Commit dfe5fff3eaab1285cd1565fa0a33e5acd13b279c

Authored by Juan Quintela
Committed by Anthony Liguori
1 parent a8cd70fc

change HOST_SOLARIS to CONFIG_SOLARIS{_VERSION}

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
configure
... ... @@ -1588,7 +1588,8 @@ fi
1588 1588  
1589 1589 if test "$solaris" = "yes" ; then
1590 1590 echo "CONFIG_SOLARIS=y" >> $config_host_mak
1591   - echo "#define HOST_SOLARIS $solarisrev" >> $config_host_h
  1591 + echo "#define CONFIG_SOLARIS 1" >> $config_host_h
  1592 + echo "#define CONFIG_SOLARIS_VERSION $solarisrev" >> $config_host_h
1592 1593 if test "$needs_libsunmath" = "yes" ; then
1593 1594 echo "NEEDS_LIBSUNMATH=yes" >> $config_host_mak
1594 1595 echo "#define NEEDS_LIBSUNMATH 1" >> $config_host_h
... ...
cpu-exec.c
... ... @@ -38,7 +38,7 @@
38 38 #endif
39 39 #endif
40 40  
41   -#if defined(__sparc__) && !defined(HOST_SOLARIS)
  41 +#if defined(__sparc__) && !defined(CONFIG_SOLARIS)
42 42 // Work around ugly bugs in glibc that mangle global register contents
43 43 #undef env
44 44 #define env cpu_single_env
... ... @@ -258,7 +258,7 @@ int cpu_exec(CPUState *env1)
258 258 /* prepare setjmp context for exception handling */
259 259 for(;;) {
260 260 if (setjmp(env->jmp_env) == 0) {
261   -#if defined(__sparc__) && !defined(HOST_SOLARIS)
  261 +#if defined(__sparc__) && !defined(CONFIG_SOLARIS)
262 262 #undef env
263 263 env = cpu_single_env;
264 264 #define env cpu_single_env
... ... @@ -414,7 +414,7 @@ int cpu_exec(CPUState *env1)
414 414 env->interrupt_request &= ~(CPU_INTERRUPT_HARD | CPU_INTERRUPT_VIRQ);
415 415 intno = cpu_get_pic_interrupt(env);
416 416 qemu_log_mask(CPU_LOG_TB_IN_ASM, "Servicing hardware INT=0x%02x\n", intno);
417   -#if defined(__sparc__) && !defined(HOST_SOLARIS)
  417 +#if defined(__sparc__) && !defined(CONFIG_SOLARIS)
418 418 #undef env
419 419 env = cpu_single_env;
420 420 #define env cpu_single_env
... ... @@ -644,7 +644,7 @@ int cpu_exec(CPUState *env1)
644 644 while (env->current_tb) {
645 645 tc_ptr = tb->tc_ptr;
646 646 /* execute the generated code */
647   -#if defined(__sparc__) && !defined(HOST_SOLARIS)
  647 +#if defined(__sparc__) && !defined(CONFIG_SOLARIS)
648 648 #undef env
649 649 env = cpu_single_env;
650 650 #define env cpu_single_env
... ... @@ -1435,7 +1435,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
1435 1435 siginfo_t *info = pinfo;
1436 1436 int is_write;
1437 1437 uint32_t insn;
1438   -#if !defined(__arch64__) || defined(HOST_SOLARIS)
  1438 +#if !defined(__arch64__) || defined(CONFIG_SOLARIS)
1439 1439 uint32_t *regs = (uint32_t *)(info + 1);
1440 1440 void *sigmask = (regs + 20);
1441 1441 /* XXX: is there a standard glibc define ? */
... ...
dyngen-exec.h
... ... @@ -75,7 +75,7 @@ extern int printf(const char *, ...);
75 75 #define AREG1 "s0"
76 76 #define AREG2 "s1"
77 77 #elif defined(__sparc__)
78   -#ifdef HOST_SOLARIS
  78 +#ifdef CONFIG_SOLARIS
79 79 #define AREG0 "g2"
80 80 #define AREG1 "g3"
81 81 #define AREG2 "g4"
... ...
fpu/softfloat-native.c
... ... @@ -2,7 +2,7 @@
2 2 context is supported */
3 3 #include "softfloat.h"
4 4 #include <math.h>
5   -#if defined(HOST_SOLARIS)
  5 +#if defined(CONFIG_SOLARIS)
6 6 #include <fenv.h>
7 7 #endif
8 8  
... ... @@ -10,7 +10,7 @@ void set_float_rounding_mode(int val STATUS_PARAM)
10 10 {
11 11 STATUS(float_rounding_mode) = val;
12 12 #if defined(HOST_BSD) && !defined(__APPLE__) || \
13   - (defined(HOST_SOLARIS) && HOST_SOLARIS < 10)
  13 + (defined(CONFIG_SOLARIS) && CONFIG_SOLARIS_VERSION < 10)
14 14 fpsetround(val);
15 15 #elif defined(__arm__)
16 16 /* nothing to do */
... ... @@ -26,7 +26,8 @@ void set_floatx80_rounding_precision(int val STATUS_PARAM)
26 26 }
27 27 #endif
28 28  
29   -#if defined(HOST_BSD) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10)
  29 +#if defined(HOST_BSD) || \
  30 + (defined(CONFIG_SOLARIS) && CONFIG_SOLARIS_VERSION < 10)
30 31 #define lrint(d) ((int32_t)rint(d))
31 32 #define llrint(d) ((int64_t)rint(d))
32 33 #define lrintf(f) ((int32_t)rint(f))
... ... @@ -34,7 +35,8 @@ void set_floatx80_rounding_precision(int val STATUS_PARAM)
34 35 #define sqrtf(f) ((float)sqrt(f))
35 36 #define remainderf(fa, fb) ((float)remainder(fa, fb))
36 37 #define rintf(f) ((float)rint(f))
37   -#if !defined(__sparc__) && defined(HOST_SOLARIS) && HOST_SOLARIS < 10
  38 +#if !defined(__sparc__) && \
  39 + (defined(CONFIG_SOLARIS) && CONFIG_SOLARIS_VERSION < 10)
38 40 extern long double rintl(long double);
39 41 extern long double scalbnl(long double, int);
40 42  
... ... @@ -349,7 +351,8 @@ uint64_t float64_to_uint64_round_to_zero (float64 a STATUS_PARAM)
349 351 /*----------------------------------------------------------------------------
350 352 | Software IEC/IEEE double-precision operations.
351 353 *----------------------------------------------------------------------------*/
352   -#if defined(__sun__) && defined(HOST_SOLARIS) && HOST_SOLARIS < 10
  354 +#if defined(__sun__) && \
  355 + (defined(CONFIG_SOLARIS) && CONFIG_SOLARIS_VERSION < 10)
353 356 static inline float64 trunc(float64 x)
354 357 {
355 358 return x < 0 ? -floor(-x) : floor(x);
... ...
fpu/softfloat-native.h
1 1 /* Native implementation of soft float functions */
2 2 #include <math.h>
3 3  
4   -#if (defined(HOST_BSD) && !defined(__APPLE__)) || defined(HOST_SOLARIS)
  4 +#if (defined(HOST_BSD) && !defined(__APPLE__)) || defined(CONFIG_SOLARIS)
5 5 #include <ieeefp.h>
6 6 #define fabsf(f) ((float)fabs(f))
7 7 #else
... ... @@ -19,8 +19,9 @@
19 19 * Solaris 10 with GCC4 does not need these macros as they
20 20 * are defined in <iso/math_c99.h> with a compiler directive
21 21 */
22   -#if defined(HOST_SOLARIS) && (( HOST_SOLARIS <= 9 ) || ((HOST_SOLARIS >= 10) \
23   - && (__GNUC__ < 4))) \
  22 +#if defined(CONFIG_SOLARIS) && \
  23 + ((CONFIG_SOLARIS_VERSION <= 9 ) || \
  24 + ((CONFIG_SOLARIS_VERSION >= 10) && (__GNUC__ < 4))) \
24 25 || (defined(__OpenBSD__) && (OpenBSD < 200811))
25 26 /*
26 27 * C99 7.12.3 classification macros
... ... @@ -111,7 +112,7 @@ typedef union {
111 112 /*----------------------------------------------------------------------------
112 113 | Software IEC/IEEE floating-point rounding mode.
113 114 *----------------------------------------------------------------------------*/
114   -#if (defined(HOST_BSD) && !defined(__APPLE__)) || defined(HOST_SOLARIS)
  115 +#if (defined(HOST_BSD) && !defined(__APPLE__)) || defined(CONFIG_SOLARIS)
115 116 #if defined(__OpenBSD__)
116 117 #define FE_RM FP_RM
117 118 #define FE_RP FP_RP
... ...
fpu/softfloat.h
... ... @@ -32,7 +32,7 @@ these four paragraphs for those parts of this code that are retained.
32 32 #ifndef SOFTFLOAT_H
33 33 #define SOFTFLOAT_H
34 34  
35   -#if defined(HOST_SOLARIS) && defined(NEEDS_LIBSUNMATH)
  35 +#if defined(CONFIG_SOLARIS) && defined(NEEDS_LIBSUNMATH)
36 36 #include <sunmath.h>
37 37 #endif
38 38  
... ...
... ... @@ -25,7 +25,7 @@
25 25 #include <sys/mman.h>
26 26 #include <sys/ioctl.h>
27 27 #endif
28   -#ifdef HOST_SOLARIS
  28 +#ifdef CONFIG_SOLARIS
29 29 #include <sys/ioccom.h>
30 30 #endif
31 31 #include <stdlib.h>
... ...
... ... @@ -28,7 +28,7 @@
28 28 #include <errno.h>
29 29 #include <unistd.h>
30 30 #include <fcntl.h>
31   -#ifdef HOST_SOLARIS
  31 +#ifdef CONFIG_SOLARIS
32 32 #include <sys/types.h>
33 33 #include <sys/statvfs.h>
34 34 #endif
... ... @@ -116,7 +116,7 @@ static void *kqemu_vmalloc(size_t size)
116 116 int map_anon = 0;
117 117 const char *tmpdir;
118 118 char phys_ram_file[1024];
119   -#ifdef HOST_SOLARIS
  119 +#ifdef CONFIG_SOLARIS
120 120 struct statvfs stfs;
121 121 #else
122 122 struct statfs stfs;
... ... @@ -129,7 +129,7 @@ static void *kqemu_vmalloc(size_t size)
129 129 if (phys_ram_fd < 0) {
130 130 tmpdir = getenv("QEMU_TMPDIR");
131 131 if (!tmpdir)
132   -#ifdef HOST_SOLARIS
  132 +#ifdef CONFIG_SOLARIS
133 133 tmpdir = "/tmp";
134 134 if (statvfs(tmpdir, &stfs) == 0) {
135 135 #else
... ...
target-mips/cpu.h
... ... @@ -14,7 +14,7 @@
14 14  
15 15 // uint_fast8_t and uint_fast16_t not in <sys/int_types.h>
16 16 // XXX: move that elsewhere
17   -#if defined(HOST_SOLARIS) && HOST_SOLARIS < 10
  17 +#if defined(CONFIG_SOLARIS) && CONFIG_SOLARIS_VERSION < 10
18 18 typedef unsigned char uint_fast8_t;
19 19 typedef unsigned int uint_fast16_t;
20 20 #endif
... ...
tcg/sparc/tcg-target.h
... ... @@ -95,7 +95,7 @@ enum {
95 95  
96 96  
97 97 /* Note: must be synced with dyngen-exec.h and Makefile.target */
98   -#ifdef HOST_SOLARIS
  98 +#ifdef CONFIG_SOLARIS
99 99 #define TCG_AREG0 TCG_REG_G2
100 100 #define TCG_AREG1 TCG_REG_G3
101 101 #define TCG_AREG2 TCG_REG_G4
... ...