From: Bruno Haible Date: Sat, 21 Jan 2012 12:09:08 +0000 (+0100) Subject: stdint: Add support for Android. X-Git-Tag: v0.1~1231 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;h=11cd159f52a9abb8835b1d03cd3560f5ccc06e63;p=gnulib.git stdint: Add support for Android. * lib/stdint.in.h: When included from Bionic , just include the system's . Reported by Simon Josefsson . --- diff --git a/ChangeLog b/ChangeLog index 07c8a13e4..1a6a7e364 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2012-01-21 Bruno Haible + + stdint: Add support for Android. + * lib/stdint.in.h: When included from Bionic , just + include the system's . + Reported by Simon Josefsson . + 2012-01-19 Jim Meyering bootstrap: add bootstrap_post_import_hook diff --git a/lib/stdint.in.h b/lib/stdint.in.h index 69e83dc23..591371c61 100644 --- a/lib/stdint.in.h +++ b/lib/stdint.in.h @@ -34,6 +34,14 @@ . */ #define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H +/* On Android (Bionic libc), includes this file before + having defined 'time_t'. Therefore in this case avoid including + other system header files; just include the system's . */ +#if defined __BIONIC__ \ + && defined _SYS_TYPES_H_ && !defined _SSIZE_T_DEFINED_ +# @INCLUDE_NEXT@ @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 @@ -606,4 +614,5 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) #endif #endif /* _@GUARD_PREFIX@_STDINT_H */ +#endif /* !(defined __BIONIC__ && ...) */ #endif /* !defined _@GUARD_PREFIX@_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */