1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-08 23:37:47 +02:00

gl: Add support for Android to stdint.h replacement.

* gl/stdint_.h: When included from Bionic <sys/types.h>, just include
the system's <stdint.h>.
This commit is contained in:
Werner Koch 2012-01-27 17:29:57 +01:00
parent 2871422d9a
commit bdde44ae8d

View File

@ -23,6 +23,16 @@
* <http://www.opengroup.org/susv3xbd/stdint.h.html>
*/
/* On Android (Bionic libc), <sys/types.h> includes this file before
having defined 'time_t'. Therefore in this case avoid including
other system header files; just include the system's <stdint.h>.
Ideally we should test __BIONIC__ here, but it is only defined after
<sys/cdefs.h> has been included; hence test __ANDROID__ instead. */
#if defined __ANDROID__ \
&& defined _SYS_TYPES_H_ && !defined _SSIZE_T_DEFINED_
# include_next <stdint.h>
#else
/* Get those types that are already defined in other system include
files, so that we can "#define int8_t signed char" below without
worrying about a later system include file containing a "typedef
@ -486,6 +496,6 @@
# define UINTMAX_C(x) x##UL
# endif
#endif /* !(defined __ANDROID__ && ...) */
#endif /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */
#endif /* _GL_STDINT_H */