diff --git a/libc/bionic/libgen.cpp b/libc/bionic/libgen.cpp index 5c27bb53b..c415c0f74 100644 --- a/libc/bionic/libgen.cpp +++ b/libc/bionic/libgen.cpp @@ -92,7 +92,7 @@ static int __basename_r(const char* path, char* buffer, size_t buffer_size) { } // Since this is a non-standard symbol, it might be hijacked by a basename_r in the executable. -__LIBC64_HIDDEN__ int basename_r(const char* path, char* buffer, size_t buffer_size) { +__LIBC32_LEGACY_PUBLIC__ int basename_r(const char* path, char* buffer, size_t buffer_size) { return __basename_r(path, buffer, buffer_size); } @@ -156,7 +156,7 @@ static int __dirname_r(const char* path, char* buffer, size_t buffer_size) { } // Since this is a non-standard symbol, it might be hijacked by a basename_r in the executable. -__LIBC64_HIDDEN__ int dirname_r(const char* path, char* buffer, size_t buffer_size) { +__LIBC32_LEGACY_PUBLIC__ int dirname_r(const char* path, char* buffer, size_t buffer_size) { return __dirname_r(path, buffer, buffer_size); } diff --git a/libc/include/sys/cdefs.h b/libc/include/sys/cdefs.h index 58038cd8d..342cfada2 100644 --- a/libc/include/sys/cdefs.h +++ b/libc/include/sys/cdefs.h @@ -432,9 +432,9 @@ /* Like __LIBC_HIDDEN__, but preserves binary compatibility for LP32. */ #ifdef __LP64__ -#define __LIBC64_HIDDEN__ __LIBC_HIDDEN__ +#define __LIBC32_LEGACY_PUBLIC__ __LIBC_HIDDEN__ #else -#define __LIBC64_HIDDEN__ __LIBC_ABI_PUBLIC__ +#define __LIBC32_LEGACY_PUBLIC__ __LIBC_ABI_PUBLIC__ #endif /* Used to tag non-static symbols that are public and exposed by the shared library. */ diff --git a/libc/stdio/glue.h b/libc/stdio/glue.h index a9e5d1030..cb1d18203 100644 --- a/libc/stdio/glue.h +++ b/libc/stdio/glue.h @@ -47,6 +47,6 @@ struct glue { }; /* This was referenced by a couple of different pieces of middleware and the Crystax NDK. */ -__LIBC64_HIDDEN__ extern struct glue __sglue; +__LIBC32_LEGACY_PUBLIC__ extern struct glue __sglue; __END_DECLS diff --git a/libc/stdio/local.h b/libc/stdio/local.h index 749de7b87..ced94e3e0 100644 --- a/libc/stdio/local.h +++ b/libc/stdio/local.h @@ -145,27 +145,27 @@ do { \ * to __srget/__swbuf, so those symbols need to be public for LP32 * but can be hidden for LP64. */ -__LIBC64_HIDDEN__ int __srget(FILE*); -__LIBC64_HIDDEN__ int __swbuf(int, FILE*); -__LIBC64_HIDDEN__ int __srefill(FILE*); +__LIBC32_LEGACY_PUBLIC__ int __srget(FILE*); +__LIBC32_LEGACY_PUBLIC__ int __swbuf(int, FILE*); +__LIBC32_LEGACY_PUBLIC__ int __srefill(FILE*); /* This was referenced by the apportable middleware for LP32. */ -__LIBC64_HIDDEN__ int __swsetup(FILE*); +__LIBC32_LEGACY_PUBLIC__ int __swsetup(FILE*); /* These were referenced by a couple of different pieces of middleware and the Crystax NDK. */ -__LIBC64_HIDDEN__ extern int __sdidinit; -__LIBC64_HIDDEN__ int __sflags(const char*, int*); -__LIBC64_HIDDEN__ FILE* __sfp(void); -__LIBC64_HIDDEN__ void __sinit(void); -__LIBC64_HIDDEN__ void __smakebuf(FILE*); +__LIBC32_LEGACY_PUBLIC__ extern int __sdidinit; +__LIBC32_LEGACY_PUBLIC__ int __sflags(const char*, int*); +__LIBC32_LEGACY_PUBLIC__ FILE* __sfp(void); +__LIBC32_LEGACY_PUBLIC__ void __sinit(void); +__LIBC32_LEGACY_PUBLIC__ void __smakebuf(FILE*); /* These are referenced by the Greed for Glory franchise. */ -__LIBC64_HIDDEN__ int __sflush(FILE *); -__LIBC64_HIDDEN__ int __sread(void *, char *, int); -__LIBC64_HIDDEN__ int __swrite(void *, const char *, int); -__LIBC64_HIDDEN__ fpos_t __sseek(void *, fpos_t, int); -__LIBC64_HIDDEN__ int __sclose(void *); -__LIBC64_HIDDEN__ int _fwalk(int (*)(FILE *)); +__LIBC32_LEGACY_PUBLIC__ int __sflush(FILE *); +__LIBC32_LEGACY_PUBLIC__ int __sread(void *, char *, int); +__LIBC32_LEGACY_PUBLIC__ int __swrite(void *, const char *, int); +__LIBC32_LEGACY_PUBLIC__ fpos_t __sseek(void *, fpos_t, int); +__LIBC32_LEGACY_PUBLIC__ int __sclose(void *); +__LIBC32_LEGACY_PUBLIC__ int _fwalk(int (*)(FILE *)); #pragma GCC visibility push(hidden) diff --git a/libc/upstream-openbsd/android/include/openbsd-compat.h b/libc/upstream-openbsd/android/include/openbsd-compat.h index 47bacc3ea..b07f55da0 100644 --- a/libc/upstream-openbsd/android/include/openbsd-compat.h +++ b/libc/upstream-openbsd/android/include/openbsd-compat.h @@ -71,8 +71,8 @@ __LIBC_HIDDEN__ extern int getentropy(void*, size_t); __LIBC_HIDDEN__ void* reallocarray(void*, size_t, size_t); /* LP32 NDK ctype.h contained references to these. */ -__LIBC64_HIDDEN__ extern const short* _tolower_tab_; -__LIBC64_HIDDEN__ extern const short* _toupper_tab_; +__LIBC32_LEGACY_PUBLIC__ extern const short* _tolower_tab_; +__LIBC32_LEGACY_PUBLIC__ extern const short* _toupper_tab_; __LIBC_HIDDEN__ extern const char _C_ctype_[]; __LIBC_HIDDEN__ extern const short _C_toupper_[];