diff --git a/headers/posix/stdio_post.h b/headers/posix/stdio_post.h index 8f4db8a5f2..7418063371 100644 --- a/headers/posix/stdio_post.h +++ b/headers/posix/stdio_post.h @@ -14,11 +14,19 @@ # error "This file must be included from stdio.h!" #endif +#ifdef __cplusplus +extern "C" { +#endif + extern 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) +#ifdef __cplusplus +} +#endif + #define getc(stream) \ (_single_threaded ? getc_unlocked(stream) : getc(stream)) #define putc(c, stream) \ diff --git a/headers/private/libroot/libroot_private.h b/headers/private/libroot/libroot_private.h index 4d0e91ca2c..67475be5a9 100644 --- a/headers/private/libroot/libroot_private.h +++ b/headers/private/libroot/libroot_private.h @@ -13,14 +13,14 @@ struct user_space_program_args; struct real_time_data; -extern char _single_threaded; - /* This determines if a process runs single threaded or not */ - #ifdef __cplusplus extern "C" { #endif +extern char _single_threaded; + /* This determines if a process runs single threaded or not */ + status_t __parse_invoke_line(char *invoker, char ***_newArgs, char * const **_oldArgs, int32 *_argCount, const char *arg0); status_t __get_next_image_dependency(image_id id, uint32 *cookie,