On 8/1/12, Ingo Weinhold <ingo_weinhold@xxxxxx> wrote: > On 2012-08-01 at 03:49:12 [+0200], mmadia-github.separate-build-environment > > <community@xxxxxxxxxxxx> wrote: >> diff --git a/headers/build/os/support/Errors.h >> b/headers/build/os/support/Errors.h >> index 750a660..dbab6d1 100644 >> --- a/headers/build/os/support/Errors.h >> +++ b/headers/build/os/support/Errors.h > > This header shouldn't have any contents other than the include directive for > > target_os/support/target_Errors.h. The following contents should be moved > there. > >> +/* Error baselines */ >> +#define HAIKU_BUILD_B_GENERAL_ERROR_BASE HAIKU_BUILD_INT_MIN > > The names of the defined macros should start with an underscore. It is very > unlikely that they clash with something else, but no reason to risk it. When > not building libroot_build, the macros without the _HAIKU_BUILD_ prefix need > to be defined as well (or alternatively). > >> +#define HAIKU_BUILD_B_OS_ERROR_BASE >> (HAIKU_BUILD_B_GENERAL_ERROR_BASE + 0x1000) > > [...] >> -extern int *_haiku_build_errno(); >> -extern int _haiku_to_host_error(int error); >> +int _haiku_build_to_positive_error(int error); >> +int _haiku_build_to_negative_error(int error); > > Those should be defined using the _HAIKU_BUILD_DECLARE_FUNCTION helper > macro: > > int _HAIKU_BUILD_DECLARE_FUNCTION(int, to_positive_error, (int error)) > int _HAIKU_BUILD_DECLARE_FUNCTION(int, to_negative_error, (int error)) I've pushed these changes. Though, jam -q libroot_build.so complains about the last two lines -- In file included from headers/build/os/support/Errors.h:9, from headers/build/os/support/SupportDefs.h:15, from src/build/libroot/atomic.cpp:6: headers/build/os_target/support/target_Errors.h:668: error: two or more data types in declaration of '_haiku_build_to_positive_error' headers/build/os_target/support/target_Errors.h:669: error: two or more data types in declaration of '_haiku_build_to_negative_error' https://github.com/mmadia/haiku/blob/separate-build-environment/headers/build/os_target/support/target_Errors.h In the meantime, I'll start the rest of your review. Thanks! --mmadia