11 int (*atexit)(void (*)(void));
13 void (*ldso_fini)(void);
14 volatile int threads_minus_1;
20 #if 100*__GNUC__+__GNUC_MINOR__ >= 303 || defined(__PCC__) || defined(__TINYC__)
21 extern struct __libc __libc __attribute__((visibility("hidden")));
24 #elif !defined(__PIC__)
25 extern struct __libc __libc;
29 #define USE_LIBC_ACCESSOR
30 extern struct __libc *__libc_loc(void) __attribute__((const));
31 #define libc (*__libc_loc())
36 /* Designed to avoid any overhead in non-threaded processes */
37 void __lock(volatile int *);
38 int __lockfile(FILE *);
39 void __unlockfile(FILE *);
40 #define LOCK(x) (libc.threads_minus_1 ? (__lock(x),1) : ((void)(x),1))
41 #define UNLOCK(x) (*(volatile int *)(x)=0)
43 void __synccall(void (*)(void *), void *);
44 void __synccall_wait(void);
45 int __setxid(int, int, int, int);
47 extern char **__environ;
48 #define environ __environ
51 #define weak_alias(old, new) \
52 extern __typeof(old) new __attribute__((weak, alias(#old)))
55 //#define LFS64_2(x, y) weak_alias(x, y)
56 #define LFS64_2(x, y) extern __typeof(x) y
59 #define LFS64(x) LFS64_2(x, x##64)