musl/include
Rich Felker a603a75a72 remove attribute((const)) from pthread_self and errno location decls
this attribute was applied to pthread_self and the functions providing
the locations for errno and h_errno as an optimization; however, it is
subtly incorrect. as specified, it means the return value will always
be the same, which is not true; it varies per-thread.

this attribute also implies that the function does not depend on any
state, and that calls to it can safely be reordered across any other
code. however such reordering is unsafe for these functions: they
break when reordered before initialization of the thread pointer. such
breakage was actually observed when compiled by libfirm/cparser.

to some extent the reordering problem could be solved with strong
compiler barriers between the stages of early startup code, but the
specified meaning of of attribute((const)) is sufficiently strong that
a compiler would theoretically be justified inserting gratuitous calls
to attribute((const)) const functions at random locations (e.g. to
save the value in static storage for later use).

this reverts commit cbf35978a9.
2015-09-17 04:45:01 +00:00
..
arpa add basic dns record parsing functions 2014-12-17 14:40:35 -05:00
net net/if_arp.h: add missing ARP hardware identifiers from linux uapi headers 2013-09-15 02:42:29 +00:00
netinet fix netinet/ether.h for c++ 2015-05-08 08:35:16 -04:00
netpacket add netpacket/packet.h 2011-06-09 21:47:24 -04:00
scsi add legacy scsi/scsi_ioctl.h header 2013-07-03 18:07:50 +02:00
sys socket.h: fix SO_* for mips 2015-07-21 19:14:26 -04:00
aio.h make all objects used with atomic operations volatile 2015-03-03 22:50:02 -05:00
alloca.h alloca cannot be a function. #define it to the gcc builtin if possible 2012-04-09 15:06:58 -04:00
alltypes.h.in move wint_t definition to the shared part of alltypes.h.in 2014-12-21 02:43:35 -05:00
ar.h some extra legacy header stuff 2012-05-06 16:35:32 -04:00
assert.h add static_assert and hide noreturn, alignas, alignof from C++ 2014-08-27 02:55:54 -04:00
byteswap.h remove all remaining redundant __restrict/__inline/_Noreturn defs 2012-09-08 17:14:52 -04:00
complex.h make the definition of _Complex_I explicitly complex 2014-12-17 16:47:34 -05:00
cpio.h initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00
crypt.h replace old and ugly crypt implementation 2012-06-29 00:56:37 -04:00
ctype.h add macro version of ctype.h isascii function 2015-06-06 18:16:22 +00:00
dirent.h refactor headers, especially alltypes.h, and improve C++ ABI compat 2013-07-22 11:22:36 -04:00
dlfcn.h const-qualify the address argument to dladdr 2014-01-06 22:03:38 -05:00
elf.h add sh relocation types needed for fdpic to elf.h 2015-09-12 02:49:02 +00:00
endian.h default features: make musl usable without feature test macros 2012-09-07 23:13:55 -04:00
err.h fix redundant _Noreturn def in err.h 2012-09-08 18:16:33 -04:00
errno.h remove attribute((const)) from pthread_self and errno location decls 2015-09-17 04:45:01 +00:00
fcntl.h move O_PATH definition back to arch bits 2015-04-01 19:31:06 -04:00
features.h add _DEFAULT_SOURCE feature profile as an alias for _BSD_SOURCE 2014-09-10 12:47:55 -04:00
fenv.h initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00
float.h fix FLT_ROUNDS regression in C++ applications 2015-03-23 11:26:51 -04:00
fmtmsg.h implement fmtmsg function 2014-06-21 19:24:15 -04:00
fnmatch.h remove now-unnecessary features.h inclusion from fnmatch.h 2013-12-02 02:06:52 -05:00
ftw.h remove unneeded judgemental commentary from ftw.h 2012-09-07 23:55:11 -04:00
getopt.h add getopt reset support 2012-09-30 20:00:38 -04:00
glob.h fix macros for LFS *64_t types in sys/stat.h, sys/types.h, glob.h 2014-09-05 16:03:07 -04:00
grp.h add put*ent functions for passwd/group files and similar for shadow 2013-04-04 19:23:47 -04:00
iconv.h remove all remaining redundant __restrict/__inline/_Noreturn defs 2012-09-08 17:14:52 -04:00
ifaddrs.h make ifaddrs.h expose sys/socket.h 2013-04-10 22:38:46 -04:00
inttypes.h fix inttypes.h PRI and SCN macros for [u]intptr_t types 2013-10-30 14:52:55 -04:00
iso646.h add previously-missing ios646.h 2011-02-14 21:59:38 -05:00
langinfo.h fix multiple minor namespace issues in headers 2013-10-20 22:01:51 -04:00
lastlog.h some extra legacy header stuff 2012-05-06 16:35:32 -04:00
libgen.h initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00
libintl.h add format argument attributes to gettext function prototypes 2015-09-15 20:30:36 +00:00
limits.h increase TTY_NAME_MAX limit to 32 2013-11-29 12:45:09 -05:00
link.h add missing c++ extern "C" wrapping to link.h 2013-08-02 16:52:17 -04:00
locale.h restore type of NULL to void * except when used in C++ programs 2013-11-24 21:42:55 -05:00
malloc.h add malloc_usable_size function and non-stub malloc.h 2014-08-25 22:47:27 -04:00
math.h math.h: make __FLOAT_BITS and __DOUBLE_BITS C89 2014-03-09 19:29:41 +01:00
memory.h add memory.h, bogus legacy alias for string.h 2012-03-01 01:34:58 -05:00
mntent.h add profile for getmntent_r 2011-04-13 15:24:26 -04:00
monetary.h remove all remaining redundant __restrict/__inline/_Noreturn defs 2012-09-08 17:14:52 -04:00
mqueue.h remove all remaining redundant __restrict/__inline/_Noreturn defs 2012-09-08 17:14:52 -04:00
netdb.h remove attribute((const)) from pthread_self and errno location decls 2015-09-17 04:45:01 +00:00
nl_types.h refactor headers, especially alltypes.h, and improve C++ ABI compat 2013-07-22 11:22:36 -04:00
paths.h remove duplicate definition of _PATH_LASTLOG in paths.h 2013-12-03 20:34:36 -05:00
poll.h fix preprocessor error introduced in poll.h in last commit 2015-03-04 14:15:44 -05:00
pthread.h remove attribute((const)) from pthread_self and errno location decls 2015-09-17 04:45:01 +00:00
pty.h fix __cplusplus extern "C" closing brace in pty.h (typo?) 2011-11-10 21:01:24 -05:00
pwd.h add put*ent functions for passwd/group files and similar for shadow 2013-04-04 19:23:47 -04:00
regex.h make regoff_t and regex_t match C++ ABI 2013-07-22 14:39:59 -04:00
resolv.h fix res_mkquery and res_send prototypes in resolv.h 2013-12-04 21:31:39 +00:00
sched.h fix CPU_EQUAL macro in sched.h 2014-08-13 16:55:56 +02:00
search.h implement hcreate_r, hdestroy_r and hsearch_r 2014-04-02 18:37:45 -04:00
semaphore.h make all objects used with atomic operations volatile 2015-03-03 22:50:02 -05:00
setjmp.h remove macro definition of longjmp from setjmp.h 2015-04-01 20:35:03 -04:00
shadow.h initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00
signal.h fix MINSIGSTKSZ values for archs with large signal contexts 2015-03-18 00:31:37 -04:00
spawn.h fix some restrict-qualifier mismatches in newly added interfaces 2012-11-27 09:44:30 -05:00
stdalign.h add static_assert and hide noreturn, alignas, alignof from C++ 2014-08-27 02:55:54 -04:00
stdarg.h use compiler builtins for variadic macros when available 2011-04-27 23:41:48 -04:00
stdbool.h stdbool.h should define __bool_true_false_are_defined even for C++ 2013-08-28 00:41:00 -04:00
stddef.h add max_align_t definition for C11 and C++11 2014-08-20 17:20:14 -04:00
stdint.h fix signedness of UINT32_MAX and UINT64_MAX at the preprocessor level 2014-12-21 02:30:29 -05:00
stdio.h restore type of NULL to void * except when used in C++ programs 2013-11-24 21:42:55 -05:00
stdio_ext.h stdio_ext.h needs to include stdio.h, at least to get FILE... 2012-08-24 16:16:30 -04:00
stdlib.h byte-based C locale, phase 3: make MB_CUR_MAX variable to activate code 2015-06-16 06:18:00 +00:00
stdnoreturn.h add static_assert and hide noreturn, alignas, alignof from C++ 2014-08-27 02:55:54 -04:00
string.h restore type of NULL to void * except when used in C++ programs 2013-11-24 21:42:55 -05:00
strings.h implement ffsl and ffsll functions 2014-07-31 02:38:23 -04:00
stropts.h add isastream (obsolete STREAMS junk) 2012-05-06 09:03:19 -04:00
syscall.h header file fixes: multiple include guard consistency and correctness 2012-06-15 21:52:53 -04:00
sysexits.h add sysexits.h legacy header 2011-04-05 15:40:36 -04:00
syslog.h remove hack in syslog.h that resulted in aliasing violations 2014-06-21 07:44:46 -04:00
tar.h initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00
termios.h default features: make musl usable without feature test macros 2012-09-07 23:13:55 -04:00
tgmath.h math: more correct tgmath.h type cast logic 2012-12-19 10:57:54 +01:00
threads.h don't shadow functions with macros in C++ 2014-12-09 22:34:56 -05:00
time.h fix places where _BSD_SOURCE failed to yield a superset of _XOPEN_SOURCE 2014-09-10 12:27:33 -04:00
uchar.h implement uchar.h (C11 UTF-16/32 conversion) interfaces 2014-10-13 20:59:42 -04:00
ucontext.h fixup mcontext stuff to expost gregset_t/fpregset_t as appropriate 2012-11-25 23:04:23 -05:00
ulimit.h initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00
unistd.h fix incorrect void return type for syncfs function 2015-07-09 17:07:35 +00:00
utime.h initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00
utmp.h add login_tty function 2014-12-20 20:13:27 -05:00
utmpx.h fix namespace violations in utmpx.h 2014-01-08 19:36:29 -05:00
values.h add legacy header values.h 2013-01-04 20:36:34 +01:00
wait.h add workaround header for wait.h remapping to sys/wait.h 2013-09-01 01:01:31 -04:00
wchar.h improve iswdigit macro to diagnose errors 2015-05-02 21:19:08 -04:00
wctype.h improve iswdigit macro to diagnose errors 2015-05-02 21:19:08 -04:00
wordexp.h remove all remaining redundant __restrict/__inline/_Noreturn defs 2012-09-08 17:14:52 -04:00