mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-02 12:01:32 +01: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:
parent
2871422d9a
commit
bdde44ae8d
12
gl/stdint_.h
12
gl/stdint_.h
@ -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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user