8 void (*lock)(volatile int *);
10 int (*atexit)(void (*)(void));
12 void (*ldso_fini)(void);
13 int *(*errno_location)(void);
14 volatile int threads_minus_1;
15 int (*rsyscall)(int, long, long, long, long, long, long);
16 void (**tsd_keys)(void *);
17 void (*fork_handler)(int);
21 #if 100*__GNUC__+__GNUC_MINOR__ >= 303 || defined(__PCC__) || defined(__TINYC__)
22 extern struct __libc __libc __attribute__((visibility("hidden")));
25 #elif !defined(__PIC__)
26 extern struct __libc __libc;
30 #define USE_LIBC_ACCESSOR
31 extern struct __libc *__libc_loc(void) __attribute__((const));
32 #define libc (*__libc_loc())
37 /* Designed to avoid any overhead in non-threaded processes */
38 void __lock(volatile int *);
39 #define LOCK(x) (libc.threads_minus_1 ? (__lock(x),1) : ((void)(x),1))
40 #define UNLOCK(x) (*(x)=0)
41 #define CANCELPT(x) (libc.cancelpt ? libc.cancelpt((x)),0 : (void)(x),0)
42 #define CANCELPT_BEGIN CANCELPT(1)
43 #define CANCELPT_END CANCELPT(0)
45 extern char **__environ;
46 #define environ __environ
49 #define weak_alias(old, new) \
50 extern __typeof(old) new __attribute__((weak, alias(#old)))
53 //#define LFS64_2(x, y) weak_alias(x, y)
54 #define LFS64_2(x, y) extern __typeof(x) y
57 #define LFS64(x) LFS64_2(x, x##64)