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:
@@ -35,10 +35,12 @@ _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_
|
||||||
// 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);
|
||||||
_call_init_routines_();
|
_call_init_routines_();
|
||||||
|
#endif
|
||||||
|
|
||||||
returnCode = main(argc, argv, environment);
|
returnCode = main(argc, argv, environment);
|
||||||
|
|
||||||
|
|||||||
@@ -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);
|
||||||
void
|
void
|
||||||
_init_c_library_(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
|
// Our libroot functions are already initialized above, so we don't have to
|
||||||
// do anything here.
|
// do anything here.
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void
|
|
||||||
terminate_after(image_id id)
|
|
||||||
{
|
|
||||||
__heap_terminate_after();
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -489,6 +489,7 @@ __flatten_process_args(const char* const* args, int32 argCount,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _BEOS_R5_COMPATIBLE_
|
||||||
extern "C" void _call_init_routines_(void);
|
extern "C" void _call_init_routines_(void);
|
||||||
void
|
void
|
||||||
_call_init_routines_(void)
|
_call_init_routines_(void)
|
||||||
@@ -496,4 +497,4 @@ _call_init_routines_(void)
|
|||||||
// This is called by the original BeOS startup code.
|
// This is called by the original BeOS startup code.
|
||||||
// We don't need it, because our loader already does the job, right?
|
// We don't need it, because our loader already does the job, right?
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user