mirror of git://git.musl-libc.org/musl
restore attribute((const)) to pthread_self and errno location decls
revert commita603a75a72
. as a result of commit1c84c99913
this is now safe, assuming an interpretation of the somewhat-underspecified attribute((const)) consistent with real-world usage.
This commit is contained in:
parent
1c84c99913
commit
bf453d6839
|
@ -9,6 +9,9 @@ extern "C" {
|
|||
|
||||
#include <bits/errno.h>
|
||||
|
||||
#ifdef __GNUC__
|
||||
__attribute__((const))
|
||||
#endif
|
||||
int *__errno_location(void);
|
||||
#define errno (*__errno_location())
|
||||
|
||||
|
|
|
@ -115,6 +115,9 @@ struct protoent *getprotobynumber (int);
|
|||
|| (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE+0 < 700)
|
||||
struct hostent *gethostbyname (const char *);
|
||||
struct hostent *gethostbyaddr (const void *, socklen_t, int);
|
||||
#ifdef __GNUC__
|
||||
__attribute__((const))
|
||||
#endif
|
||||
int *__h_errno_location(void);
|
||||
#define h_errno (*__h_errno_location())
|
||||
#define HOST_NOT_FOUND 1
|
||||
|
|
|
@ -79,6 +79,9 @@ int pthread_detach(pthread_t);
|
|||
_Noreturn void pthread_exit(void *);
|
||||
int pthread_join(pthread_t, void **);
|
||||
|
||||
#ifdef __GNUC__
|
||||
__attribute__((const))
|
||||
#endif
|
||||
pthread_t pthread_self(void);
|
||||
|
||||
int pthread_equal(pthread_t, pthread_t);
|
||||
|
|
Loading…
Reference in New Issue