build: Unify BeOS ABI compatibility ifdefs around __HAIKU_BEOS_COMPATIBLE.

_BEOS_R5_COMPATIBLE_ was defined in ArchitectureRules while
__HAIKU_BEOS_COMPATIBLE is defined in HaikuConfig.h (which is
in the include path for sys/types, SupportDefs, and other
base headers.)
This commit is contained in:
Augustin Cavalier
2024-09-24 12:09:33 -04:00
parent ed37f3a29d
commit b47e8b0cad
15 changed files with 15 additions and 22 deletions
+2 -5
View File
@@ -131,6 +131,8 @@ rule ArchitectureSetup architecture
# But these can stay. # But these can stay.
HAIKU_WERROR_FLAGS_$(architecture) += -Wno-error=cast-align HAIKU_WERROR_FLAGS_$(architecture) += -Wno-error=cast-align
-Wno-error=format-truncation ; -Wno-error=format-truncation ;
} else {
HAIKU_WERROR_FLAGS_$(architecture) += -Wno-unknown-pragmas ;
} }
# debug flags # debug flags
@@ -150,11 +152,6 @@ rule ArchitectureSetup architecture
# TODO: Temporary work-around. Should be defined in the compiler specs # TODO: Temporary work-around. Should be defined in the compiler specs
HAIKU_LINKFLAGS_$(architecture) += -Xlinker --no-undefined ; HAIKU_LINKFLAGS_$(architecture) += -Xlinker --no-undefined ;
if $(HAIKU_CC_IS_LEGACY_GCC_$(architecture)) = 1 {
HAIKU_DEFINES_$(architecture) += _BEOS_R5_COMPATIBLE_ ;
HAIKU_WERROR_FLAGS_$(architecture) += -Wno-unknown-pragmas ;
}
# private shared kernel/libroot headers # private shared kernel/libroot headers
HAIKU_PRIVATE_SYSTEM_HEADERS_$(architecture) HAIKU_PRIVATE_SYSTEM_HEADERS_$(architecture)
= [ PrivateHeaders $(DOT) system system/arch/$(cpu) ] ; = [ PrivateHeaders $(DOT) system system/arch/$(cpu) ] ;
+1 -1
View File
@@ -39,7 +39,7 @@ struct r5_sockaddr_in {
}; };
#ifdef _BEOS_R5_COMPATIBLE_ #ifdef __HAIKU_BEOS_COMPATIBLE
extern bool __gR5Compatibility; extern bool __gR5Compatibility;
extern addr_t __gNetworkStart; extern addr_t __gNetworkStart;
extern addr_t __gNetworkEnd; extern addr_t __gNetworkEnd;
-2
View File
@@ -3,8 +3,6 @@ SubDir HAIKU_TOP src add-ons translators icns ;
SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) shared ] ; SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) shared ] ;
#for BaseTranslator.h and friends #for BaseTranslator.h and friends
SubDirC++Flags [ FDefines BEOS_R5_COMPATIBLE ] ;
AddResources ICNSTranslator : ICNSTranslator.rdef ; AddResources ICNSTranslator : ICNSTranslator.rdef ;
-2
View File
@@ -11,8 +11,6 @@ CCFLAGS += -DEXCLUDE_MIF_SUPPORT
-DEXCLUDE_JPG_SUPPORT -DEXCLUDE_JPG_SUPPORT
-DEXCLUDE_PGX_SUPPORT ; -DEXCLUDE_PGX_SUPPORT ;
SubDirC++Flags [ FDefines BEOS_R5_COMPATIBLE ] ;
AddResources JPEG2000Translator : JPEG2000Translator.rdef ; AddResources JPEG2000Translator : JPEG2000Translator.rdef ;
local architectureObject ; local architectureObject ;
+1 -1
View File
@@ -92,7 +92,7 @@ struct error_pair {
E(B_ERRORS_END), E(B_ERRORS_END),
E(B_FILE_ERROR), E(B_FILE_ERROR),
E(B_FILE_EXISTS), E(B_FILE_EXISTS),
#ifdef _BEOS_R5_COMPATIBLE_ #ifdef __HAIKU_BEOS_COMPATIBLE
#define B_FILE_NOT_FOUND (B_STORAGE_ERROR_BASE + 1) #define B_FILE_NOT_FOUND (B_STORAGE_ERROR_BASE + 1)
E(B_FILE_NOT_FOUND), E(B_FILE_NOT_FOUND),
#endif #endif
+1 -1
View File
@@ -291,7 +291,7 @@ BApplication::BApplication(BMessage* data)
} }
#ifdef _BEOS_R5_COMPATIBLE_ #ifdef __HAIKU_BEOS_COMPATIBLE
BApplication::BApplication(uint32 signature) BApplication::BApplication(uint32 signature)
{ {
} }
+1 -1
View File
@@ -881,7 +881,7 @@ void BLooper::_ReservedLooper5() {}
void BLooper::_ReservedLooper6() {} void BLooper::_ReservedLooper6() {}
#ifdef _BEOS_R5_COMPATIBLE_ #ifdef __HAIKU_BEOS_COMPATIBLE
BLooper::BLooper(const BLooper& other) BLooper::BLooper(const BLooper& other)
{ {
// Copy construction not allowed // Copy construction not allowed
+1 -1
View File
@@ -168,7 +168,7 @@ void BMessageRunner::_ReservedMessageRunner5() {}
void BMessageRunner::_ReservedMessageRunner6() {} void BMessageRunner::_ReservedMessageRunner6() {}
#ifdef _BEOS_R5_COMPATIBLE_ #ifdef __HAIKU_BEOS_COMPATIBLE
//! Privatized copy constructor to prevent usage. //! Privatized copy constructor to prevent usage.
BMessageRunner::BMessageRunner(const BMessageRunner &) BMessageRunner::BMessageRunner(const BMessageRunner &)
: :
+1 -1
View File
@@ -958,7 +958,7 @@ void BAppFileInfo::_ReservedAppFileInfo2() {}
void BAppFileInfo::_ReservedAppFileInfo3() {} void BAppFileInfo::_ReservedAppFileInfo3() {}
#ifdef _BEOS_R5_COMPATIBLE_ #ifdef __HAIKU_BEOS_COMPATIBLE
//! Privatized assignment operator to prevent usage. //! Privatized assignment operator to prevent usage.
BAppFileInfo& BAppFileInfo&
BAppFileInfo::operator=(const BAppFileInfo&) BAppFileInfo::operator=(const BAppFileInfo&)
+1 -1
View File
@@ -1200,7 +1200,7 @@ void BMimeType::_ReservedMimeType2() {}
void BMimeType::_ReservedMimeType3() {} void BMimeType::_ReservedMimeType3() {}
#ifdef _BEOS_R5_COMPATIBLE_ #ifdef __HAIKU_BEOS_COMPATIBLE
// assignment operator. // assignment operator.
// Unimplemented // Unimplemented
BMimeType& BMimeType&
+1 -1
View File
@@ -608,7 +608,7 @@ void BNodeInfo::_ReservedNodeInfo2() {}
void BNodeInfo::_ReservedNodeInfo3() {} void BNodeInfo::_ReservedNodeInfo3() {}
#ifdef _BEOS_R5_COMPATIBLE_ #ifdef __HAIKU_BEOS_COMPATIBLE
/*! Assignment operator is declared private to prevent it from being created /*! Assignment operator is declared private to prevent it from being created
automatically by the compiler. automatically by the compiler.
*/ */
+1 -1
View File
@@ -36,7 +36,7 @@ _start(int argc, char **argv, char **environment)
argv_save = argv; argv_save = argv;
__main_thread_id = find_thread(NULL); __main_thread_id = find_thread(NULL);
#ifdef _BEOS_R5_COMPATIBLE_ #ifdef __HAIKU_BEOS_COMPATIBLE
// These two are called to make our glue code usable under BeOS R5 // These two are called to make our glue code usable under BeOS R5
// - in Haiku, they are both empty. // - in Haiku, they are both empty.
_init_c_library_(argc, argv, environment); _init_c_library_(argc, argv, environment);
+1 -1
View File
@@ -16,7 +16,7 @@
#include <string.h> #include <string.h>
#ifdef _BEOS_R5_COMPATIBLE_ #ifdef __HAIKU_BEOS_COMPATIBLE
bool __gR5Compatibility = false; bool __gR5Compatibility = false;
+2 -2
View File
@@ -15,7 +15,7 @@
#include <system_info.h> #include <system_info.h>
#if _BEOS_R5_COMPATIBLE_ #if __HAIKU_BEOS_COMPATIBLE
#define LEGACY_B_CPU_X86 15 #define LEGACY_B_CPU_X86 15
@@ -143,7 +143,7 @@ _get_system_info(legacy_system_info* info, size_t size)
} }
#endif // _BEOS_R5_COMPATIBLE_ #endif // __HAIKU_BEOS_COMPATIBLE
status_t status_t
+1 -1
View File
@@ -102,7 +102,7 @@ set_alarm(bigtime_t when, uint32 mode)
} }
#ifdef _BEOS_R5_COMPATIBLE_ #ifdef __HAIKU_BEOS_COMPATIBLE
extern "C" status_t extern "C" status_t
set_timezone(const char* /*timezone*/) set_timezone(const char* /*timezone*/)
{ {