提交 71e72a19 编写于 作者: J Juan Quintela 提交者: Anthony Liguori

rename HOST_BSD to CONFIG_BSD

Signed-off-by: NJuan Quintela <quintela@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 43da3c08
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* THE SOFTWARE. * THE SOFTWARE.
*/ */
#include "config-host.h" #include "config-host.h"
#ifdef HOST_BSD #ifdef CONFIG_BSD
/* include native header before sys-queue.h */ /* include native header before sys-queue.h */
#include <sys/queue.h> #include <sys/queue.h>
#endif #endif
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include "block_int.h" #include "block_int.h"
#include "module.h" #include "module.h"
#ifdef HOST_BSD #ifdef CONFIG_BSD
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
......
...@@ -779,7 +779,7 @@ static int64_t raw_getlength(BlockDriverState *bs) ...@@ -779,7 +779,7 @@ static int64_t raw_getlength(BlockDriverState *bs)
BDRVRawState *s = bs->opaque; BDRVRawState *s = bs->opaque;
int fd = s->fd; int fd = s->fd;
int64_t size; int64_t size;
#ifdef HOST_BSD #ifdef CONFIG_BSD
struct stat sb; struct stat sb;
#ifdef __FreeBSD__ #ifdef __FreeBSD__
int reopened = 0; int reopened = 0;
...@@ -795,7 +795,7 @@ static int64_t raw_getlength(BlockDriverState *bs) ...@@ -795,7 +795,7 @@ static int64_t raw_getlength(BlockDriverState *bs)
if (ret < 0) if (ret < 0)
return ret; return ret;
#ifdef HOST_BSD #ifdef CONFIG_BSD
#ifdef __FreeBSD__ #ifdef __FreeBSD__
again: again:
#endif #endif
......
...@@ -1747,7 +1747,7 @@ fi ...@@ -1747,7 +1747,7 @@ fi
# XXX: suppress that # XXX: suppress that
if [ "$bsd" = "yes" ] ; then if [ "$bsd" = "yes" ] ; then
echo "#define MAP_ANONYMOUS MAP_ANON" >> $config_host_h echo "#define MAP_ANONYMOUS MAP_ANON" >> $config_host_h
echo "#define HOST_BSD 1" >> $config_host_h echo "#define CONFIG_BSD 1" >> $config_host_h
fi fi
echo "#define CONFIG_UNAME_RELEASE \"$uname_release\"" >> $config_host_h echo "#define CONFIG_UNAME_RELEASE \"$uname_release\"" >> $config_host_h
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
/* XXX: This may be wrong for 64-bit ILP32 hosts. */ /* XXX: This may be wrong for 64-bit ILP32 hosts. */
typedef void * host_reg_t; typedef void * host_reg_t;
#ifdef HOST_BSD #ifdef CONFIG_BSD
typedef struct __sFILE FILE; typedef struct __sFILE FILE;
#else #else
typedef struct FILE FILE; typedef struct FILE FILE;
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
void set_float_rounding_mode(int val STATUS_PARAM) void set_float_rounding_mode(int val STATUS_PARAM)
{ {
STATUS(float_rounding_mode) = val; STATUS(float_rounding_mode) = val;
#if defined(HOST_BSD) && !defined(__APPLE__) || \ #if defined(CONFIG_BSD) && !defined(__APPLE__) || \
(defined(CONFIG_SOLARIS) && CONFIG_SOLARIS_VERSION < 10) (defined(CONFIG_SOLARIS) && CONFIG_SOLARIS_VERSION < 10)
fpsetround(val); fpsetround(val);
#elif defined(__arm__) #elif defined(__arm__)
...@@ -26,7 +26,7 @@ void set_floatx80_rounding_precision(int val STATUS_PARAM) ...@@ -26,7 +26,7 @@ void set_floatx80_rounding_precision(int val STATUS_PARAM)
} }
#endif #endif
#if defined(HOST_BSD) || \ #if defined(CONFIG_BSD) || \
(defined(CONFIG_SOLARIS) && CONFIG_SOLARIS_VERSION < 10) (defined(CONFIG_SOLARIS) && CONFIG_SOLARIS_VERSION < 10)
#define lrint(d) ((int32_t)rint(d)) #define lrint(d) ((int32_t)rint(d))
#define llrint(d) ((int64_t)rint(d)) #define llrint(d) ((int64_t)rint(d))
......
/* Native implementation of soft float functions */ /* Native implementation of soft float functions */
#include <math.h> #include <math.h>
#if (defined(HOST_BSD) && !defined(__APPLE__)) || defined(CONFIG_SOLARIS) #if (defined(CONFIG_BSD) && !defined(__APPLE__)) || defined(CONFIG_SOLARIS)
#include <ieeefp.h> #include <ieeefp.h>
#define fabsf(f) ((float)fabs(f)) #define fabsf(f) ((float)fabs(f))
#else #else
...@@ -112,7 +112,7 @@ typedef union { ...@@ -112,7 +112,7 @@ typedef union {
/*---------------------------------------------------------------------------- /*----------------------------------------------------------------------------
| Software IEC/IEEE floating-point rounding mode. | Software IEC/IEEE floating-point rounding mode.
*----------------------------------------------------------------------------*/ *----------------------------------------------------------------------------*/
#if (defined(HOST_BSD) && !defined(__APPLE__)) || defined(CONFIG_SOLARIS) #if (defined(CONFIG_BSD) && !defined(__APPLE__)) || defined(CONFIG_SOLARIS)
#if defined(__OpenBSD__) #if defined(__OpenBSD__)
#define FE_RM FP_RM #define FE_RM FP_RM
#define FE_RP FP_RP #define FE_RP FP_RP
......
...@@ -90,7 +90,7 @@ typedef int64_t sbits64; ...@@ -90,7 +90,7 @@ typedef int64_t sbits64;
#define FLOAT128 #define FLOAT128
#else #else
/* native float support */ /* native float support */
#if (defined(__i386__) || defined(__x86_64__)) && !defined(HOST_BSD) #if (defined(__i386__) || defined(__x86_64__)) && !defined(CONFIG_BSD)
#define FLOATX80 #define FLOATX80
#endif #endif
#endif /* !CONFIG_SOFTFLOAT */ #endif /* !CONFIG_SOFTFLOAT */
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include <sys/time.h> #include <sys/time.h>
#include <zlib.h> #include <zlib.h>
/* Needed early for HOST_BSD etc. */ /* Needed early for CONFIG_BSD etc. */
#include "config-host.h" #include "config-host.h"
#ifndef _WIN32 #ifndef _WIN32
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
#include <dirent.h> #include <dirent.h>
#include <netdb.h> #include <netdb.h>
#include <sys/select.h> #include <sys/select.h>
#ifdef HOST_BSD #ifdef CONFIG_BSD
#include <sys/stat.h> #include <sys/stat.h>
#if defined(__FreeBSD__) || defined(__DragonFly__) #if defined(__FreeBSD__) || defined(__DragonFly__)
#include <libutil.h> #include <libutil.h>
...@@ -1435,7 +1435,7 @@ static TAPState *net_tap_fd_init(VLANState *vlan, ...@@ -1435,7 +1435,7 @@ static TAPState *net_tap_fd_init(VLANState *vlan,
return s; return s;
} }
#if defined (HOST_BSD) || defined (__FreeBSD_kernel__) #if defined (CONFIG_BSD) || defined (__FreeBSD_kernel__)
static int tap_open(char *ifname, int ifname_size) static int tap_open(char *ifname, int ifname_size)
{ {
int fd; int fd;
......
...@@ -36,12 +36,12 @@ ...@@ -36,12 +36,12 @@
/* FIXME: This file should be target independent. However it has kqemu /* FIXME: This file should be target independent. However it has kqemu
hacks, so must be built for every target. */ hacks, so must be built for every target. */
/* Needed early for HOST_BSD etc. */ /* Needed early for CONFIG_BSD etc. */
#include "config-host.h" #include "config-host.h"
#ifdef _WIN32 #ifdef _WIN32
#include <windows.h> #include <windows.h>
#elif defined(HOST_BSD) #elif defined(CONFIG_BSD)
#include <stdlib.h> #include <stdlib.h>
#else #else
#include <malloc.h> #include <malloc.h>
...@@ -210,7 +210,7 @@ void *qemu_memalign(size_t alignment, size_t size) ...@@ -210,7 +210,7 @@ void *qemu_memalign(size_t alignment, size_t size)
if (ret != 0) if (ret != 0)
abort(); abort();
return ptr; return ptr;
#elif defined(HOST_BSD) #elif defined(CONFIG_BSD)
return oom_check(valloc(size)); return oom_check(valloc(size));
#else #else
return oom_check(memalign(alignment, size)); return oom_check(memalign(alignment, size));
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
#include <dirent.h> #include <dirent.h>
#include <netdb.h> #include <netdb.h>
#include <sys/select.h> #include <sys/select.h>
#ifdef HOST_BSD #ifdef CONFIG_BSD
#include <sys/stat.h> #include <sys/stat.h>
#ifdef __FreeBSD__ #ifdef __FreeBSD__
#include <libutil.h> #include <libutil.h>
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include <sys/time.h> #include <sys/time.h>
#include <zlib.h> #include <zlib.h>
/* Needed early for HOST_BSD etc. */ /* Needed early for CONFIG_BSD etc. */
#include "config-host.h" #include "config-host.h"
#ifndef _WIN32 #ifndef _WIN32
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
#include <dirent.h> #include <dirent.h>
#include <netdb.h> #include <netdb.h>
#include <sys/select.h> #include <sys/select.h>
#ifdef HOST_BSD #ifdef CONFIG_BSD
#include <sys/stat.h> #include <sys/stat.h>
#if defined(__FreeBSD__) || defined(__DragonFly__) #if defined(__FreeBSD__) || defined(__DragonFly__)
#include <libutil.h> #include <libutil.h>
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include <sys/time.h> #include <sys/time.h>
#include <zlib.h> #include <zlib.h>
/* Needed early for HOST_BSD etc. */ /* Needed early for CONFIG_BSD etc. */
#include "config-host.h" #include "config-host.h"
/* Needed early to override system queue definitions on BSD */ /* Needed early to override system queue definitions on BSD */
#include "sys-queue.h" #include "sys-queue.h"
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
#include <dirent.h> #include <dirent.h>
#include <netdb.h> #include <netdb.h>
#include <sys/select.h> #include <sys/select.h>
#ifdef HOST_BSD #ifdef CONFIG_BSD
#include <sys/stat.h> #include <sys/stat.h>
#if defined(__FreeBSD__) || defined(__DragonFly__) #if defined(__FreeBSD__) || defined(__DragonFly__)
#include <libutil.h> #include <libutil.h>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册