Commit 179a2c1971e615ef408b3e2d32432b29325faf5b

Authored by blueswir1
1 parent d5575a38

Rename _BSD to HOST_BSD so that it's more obvious that it's defined by configure

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6775 c046a42c-6fe2-441c-8c8c-71466251a162
block-raw-posix.c
@@ -750,7 +750,7 @@ static int64_t raw_getlength(BlockDriverState *bs) @@ -750,7 +750,7 @@ static int64_t raw_getlength(BlockDriverState *bs)
750 BDRVRawState *s = bs->opaque; 750 BDRVRawState *s = bs->opaque;
751 int fd = s->fd; 751 int fd = s->fd;
752 int64_t size; 752 int64_t size;
753 -#ifdef _BSD 753 +#ifdef HOST_BSD
754 struct stat sb; 754 struct stat sb;
755 #endif 755 #endif
756 #ifdef __sun__ 756 #ifdef __sun__
@@ -763,7 +763,7 @@ static int64_t raw_getlength(BlockDriverState *bs) @@ -763,7 +763,7 @@ static int64_t raw_getlength(BlockDriverState *bs)
763 if (ret < 0) 763 if (ret < 0)
764 return ret; 764 return ret;
765 765
766 -#ifdef _BSD 766 +#ifdef HOST_BSD
767 if (!fstat(fd, &sb) && (S_IFCHR & sb.st_mode)) { 767 if (!fstat(fd, &sb) && (S_IFCHR & sb.st_mode)) {
768 #ifdef DIOCGMEDIASIZE 768 #ifdef DIOCGMEDIASIZE
769 if (ioctl(fd, DIOCGMEDIASIZE, (off_t *)&size)) 769 if (ioctl(fd, DIOCGMEDIASIZE, (off_t *)&size))
@@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
22 * THE SOFTWARE. 22 * THE SOFTWARE.
23 */ 23 */
24 #include "config-host.h" 24 #include "config-host.h"
25 -#ifdef _BSD 25 +#ifdef HOST_BSD
26 /* include native header before sys-queue.h */ 26 /* include native header before sys-queue.h */
27 #include <sys/queue.h> 27 #include <sys/queue.h>
28 #endif 28 #endif
@@ -31,7 +31,7 @@ @@ -31,7 +31,7 @@
31 #include "monitor.h" 31 #include "monitor.h"
32 #include "block_int.h" 32 #include "block_int.h"
33 33
34 -#ifdef _BSD 34 +#ifdef HOST_BSD
35 #include <sys/types.h> 35 #include <sys/types.h>
36 #include <sys/stat.h> 36 #include <sys/stat.h>
37 #include <sys/ioctl.h> 37 #include <sys/ioctl.h>
configure
@@ -1520,7 +1520,7 @@ fi @@ -1520,7 +1520,7 @@ fi
1520 if [ "$bsd" = "yes" ] ; then 1520 if [ "$bsd" = "yes" ] ; then
1521 echo "#define O_LARGEFILE 0" >> $config_h 1521 echo "#define O_LARGEFILE 0" >> $config_h
1522 echo "#define MAP_ANONYMOUS MAP_ANON" >> $config_h 1522 echo "#define MAP_ANONYMOUS MAP_ANON" >> $config_h
1523 - echo "#define _BSD 1" >> $config_h 1523 + echo "#define HOST_BSD 1" >> $config_h
1524 fi 1524 fi
1525 1525
1526 echo "#define CONFIG_UNAME_RELEASE \"$uname_release\"" >> $config_h 1526 echo "#define CONFIG_UNAME_RELEASE \"$uname_release\"" >> $config_h
dyngen-exec.h
@@ -82,7 +82,7 @@ typedef void * host_reg_t; @@ -82,7 +82,7 @@ typedef void * host_reg_t;
82 #define UINT32_MAX (4294967295U) 82 #define UINT32_MAX (4294967295U)
83 #define UINT64_MAX ((uint64_t)(18446744073709551615)) 83 #define UINT64_MAX ((uint64_t)(18446744073709551615))
84 84
85 -#ifdef _BSD 85 +#ifdef HOST_BSD
86 typedef struct __sFILE FILE; 86 typedef struct __sFILE FILE;
87 #else 87 #else
88 typedef struct FILE FILE; 88 typedef struct FILE FILE;
fpu/softfloat-native.c
@@ -6,7 +6,8 @@ @@ -6,7 +6,8 @@
6 void set_float_rounding_mode(int val STATUS_PARAM) 6 void set_float_rounding_mode(int val STATUS_PARAM)
7 { 7 {
8 STATUS(float_rounding_mode) = val; 8 STATUS(float_rounding_mode) = val;
9 -#if defined(_BSD) && !defined(__APPLE__) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10) 9 +#if defined(HOST_BSD) && !defined(__APPLE__) || \
  10 + (defined(HOST_SOLARIS) && HOST_SOLARIS < 10)
10 fpsetround(val); 11 fpsetround(val);
11 #elif defined(__arm__) 12 #elif defined(__arm__)
12 /* nothing to do */ 13 /* nothing to do */
@@ -22,7 +23,7 @@ void set_floatx80_rounding_precision(int val STATUS_PARAM) @@ -22,7 +23,7 @@ void set_floatx80_rounding_precision(int val STATUS_PARAM)
22 } 23 }
23 #endif 24 #endif
24 25
25 -#if defined(_BSD) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10) 26 +#if defined(HOST_BSD) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10)
26 #define lrint(d) ((int32_t)rint(d)) 27 #define lrint(d) ((int32_t)rint(d))
27 #define llrint(d) ((int64_t)rint(d)) 28 #define llrint(d) ((int64_t)rint(d))
28 #define lrintf(f) ((int32_t)rint(f)) 29 #define lrintf(f) ((int32_t)rint(f))
fpu/softfloat-native.h
1 /* Native implementation of soft float functions */ 1 /* Native implementation of soft float functions */
2 #include <math.h> 2 #include <math.h>
3 3
4 -#if (defined(_BSD) && !defined(__APPLE__)) || defined(HOST_SOLARIS) 4 +#if (defined(HOST_BSD) && !defined(__APPLE__)) || defined(HOST_SOLARIS)
5 #include <ieeefp.h> 5 #include <ieeefp.h>
6 #define fabsf(f) ((float)fabs(f)) 6 #define fabsf(f) ((float)fabs(f))
7 #else 7 #else
@@ -111,7 +111,7 @@ typedef union { @@ -111,7 +111,7 @@ typedef union {
111 /*---------------------------------------------------------------------------- 111 /*----------------------------------------------------------------------------
112 | Software IEC/IEEE floating-point rounding mode. 112 | Software IEC/IEEE floating-point rounding mode.
113 *----------------------------------------------------------------------------*/ 113 *----------------------------------------------------------------------------*/
114 -#if (defined(_BSD) && !defined(__APPLE__)) || defined(HOST_SOLARIS) 114 +#if (defined(HOST_BSD) && !defined(__APPLE__)) || defined(HOST_SOLARIS)
115 #if defined(__OpenBSD__) 115 #if defined(__OpenBSD__)
116 #define FE_RM FP_RM 116 #define FE_RM FP_RM
117 #define FE_RP FP_RP 117 #define FE_RP FP_RP
@@ -29,7 +29,7 @@ @@ -29,7 +29,7 @@
29 #include <sys/time.h> 29 #include <sys/time.h>
30 #include <zlib.h> 30 #include <zlib.h>
31 31
32 -/* Needed early for _BSD etc. */ 32 +/* Needed early for HOST_BSD etc. */
33 #include "config-host.h" 33 #include "config-host.h"
34 34
35 #ifndef _WIN32 35 #ifndef _WIN32
@@ -52,7 +52,7 @@ @@ -52,7 +52,7 @@
52 #include <dirent.h> 52 #include <dirent.h>
53 #include <netdb.h> 53 #include <netdb.h>
54 #include <sys/select.h> 54 #include <sys/select.h>
55 -#ifdef _BSD 55 +#ifdef HOST_BSD
56 #include <sys/stat.h> 56 #include <sys/stat.h>
57 #if defined(__FreeBSD__) || defined(__DragonFly__) 57 #if defined(__FreeBSD__) || defined(__DragonFly__)
58 #include <libutil.h> 58 #include <libutil.h>
@@ -769,7 +769,7 @@ static TAPState *net_tap_fd_init(VLANState *vlan, @@ -769,7 +769,7 @@ static TAPState *net_tap_fd_init(VLANState *vlan,
769 return s; 769 return s;
770 } 770 }
771 771
772 -#if defined (_BSD) || defined (__FreeBSD_kernel__) 772 +#if defined (HOST_BSD) || defined (__FreeBSD_kernel__)
773 static int tap_open(char *ifname, int ifname_size) 773 static int tap_open(char *ifname, int ifname_size)
774 { 774 {
775 int fd; 775 int fd;
@@ -33,13 +33,13 @@ @@ -33,13 +33,13 @@
33 #include <sys/statvfs.h> 33 #include <sys/statvfs.h>
34 #endif 34 #endif
35 35
36 -/* Needed early for _BSD etc. */ 36 +/* Needed early for HOST_BSD etc. */
37 #include "config-host.h" 37 #include "config-host.h"
38 38
39 #ifdef _WIN32 39 #ifdef _WIN32
40 #define WIN32_LEAN_AND_MEAN 40 #define WIN32_LEAN_AND_MEAN
41 #include <windows.h> 41 #include <windows.h>
42 -#elif defined(_BSD) 42 +#elif defined(HOST_BSD)
43 #include <stdlib.h> 43 #include <stdlib.h>
44 #else 44 #else
45 #include <malloc.h> 45 #include <malloc.h>
@@ -188,7 +188,7 @@ void *qemu_memalign(size_t alignment, size_t size) @@ -188,7 +188,7 @@ void *qemu_memalign(size_t alignment, size_t size)
188 if (ret != 0) 188 if (ret != 0)
189 return NULL; 189 return NULL;
190 return ptr; 190 return ptr;
191 -#elif defined(_BSD) 191 +#elif defined(HOST_BSD)
192 return valloc(size); 192 return valloc(size);
193 #else 193 #else
194 return memalign(alignment, size); 194 return memalign(alignment, size);
qemu-char.c
@@ -61,7 +61,7 @@ @@ -61,7 +61,7 @@
61 #include <dirent.h> 61 #include <dirent.h>
62 #include <netdb.h> 62 #include <netdb.h>
63 #include <sys/select.h> 63 #include <sys/select.h>
64 -#ifdef _BSD 64 +#ifdef HOST_BSD
65 #include <sys/stat.h> 65 #include <sys/stat.h>
66 #ifdef __FreeBSD__ 66 #ifdef __FreeBSD__
67 #include <libutil.h> 67 #include <libutil.h>
savevm.c
@@ -29,7 +29,7 @@ @@ -29,7 +29,7 @@
29 #include <sys/time.h> 29 #include <sys/time.h>
30 #include <zlib.h> 30 #include <zlib.h>
31 31
32 -/* Needed early for _BSD etc. */ 32 +/* Needed early for HOST_BSD etc. */
33 #include "config-host.h" 33 #include "config-host.h"
34 34
35 #ifndef _WIN32 35 #ifndef _WIN32
@@ -52,7 +52,7 @@ @@ -52,7 +52,7 @@
52 #include <dirent.h> 52 #include <dirent.h>
53 #include <netdb.h> 53 #include <netdb.h>
54 #include <sys/select.h> 54 #include <sys/select.h>
55 -#ifdef _BSD 55 +#ifdef HOST_BSD
56 #include <sys/stat.h> 56 #include <sys/stat.h>
57 #if defined(__FreeBSD__) || defined(__DragonFly__) 57 #if defined(__FreeBSD__) || defined(__DragonFly__)
58 #include <libutil.h> 58 #include <libutil.h>
@@ -29,7 +29,7 @@ @@ -29,7 +29,7 @@
29 #include <sys/time.h> 29 #include <sys/time.h>
30 #include <zlib.h> 30 #include <zlib.h>
31 31
32 -/* Needed early for _BSD etc. */ 32 +/* Needed early for HOST_BSD etc. */
33 #include "config-host.h" 33 #include "config-host.h"
34 34
35 #ifndef _WIN32 35 #ifndef _WIN32
@@ -53,7 +53,7 @@ @@ -53,7 +53,7 @@
53 #include <dirent.h> 53 #include <dirent.h>
54 #include <netdb.h> 54 #include <netdb.h>
55 #include <sys/select.h> 55 #include <sys/select.h>
56 -#ifdef _BSD 56 +#ifdef HOST_BSD
57 #include <sys/stat.h> 57 #include <sys/stat.h>
58 #if defined(__FreeBSD__) || defined(__DragonFly__) 58 #if defined(__FreeBSD__) || defined(__DragonFly__)
59 #include <libutil.h> 59 #include <libutil.h>