8 int *(*errno_location)(void);
9 void (*testcancel)(void);
12 void (*fork_handler)(int);
13 int (*atexit)(void (*)(void));
15 void (*ldso_fini)(void);
16 volatile int threads_minus_1;
22 #if 100*__GNUC__+__GNUC_MINOR__ >= 303 || defined(__PCC__) || defined(__TINYC__)
23 extern struct __libc __libc __attribute__((visibility("hidden")));
26 #elif !defined(__PIC__)
27 extern struct __libc __libc;
31 #define USE_LIBC_ACCESSOR
32 extern struct __libc *__libc_loc(void) __attribute__((const));
33 #define libc (*__libc_loc())
38 /* Designed to avoid any overhead in non-threaded processes */
39 void __lock(volatile int *);
40 void __lockfile(FILE *);
41 #define LOCK(x) (libc.threads_minus_1 ? (__lock(x),1) : ((void)(x),1))
42 #define UNLOCK(x) (*(volatile int *)(x)=0)
44 int __rsyscall(int, long, long, long, long, long, long);
46 extern char **__environ;
47 #define environ __environ
50 #define weak_alias(old, new) \
51 extern __typeof(old) new __attribute__((weak, alias(#old)))
54 //#define LFS64_2(x, y) weak_alias(x, y)
55 #define LFS64_2(x, y) extern __typeof(x) y
58 #define LFS64(x) LFS64_2(x, x##64)