projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
apply feature test protection to memccpy
[musl]
/
src
/
internal
/
libc.h
diff --git
a/src/internal/libc.h
b/src/internal/libc.h
index
e353f36
..
8a84be0
100644
(file)
--- a/
src/internal/libc.h
+++ b/
src/internal/libc.h
@@
-4,8
+4,7
@@
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
-#define libc __libc
-extern struct libc {
+struct __libc {
void (*lock)(volatile int *);
void (*cancelpt)(int);
int (*atexit)(void (*)(void));
void (*lock)(volatile int *);
void (*cancelpt)(int);
int (*atexit)(void (*)(void));
@@
-15,7
+14,16
@@
extern struct libc {
volatile int threads_minus_1;
int (*rsyscall)(int, long, long, long, long, long, long);
void (**tsd_keys)(void *);
volatile int threads_minus_1;
int (*rsyscall)(int, long, long, long, long, long, long);
void (**tsd_keys)(void *);
-} libc;
+ void (*fork_handler)(int);
+};
+
+#ifdef __PIC__
+extern struct __libc *__libc_loc(void) __attribute__((const));
+#define libc (*__libc_loc())
+#else
+extern struct __libc __libc;
+#define libc __libc
+#endif
/* Designed to avoid any overhead in non-threaded processes */
/* Designed to avoid any overhead in non-threaded processes */