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

View File

@ -131,6 +131,8 @@ rule ArchitectureSetup architecture
# But these can stay.
HAIKU_WERROR_FLAGS_$(architecture) += -Wno-error=cast-align
-Wno-error=format-truncation ;
} else {
HAIKU_WERROR_FLAGS_$(architecture) += -Wno-unknown-pragmas ;
}
# debug flags
@ -150,11 +152,6 @@ rule ArchitectureSetup architecture
# TODO: Temporary work-around. Should be defined in the compiler specs
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
HAIKU_PRIVATE_SYSTEM_HEADERS_$(architecture)
= [ PrivateHeaders $(DOT) system system/arch/$(cpu) ] ;

View File

@ -39,7 +39,7 @@ struct r5_sockaddr_in {
};
#ifdef _BEOS_R5_COMPATIBLE_
#ifdef __HAIKU_BEOS_COMPATIBLE
extern bool __gR5Compatibility;
extern addr_t __gNetworkStart;
extern addr_t __gNetworkEnd;

View File

@ -3,8 +3,6 @@ SubDir HAIKU_TOP src add-ons translators icns ;
SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) shared ] ;
#for BaseTranslator.h and friends
SubDirC++Flags [ FDefines BEOS_R5_COMPATIBLE ] ;
AddResources ICNSTranslator : ICNSTranslator.rdef ;

View File

@ -11,8 +11,6 @@ CCFLAGS += -DEXCLUDE_MIF_SUPPORT
-DEXCLUDE_JPG_SUPPORT
-DEXCLUDE_PGX_SUPPORT ;
SubDirC++Flags [ FDefines BEOS_R5_COMPATIBLE ] ;
AddResources JPEG2000Translator : JPEG2000Translator.rdef ;
local architectureObject ;

View File

@ -92,7 +92,7 @@ struct error_pair {
E(B_ERRORS_END),
E(B_FILE_ERROR),
E(B_FILE_EXISTS),
#ifdef _BEOS_R5_COMPATIBLE_
#ifdef __HAIKU_BEOS_COMPATIBLE
#define B_FILE_NOT_FOUND (B_STORAGE_ERROR_BASE + 1)
E(B_FILE_NOT_FOUND),
#endif

View File

@ -291,7 +291,7 @@ BApplication::BApplication(BMessage* data)
}
#ifdef _BEOS_R5_COMPATIBLE_
#ifdef __HAIKU_BEOS_COMPATIBLE
BApplication::BApplication(uint32 signature)
{
}

View File

@ -881,7 +881,7 @@ void BLooper::_ReservedLooper5() {}
void BLooper::_ReservedLooper6() {}
#ifdef _BEOS_R5_COMPATIBLE_
#ifdef __HAIKU_BEOS_COMPATIBLE
BLooper::BLooper(const BLooper& other)
{
// Copy construction not allowed

View File

@ -168,7 +168,7 @@ void BMessageRunner::_ReservedMessageRunner5() {}
void BMessageRunner::_ReservedMessageRunner6() {}
#ifdef _BEOS_R5_COMPATIBLE_
#ifdef __HAIKU_BEOS_COMPATIBLE
//! Privatized copy constructor to prevent usage.
BMessageRunner::BMessageRunner(const BMessageRunner &)
:

View File

@ -958,7 +958,7 @@ void BAppFileInfo::_ReservedAppFileInfo2() {}
void BAppFileInfo::_ReservedAppFileInfo3() {}
#ifdef _BEOS_R5_COMPATIBLE_
#ifdef __HAIKU_BEOS_COMPATIBLE
//! Privatized assignment operator to prevent usage.
BAppFileInfo&
BAppFileInfo::operator=(const BAppFileInfo&)

View File

@ -1200,7 +1200,7 @@ void BMimeType::_ReservedMimeType2() {}
void BMimeType::_ReservedMimeType3() {}
#ifdef _BEOS_R5_COMPATIBLE_
#ifdef __HAIKU_BEOS_COMPATIBLE
// assignment operator.
// Unimplemented
BMimeType&

View File

@ -608,7 +608,7 @@ void BNodeInfo::_ReservedNodeInfo2() {}
void BNodeInfo::_ReservedNodeInfo3() {}
#ifdef _BEOS_R5_COMPATIBLE_
#ifdef __HAIKU_BEOS_COMPATIBLE
/*! Assignment operator is declared private to prevent it from being created
automatically by the compiler.
*/

View File

@ -36,7 +36,7 @@ _start(int argc, char **argv, char **environment)
argv_save = argv;
__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
// - in Haiku, they are both empty.
_init_c_library_(argc, argv, environment);

View File

@ -16,7 +16,7 @@
#include <string.h>
#ifdef _BEOS_R5_COMPATIBLE_
#ifdef __HAIKU_BEOS_COMPATIBLE
bool __gR5Compatibility = false;

View File

@ -15,7 +15,7 @@
#include <system_info.h>
#if _BEOS_R5_COMPATIBLE_
#if __HAIKU_BEOS_COMPATIBLE
#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

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
set_timezone(const char* /*timezone*/)
{