On 2012-08-10 at 17:49:19 [+0200], mmadia-github.separate-build-environment <community@xxxxxxxxxxxx> wrote: > diff --git a/headers/build/posix_target/target_stdio.h > b/headers/build/posix_target/target_stdio.h > new file mode 100644 > index 0000000..e8594b8 > --- /dev/null > +++ b/headers/build/posix_target/target_stdio.h [...] > +_HAIKU_BUILD_DECLARE_VARIABLE(FILE*, stdin) > +_HAIKU_BUILD_DECLARE_VARIABLE(FILE*, stdout) > +_HAIKU_BUILD_DECLARE_VARIABLE(FILE*, stderr) FILE needs to be wrapped. You can e.g. define it like: struct _HAIKU_BUILD_IDENTIFIER(_FILE) typedef _HAIKU_BUILD_IDENTIFIER(_FILE) _HAIKU_BUILD_IDENTIFIER(FILE); [...] > +// #include <target_stdio_post.h> > +// NOTE: #8730 -- uncertain on these changes pertaining to including > stdio_post.h > +#ifdef __cplusplus > +extern "C" { > +#endif > + > +_HAIKU_BUILD_DECLARE_VARIABLE(char, _single_threaded) > + /* this boolean value is true (1) if there is only the main thread > + * running - as soon as you spawn the first thread, it's set to > + * false (0) */ Omit. > +#ifdef __cplusplus > +} > +#endif > + > +#define _haiku_build_getc(stream) \ > + (_single_threaded ? _haiku_build_getc_unlocked(stream) : > _haiku_build_getc(stream)) > +#define _haiku_build_putc(c, stream) \ > + (_single_threaded ? _haiku_build_putc_unlocked(c, stream) : > _haiku_build_putc(c, stream)) Those should be defined as functions instead (check the POSIX specs for their signature). Omit _haiku_build_{get,put}c_unlocked(). > diff --git a/headers/build/posix_target/target_stdio_ext.h > diff --git a/headers/build/posix_target/target_stdio_post.h Neither is needed. CU, Ingo