_single_threaded should have C linkage. Was for some reason only a
problem with gcc 4. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24565 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -14,11 +14,19 @@
|
|||||||
# error "This file must be included from stdio.h!"
|
# error "This file must be included from stdio.h!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
extern char _single_threaded;
|
extern char _single_threaded;
|
||||||
// this boolean value is true (1) if there is only the main thread
|
// 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
|
// running - as soon as you spawn the first thread, it's set to
|
||||||
// false (0)
|
// false (0)
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#define getc(stream) \
|
#define getc(stream) \
|
||||||
(_single_threaded ? getc_unlocked(stream) : getc(stream))
|
(_single_threaded ? getc_unlocked(stream) : getc(stream))
|
||||||
#define putc(c, stream) \
|
#define putc(c, stream) \
|
||||||
|
|||||||
@@ -13,14 +13,14 @@
|
|||||||
struct user_space_program_args;
|
struct user_space_program_args;
|
||||||
struct real_time_data;
|
struct real_time_data;
|
||||||
|
|
||||||
extern char _single_threaded;
|
|
||||||
/* This determines if a process runs single threaded or not */
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
extern char _single_threaded;
|
||||||
|
/* This determines if a process runs single threaded or not */
|
||||||
|
|
||||||
status_t __parse_invoke_line(char *invoker, char ***_newArgs,
|
status_t __parse_invoke_line(char *invoker, char ***_newArgs,
|
||||||
char * const **_oldArgs, int32 *_argCount, const char *arg0);
|
char * const **_oldArgs, int32 *_argCount, const char *arg0);
|
||||||
status_t __get_next_image_dependency(image_id id, uint32 *cookie,
|
status_t __get_next_image_dependency(image_id id, uint32 *cookie,
|
||||||
|
|||||||
Reference in New Issue
Block a user