libroot: Move some BeOS-only API calls behind _BEOS_R5_COMPATIBLE_.

This is defined by our build system on GCC2 only, so they will now
be excluded under all other architectures.
This commit is contained in:
Augustin Cavalier
2019-02-02 14:36:26 -05:00
parent 06d77ca653
commit 15a4183640
3 changed files with 12 additions and 8 deletions
+2
View File
@@ -35,10 +35,12 @@ _start(int argc, char **argv, char **environment)
argv_save = argv;
__main_thread_id = find_thread(NULL);
#ifdef _BEOS_R5_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);
_call_init_routines_();
#endif
returnCode = main(argc, argv, environment);
+8 -7
View File
@@ -82,6 +82,13 @@ initialize_before(image_id imageID)
}
void
terminate_after(image_id id)
{
__heap_terminate_after();
}
#ifdef _BEOS_R5_COMPATIBLE_
void _init_c_library_(void);
void
_init_c_library_(void)
@@ -91,10 +98,4 @@ _init_c_library_(void)
// Our libroot functions are already initialized above, so we don't have to
// do anything here.
}
void
terminate_after(image_id id)
{
__heap_terminate_after();
}
#endif
+2 -1
View File
@@ -489,6 +489,7 @@ __flatten_process_args(const char* const* args, int32 argCount,
}
#ifdef _BEOS_R5_COMPATIBLE_
extern "C" void _call_init_routines_(void);
void
_call_init_routines_(void)
@@ -496,4 +497,4 @@ _call_init_routines_(void)
// This is called by the original BeOS startup code.
// We don't need it, because our loader already does the job, right?
}
#endif