headers/build: Reunify BeBuild.h and related cleanup.

Now that we do not target BeOS and also do not include the main headers
directory when building "build" binaries, we can drop the separate
config_build directory and thus also the separate BeBuild.h, and just
..-include the regular one.

The build BeBuild.h defined empty _IMPEXP_ROOT and _IMPEXP_BE preprocessor
macros that the regular one does not; so I also re-synchronized
headers which used these as needed.
This commit is contained in:
Augustin Cavalier
2017-12-11 19:15:47 -05:00
parent 416460cf4a
commit 82bffcc3a7
8 changed files with 10 additions and 311 deletions
+1
View File
@@ -0,0 +1 @@
#include <../config/HaikuConfig.h>
+112
View File
@@ -0,0 +1,112 @@
/*
* Copyright 2009-2011, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _CONFIG_BUILD_TYPES_H
#define _CONFIG_BUILD_TYPES_H
#include <config/HaikuConfig.h>
#include <inttypes.h>
/* fixed-width types -- the __haiku_std_[u]int* types correspond to the POSIX
[u]int*_t types, the _haiku_[u]int* types to the BeOS [u]int* types. If
__HAIKU_BEOS_COMPATIBLE_TYPES is not defined both sets are identical. Once
we drop compatibility for good, we can consolidate the types.
*/
typedef int8_t __haiku_std_int8;
typedef uint8_t __haiku_std_uint8;
typedef int16_t __haiku_std_int16;
typedef uint16_t __haiku_std_uint16;
typedef int32_t __haiku_std_int32;
typedef uint32_t __haiku_std_uint32;
typedef int64_t __haiku_std_int64;
typedef uint64_t __haiku_std_uint64;
typedef __haiku_std_int8 __haiku_int8;
typedef __haiku_std_uint8 __haiku_uint8;
typedef __haiku_std_int16 __haiku_int16;
typedef __haiku_std_uint16 __haiku_uint16;
typedef __haiku_std_int32 __haiku_int32;
typedef __haiku_std_uint32 __haiku_uint32;
typedef __haiku_std_int64 __haiku_int64;
typedef __haiku_std_uint64 __haiku_uint64;
/* address types */
#ifdef __HAIKU_ARCH_64_BIT
typedef __haiku_int64 __haiku_saddr_t;
typedef __haiku_uint64 __haiku_addr_t;
#else
typedef __haiku_int32 __haiku_saddr_t;
typedef __haiku_uint32 __haiku_addr_t;
#endif
#ifdef __HAIKU_ARCH_PHYSICAL_64_BIT
typedef __haiku_int64 __haiku_phys_saddr_t;
typedef __haiku_uint64 __haiku_phys_addr_t;
#else
typedef __haiku_int32 __haiku_phys_saddr_t;
typedef __haiku_uint32 __haiku_phys_addr_t;
#endif
/* address type limits */
#ifdef __HAIKU_ARCH_64_BIT
# define __HAIKU_SADDR_MAX (9223372036854775807LL)
# define __HAIKU_ADDR_MAX (18446744073709551615ULL)
#else
# define __HAIKU_SADDR_MAX (2147483647)
# define __HAIKU_ADDR_MAX (4294967295U)
#endif
#define __HAIKU_SADDR_MIN (-__HAIKU_SADDR_MAX-1)
#ifdef __HAIKU_ARCH_PHYSICAL_64_BIT
# define __HAIKU_PHYS_SADDR_MAX (9223372036854775807LL)
# define __HAIKU_PHYS_ADDR_MAX (18446744073709551615ULL)
#else
# define __HAIKU_PHYS_SADDR_MAX (2147483647)
# define __HAIKU_PHYS_ADDR_MAX (4294967295U)
#endif
#define __HAIKU_PHYS_SADDR_MIN (-__HAIKU_SADDR_MAX-1)
/* printf()/scanf() format prefixes */
/* TODO: The following are only guesses! We should define them in the
build/host headers. */
#define __HAIKU_STD_PRI_PREFIX_32 ""
#ifdef __HAIKU_ARCH_64_BIT
# define __HAIKU_STD_PRI_PREFIX_64 "l"
#else
# define __HAIKU_STD_PRI_PREFIX_64 "ll"
#endif
#define __HAIKU_PRI_PREFIX_32 __HAIKU_STD_PRI_PREFIX_32
#define __HAIKU_PRI_PREFIX_64 __HAIKU_STD_PRI_PREFIX_64
#ifdef __HAIKU_ARCH_64_BIT
# define __HAIKU_PRI_PREFIX_ADDR __HAIKU_PRI_PREFIX_64
#else
# define __HAIKU_PRI_PREFIX_ADDR __HAIKU_PRI_PREFIX_32
#endif
#ifdef __HAIKU_ARCH_PHYSICAL_64_BIT
# define __HAIKU_PRI_PREFIX_PHYS_ADDR __HAIKU_PRI_PREFIX_64
#else
# define __HAIKU_PRI_PREFIX_PHYS_ADDR __HAIKU_PRI_PREFIX_32
#endif
/* a generic address type wide enough for virtual and physical addresses */
#if __HAIKU_ARCH_BITS >= __HAIKU_ARCH_PHYSICAL_BITS
typedef __haiku_addr_t __haiku_generic_addr_t;
# define __HAIKU_GENERIC_ADDR_MAX __HAIKU_ADDR_MAX
# define __HAIKU_PRI_PREFIX_GENERIC_ADDR __HAIKU_PRI_PREFIX_ADDR
#else
typedef __haiku_phys_addr_t __haiku_generic_addr_t;
# define __HAIKU_GENERIC_ADDR_MAX __HAIKU_PHYS_ADDR_MAX
# define __HAIKU_PRI_PREFIX_GENERIC_ADDR __HAIKU_PRI_PREFIX_PHYS_ADDR
#endif
#endif /* _CONFIG_BUILD_TYPES_H */