diff options
author | Elliott Hughes <enh@google.com> | 2014-05-25 10:38:25 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2014-05-25 10:38:25 -0700 |
commit | 35d90bb6ec9799e04dacaa4b3a4984de9dc4c7f2 (patch) | |
tree | 5f6eb7bdb70c9dd9fa39c7b82e344c2adb70d059 /libc/stdio | |
parent | 255789e4d12d95dbb8e34cfae7fdc58514843ba5 (diff) | |
download | android_bionic-35d90bb6ec9799e04dacaa4b3a4984de9dc4c7f2.tar.gz android_bionic-35d90bb6ec9799e04dacaa4b3a4984de9dc4c7f2.tar.bz2 android_bionic-35d90bb6ec9799e04dacaa4b3a4984de9dc4c7f2.zip |
Restore __srget and __swbuf for LP32.
Anthony King <anthonydking@slimroms.net> reports that for Grouper the
Nvidia GL blobs need access to __swbuf. This is because the old <stdio.h>
had inline getc and putc implementations that directly referred to these
symbols.
Change-Id: I11a7b5550018ecc93d8f195c99857759669b2906
Diffstat (limited to 'libc/stdio')
-rw-r--r-- | libc/stdio/local.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/libc/stdio/local.h b/libc/stdio/local.h index 7ab73c0b8..c71efd9ae 100644 --- a/libc/stdio/local.h +++ b/libc/stdio/local.h @@ -41,6 +41,18 @@ #include "wcio.h" #include "fileext.h" +/* Android <= KitKat had getc/putc macros in <stdio.h> that referred + * to __srget/__swbuf, so those symbols need to be public for LP32 + * but can be hidden for LP64. + */ +#if defined(__LP64__) +__LIBC_HIDDEN__ int __srget(FILE*); +__LIBC_HIDDEN__ int __swbuf(int, FILE*); +#else +__LIBC_ABI_PUBLIC__ int __srget(FILE*); +__LIBC_ABI_PUBLIC__ int __swbuf(int, FILE*); +#endif + #pragma GCC visibility push(hidden) int __sflush(FILE *); @@ -104,10 +116,8 @@ extern int __sdidinit; #define NO_PRINTF_PERCENT_N /* OpenBSD exposes these in <stdio.h>, but we only want them exposed to the implementation. */ -__BEGIN_DECLS int __srget(FILE*); int __swbuf(int, FILE*); -__END_DECLS #define __sfeof(p) (((p)->_flags & __SEOF) != 0) #define __sferror(p) (((p)->_flags & __SERR) != 0) #define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF))) |