diff options
| -rw-r--r-- | libc/Android.bp | 2 | ||||
| -rw-r--r-- | libc/dns/include/nsswitch.h | 2 | ||||
| -rw-r--r-- | libc/include/stdlib.h | 16 | ||||
| -rw-r--r-- | libc/include/sys/cdefs.h | 12 | ||||
| -rw-r--r-- | libc/include/time.h | 65 | ||||
| -rw-r--r-- | libc/include/wchar.h | 2 |
6 files changed, 47 insertions, 52 deletions
diff --git a/libc/Android.bp b/libc/Android.bp index 7309bd867..b1d37b448 100644 --- a/libc/Android.bp +++ b/libc/Android.bp @@ -143,7 +143,6 @@ cc_library_static { ], cflags: [ - "-fvisibility=hidden", "-Wno-unused-parameter", // Don't use ridiculous amounts of stack. "-DALL_STATE", @@ -747,7 +746,6 @@ cc_library_static { cflags: [ "-Wno-sign-compare", "-Wno-uninitialized", - "-fvisibility=hidden", "-include openbsd-compat.h", ], diff --git a/libc/dns/include/nsswitch.h b/libc/dns/include/nsswitch.h index addbfc844..a0ae83bce 100644 --- a/libc/dns/include/nsswitch.h +++ b/libc/dns/include/nsswitch.h @@ -202,7 +202,7 @@ typedef struct { __BEGIN_DECLS int nsdispatch(void *, const ns_dtab [], const char *, - const char *, const ns_src [], ...) __LIBC_ABI_PUBLIC__; + const char *, const ns_src [], ...); #ifdef _NS_PRIVATE int _nsdbtaddsrc(ns_dbt *, const ns_src *); diff --git a/libc/include/stdlib.h b/libc/include/stdlib.h index ffbce10b1..65b92a630 100644 --- a/libc/include/stdlib.h +++ b/libc/include/stdlib.h @@ -76,15 +76,13 @@ extern int posix_memalign(void** memptr, size_t alignment, size_t size) __INTROD __BIONIC_LEGACY_INLINE double atof(const char*); -extern double strtod(const char*, char**) __LIBC_ABI_PUBLIC__; -__BIONIC_LEGACY_INLINE float strtof(const char*, char**) __LIBC_ABI_PUBLIC__; -extern long double strtold(const char*, char**) __LIBC_ABI_PUBLIC__ __INTRODUCED_IN(21); - -extern long double strtold_l(const char*, char**, locale_t) __LIBC_ABI_PUBLIC__ __INTRODUCED_IN(21); -extern long long strtoll_l(const char*, char**, int, locale_t) __LIBC_ABI_PUBLIC__ - __INTRODUCED_IN(21); -extern unsigned long long strtoull_l(const char*, char**, int, locale_t) __LIBC_ABI_PUBLIC__ - __INTRODUCED_IN(21); +extern double strtod(const char*, char**); +__BIONIC_LEGACY_INLINE float strtof(const char*, char**); +extern long double strtold(const char*, char**) __INTRODUCED_IN(21); + +extern long double strtold_l(const char*, char**, locale_t) __INTRODUCED_IN(21); +extern long long strtoll_l(const char*, char**, int, locale_t) __INTRODUCED_IN(21); +extern unsigned long long strtoull_l(const char*, char**, int, locale_t) __INTRODUCED_IN(21); extern int atoi(const char*) __purefunc; extern long atol(const char*) __purefunc; diff --git a/libc/include/sys/cdefs.h b/libc/include/sys/cdefs.h index 26d0382eb..89061b64d 100644 --- a/libc/include/sys/cdefs.h +++ b/libc/include/sys/cdefs.h @@ -281,16 +281,16 @@ /* Used to tag non-static symbols that are private and never exposed by the shared library. */ #define __LIBC_HIDDEN__ __attribute__((visibility("hidden"))) -/* Like __LIBC_HIDDEN__, but preserves binary compatibility for LP32. */ +/* + * Used to tag symbols that should be hidden for 64-bit, + * but visible to preserve binary compatibility for LP32. + */ #ifdef __LP64__ -#define __LIBC32_LEGACY_PUBLIC__ __LIBC_HIDDEN__ +#define __LIBC32_LEGACY_PUBLIC__ __attribute__((visibility("hidden"))) #else -#define __LIBC32_LEGACY_PUBLIC__ __LIBC_ABI_PUBLIC__ +#define __LIBC32_LEGACY_PUBLIC__ __attribute__((visibility("default"))) #endif -/* Used to tag non-static symbols that are public and exposed by the shared library. */ -#define __LIBC_ABI_PUBLIC__ __attribute__((visibility ("default"))) - /* Used to rename functions so that the compiler emits a call to 'x' rather than the function this was applied to. */ #define __RENAME(x) __asm__(#x) diff --git a/libc/include/time.h b/libc/include/time.h index ef4ac2f8e..ca4c70896 100644 --- a/libc/include/time.h +++ b/libc/include/time.h @@ -37,9 +37,9 @@ __BEGIN_DECLS #define CLOCKS_PER_SEC 1000000 -extern char* tzname[] __LIBC_ABI_PUBLIC__; -extern int daylight __LIBC_ABI_PUBLIC__; -extern long int timezone __LIBC_ABI_PUBLIC__; +extern char* tzname[]; +extern int daylight; +extern long int timezone; struct sigevent; @@ -59,49 +59,48 @@ struct tm { #define TM_ZONE tm_zone -extern time_t time(time_t*) __LIBC_ABI_PUBLIC__; -extern int nanosleep(const struct timespec*, struct timespec*) __LIBC_ABI_PUBLIC__; +extern time_t time(time_t*); +extern int nanosleep(const struct timespec*, struct timespec*); -extern char* asctime(const struct tm*) __LIBC_ABI_PUBLIC__; -extern char* asctime_r(const struct tm*, char*) __LIBC_ABI_PUBLIC__; +extern char* asctime(const struct tm*); +extern char* asctime_r(const struct tm*, char*); -extern double difftime(time_t, time_t) __LIBC_ABI_PUBLIC__; -extern time_t mktime(struct tm*) __LIBC_ABI_PUBLIC__; +extern double difftime(time_t, time_t); +extern time_t mktime(struct tm*); -extern struct tm* localtime(const time_t*) __LIBC_ABI_PUBLIC__; -extern struct tm* localtime_r(const time_t*, struct tm*) __LIBC_ABI_PUBLIC__; +extern struct tm* localtime(const time_t*); +extern struct tm* localtime_r(const time_t*, struct tm*); -extern struct tm* gmtime(const time_t*) __LIBC_ABI_PUBLIC__; -extern struct tm* gmtime_r(const time_t*, struct tm*) __LIBC_ABI_PUBLIC__; +extern struct tm* gmtime(const time_t*); +extern struct tm* gmtime_r(const time_t*, struct tm*); -extern char* strptime(const char*, const char*, struct tm*) __LIBC_ABI_PUBLIC__; -extern size_t strftime(char*, size_t, const char*, const struct tm*) __LIBC_ABI_PUBLIC__; -extern size_t strftime_l(char*, size_t, const char*, const struct tm*, locale_t) __LIBC_ABI_PUBLIC__ - __INTRODUCED_IN(21); +extern char* strptime(const char*, const char*, struct tm*); +extern size_t strftime(char*, size_t, const char*, const struct tm*); +extern size_t strftime_l(char*, size_t, const char*, const struct tm*, locale_t) __INTRODUCED_IN(21); -extern char* ctime(const time_t*) __LIBC_ABI_PUBLIC__; -extern char* ctime_r(const time_t*, char*) __LIBC_ABI_PUBLIC__; +extern char* ctime(const time_t*); +extern char* ctime_r(const time_t*, char*); -extern void tzset(void) __LIBC_ABI_PUBLIC__; +extern void tzset(void); -extern clock_t clock(void) __LIBC_ABI_PUBLIC__; +extern clock_t clock(void); -extern int clock_getcpuclockid(pid_t, clockid_t*) __LIBC_ABI_PUBLIC__ __INTRODUCED_IN(23); +extern int clock_getcpuclockid(pid_t, clockid_t*) __INTRODUCED_IN(23); -extern int clock_getres(clockid_t, struct timespec*) __LIBC_ABI_PUBLIC__; -extern int clock_gettime(clockid_t, struct timespec*) __LIBC_ABI_PUBLIC__; -extern int clock_nanosleep(clockid_t, int, const struct timespec*, struct timespec*) __LIBC_ABI_PUBLIC__; -extern int clock_settime(clockid_t, const struct timespec*) __LIBC_ABI_PUBLIC__; +extern int clock_getres(clockid_t, struct timespec*); +extern int clock_gettime(clockid_t, struct timespec*); +extern int clock_nanosleep(clockid_t, int, const struct timespec*, struct timespec*); +extern int clock_settime(clockid_t, const struct timespec*); -extern int timer_create(int, struct sigevent*, timer_t*) __LIBC_ABI_PUBLIC__; -extern int timer_delete(timer_t) __LIBC_ABI_PUBLIC__; -extern int timer_settime(timer_t, int, const struct itimerspec*, struct itimerspec*) __LIBC_ABI_PUBLIC__; -extern int timer_gettime(timer_t, struct itimerspec*) __LIBC_ABI_PUBLIC__; -extern int timer_getoverrun(timer_t) __LIBC_ABI_PUBLIC__; +extern int timer_create(int, struct sigevent*, timer_t*); +extern int timer_delete(timer_t); +extern int timer_settime(timer_t, int, const struct itimerspec*, struct itimerspec*); +extern int timer_gettime(timer_t, struct itimerspec*); +extern int timer_getoverrun(timer_t); /* Non-standard extensions that are in the BSDs and glibc. */ -extern time_t timelocal(struct tm*) __LIBC_ABI_PUBLIC__ __INTRODUCED_IN(12); -extern time_t timegm(struct tm*) __LIBC_ABI_PUBLIC__ __INTRODUCED_IN(12); +extern time_t timelocal(struct tm*) __INTRODUCED_IN(12); +extern time_t timegm(struct tm*) __INTRODUCED_IN(12); __END_DECLS diff --git a/libc/include/wchar.h b/libc/include/wchar.h index 7a1fc070d..fbea8510b 100644 --- a/libc/include/wchar.h +++ b/libc/include/wchar.h @@ -104,7 +104,7 @@ extern int wcscmp(const wchar_t *, const wchar_t *); extern int wcscoll(const wchar_t *, const wchar_t *); extern wchar_t *wcscpy(wchar_t *, const wchar_t *); extern size_t wcscspn(const wchar_t *, const wchar_t *); -extern size_t wcsftime(wchar_t *, size_t, const wchar_t *, const struct tm *) __LIBC_ABI_PUBLIC__; +extern size_t wcsftime(wchar_t *, size_t, const wchar_t *, const struct tm *); extern size_t wcslen(const wchar_t *); extern int wcsncasecmp(const wchar_t *, const wchar_t *, size_t); extern int wcsncasecmp_l(const wchar_t*, const wchar_t*, size_t, locale_t) __INTRODUCED_IN(23); |
