Commit 179a2c1971e615ef408b3e2d32432b29325faf5b
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
Showing
11 changed files
with
22 additions
and
21 deletions
block-raw-posix.c
... | ... | @@ -750,7 +750,7 @@ static int64_t raw_getlength(BlockDriverState *bs) |
750 | 750 | BDRVRawState *s = bs->opaque; |
751 | 751 | int fd = s->fd; |
752 | 752 | int64_t size; |
753 | -#ifdef _BSD | |
753 | +#ifdef HOST_BSD | |
754 | 754 | struct stat sb; |
755 | 755 | #endif |
756 | 756 | #ifdef __sun__ |
... | ... | @@ -763,7 +763,7 @@ static int64_t raw_getlength(BlockDriverState *bs) |
763 | 763 | if (ret < 0) |
764 | 764 | return ret; |
765 | 765 | |
766 | -#ifdef _BSD | |
766 | +#ifdef HOST_BSD | |
767 | 767 | if (!fstat(fd, &sb) && (S_IFCHR & sb.st_mode)) { |
768 | 768 | #ifdef DIOCGMEDIASIZE |
769 | 769 | if (ioctl(fd, DIOCGMEDIASIZE, (off_t *)&size)) | ... | ... |
block.c
... | ... | @@ -22,7 +22,7 @@ |
22 | 22 | * THE SOFTWARE. |
23 | 23 | */ |
24 | 24 | #include "config-host.h" |
25 | -#ifdef _BSD | |
25 | +#ifdef HOST_BSD | |
26 | 26 | /* include native header before sys-queue.h */ |
27 | 27 | #include <sys/queue.h> |
28 | 28 | #endif |
... | ... | @@ -31,7 +31,7 @@ |
31 | 31 | #include "monitor.h" |
32 | 32 | #include "block_int.h" |
33 | 33 | |
34 | -#ifdef _BSD | |
34 | +#ifdef HOST_BSD | |
35 | 35 | #include <sys/types.h> |
36 | 36 | #include <sys/stat.h> |
37 | 37 | #include <sys/ioctl.h> | ... | ... |
configure
... | ... | @@ -1520,7 +1520,7 @@ fi |
1520 | 1520 | if [ "$bsd" = "yes" ] ; then |
1521 | 1521 | echo "#define O_LARGEFILE 0" >> $config_h |
1522 | 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 | 1524 | fi |
1525 | 1525 | |
1526 | 1526 | echo "#define CONFIG_UNAME_RELEASE \"$uname_release\"" >> $config_h | ... | ... |
dyngen-exec.h
fpu/softfloat-native.c
... | ... | @@ -6,7 +6,8 @@ |
6 | 6 | void set_float_rounding_mode(int val STATUS_PARAM) |
7 | 7 | { |
8 | 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 | 11 | fpsetround(val); |
11 | 12 | #elif defined(__arm__) |
12 | 13 | /* nothing to do */ |
... | ... | @@ -22,7 +23,7 @@ void set_floatx80_rounding_precision(int val STATUS_PARAM) |
22 | 23 | } |
23 | 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 | 27 | #define lrint(d) ((int32_t)rint(d)) |
27 | 28 | #define llrint(d) ((int64_t)rint(d)) |
28 | 29 | #define lrintf(f) ((int32_t)rint(f)) | ... | ... |
fpu/softfloat-native.h
1 | 1 | /* Native implementation of soft float functions */ |
2 | 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 | 5 | #include <ieeefp.h> |
6 | 6 | #define fabsf(f) ((float)fabs(f)) |
7 | 7 | #else |
... | ... | @@ -111,7 +111,7 @@ typedef union { |
111 | 111 | /*---------------------------------------------------------------------------- |
112 | 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 | 115 | #if defined(__OpenBSD__) |
116 | 116 | #define FE_RM FP_RM |
117 | 117 | #define FE_RP FP_RP | ... | ... |
net.c
... | ... | @@ -29,7 +29,7 @@ |
29 | 29 | #include <sys/time.h> |
30 | 30 | #include <zlib.h> |
31 | 31 | |
32 | -/* Needed early for _BSD etc. */ | |
32 | +/* Needed early for HOST_BSD etc. */ | |
33 | 33 | #include "config-host.h" |
34 | 34 | |
35 | 35 | #ifndef _WIN32 |
... | ... | @@ -52,7 +52,7 @@ |
52 | 52 | #include <dirent.h> |
53 | 53 | #include <netdb.h> |
54 | 54 | #include <sys/select.h> |
55 | -#ifdef _BSD | |
55 | +#ifdef HOST_BSD | |
56 | 56 | #include <sys/stat.h> |
57 | 57 | #if defined(__FreeBSD__) || defined(__DragonFly__) |
58 | 58 | #include <libutil.h> |
... | ... | @@ -769,7 +769,7 @@ static TAPState *net_tap_fd_init(VLANState *vlan, |
769 | 769 | return s; |
770 | 770 | } |
771 | 771 | |
772 | -#if defined (_BSD) || defined (__FreeBSD_kernel__) | |
772 | +#if defined (HOST_BSD) || defined (__FreeBSD_kernel__) | |
773 | 773 | static int tap_open(char *ifname, int ifname_size) |
774 | 774 | { |
775 | 775 | int fd; | ... | ... |
osdep.c
... | ... | @@ -33,13 +33,13 @@ |
33 | 33 | #include <sys/statvfs.h> |
34 | 34 | #endif |
35 | 35 | |
36 | -/* Needed early for _BSD etc. */ | |
36 | +/* Needed early for HOST_BSD etc. */ | |
37 | 37 | #include "config-host.h" |
38 | 38 | |
39 | 39 | #ifdef _WIN32 |
40 | 40 | #define WIN32_LEAN_AND_MEAN |
41 | 41 | #include <windows.h> |
42 | -#elif defined(_BSD) | |
42 | +#elif defined(HOST_BSD) | |
43 | 43 | #include <stdlib.h> |
44 | 44 | #else |
45 | 45 | #include <malloc.h> |
... | ... | @@ -188,7 +188,7 @@ void *qemu_memalign(size_t alignment, size_t size) |
188 | 188 | if (ret != 0) |
189 | 189 | return NULL; |
190 | 190 | return ptr; |
191 | -#elif defined(_BSD) | |
191 | +#elif defined(HOST_BSD) | |
192 | 192 | return valloc(size); |
193 | 193 | #else |
194 | 194 | return memalign(alignment, size); | ... | ... |
qemu-char.c
savevm.c
... | ... | @@ -29,7 +29,7 @@ |
29 | 29 | #include <sys/time.h> |
30 | 30 | #include <zlib.h> |
31 | 31 | |
32 | -/* Needed early for _BSD etc. */ | |
32 | +/* Needed early for HOST_BSD etc. */ | |
33 | 33 | #include "config-host.h" |
34 | 34 | |
35 | 35 | #ifndef _WIN32 |
... | ... | @@ -52,7 +52,7 @@ |
52 | 52 | #include <dirent.h> |
53 | 53 | #include <netdb.h> |
54 | 54 | #include <sys/select.h> |
55 | -#ifdef _BSD | |
55 | +#ifdef HOST_BSD | |
56 | 56 | #include <sys/stat.h> |
57 | 57 | #if defined(__FreeBSD__) || defined(__DragonFly__) |
58 | 58 | #include <libutil.h> | ... | ... |
vl.c
... | ... | @@ -29,7 +29,7 @@ |
29 | 29 | #include <sys/time.h> |
30 | 30 | #include <zlib.h> |
31 | 31 | |
32 | -/* Needed early for _BSD etc. */ | |
32 | +/* Needed early for HOST_BSD etc. */ | |
33 | 33 | #include "config-host.h" |
34 | 34 | |
35 | 35 | #ifndef _WIN32 |
... | ... | @@ -53,7 +53,7 @@ |
53 | 53 | #include <dirent.h> |
54 | 54 | #include <netdb.h> |
55 | 55 | #include <sys/select.h> |
56 | -#ifdef _BSD | |
56 | +#ifdef HOST_BSD | |
57 | 57 | #include <sys/stat.h> |
58 | 58 | #if defined(__FreeBSD__) || defined(__DragonFly__) |
59 | 59 | #include <libutil.h> | ... | ... |