Browse Source

gnulib: stdint: Improve support for Android.

* lib/stdint.in.h: Test __ANDROID__, not __BIONIC__.
Reported by Simon Josefsson <simon@josefsson.org>.

Conflicts:
	ChangeLog
Bruno Haible 14 years ago
parent
commit
37000c5573
1 changed files with 5 additions and 3 deletions
  1. 5 3
      lib/stdint.in.h

+ 5 - 3
lib/stdint.in.h

@@ -36,8 +36,10 @@
 
 
 /* On Android (Bionic libc), <sys/types.h> includes this file before
 /* On Android (Bionic libc), <sys/types.h> includes this file before
    having defined 'time_t'.  Therefore in this case avoid including
    having defined 'time_t'.  Therefore in this case avoid including
-   other system header files; just include the system's <stdint.h>.  */
-#if defined __BIONIC__ \
+   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_
     && defined _SYS_TYPES_H_ && !defined _SSIZE_T_DEFINED_
 # @INCLUDE_NEXT@ @NEXT_STDINT_H@
 # @INCLUDE_NEXT@ @NEXT_STDINT_H@
 #else
 #else
@@ -597,5 +599,5 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
 #endif /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */
 #endif /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */
 
 
 #endif /* _@GUARD_PREFIX@_STDINT_H */
 #endif /* _@GUARD_PREFIX@_STDINT_H */
-#endif /* !(defined __BIONIC__ && ...) */
+#endif /* !(defined __ANDROID__ && ...) */
 #endif /* !defined _@GUARD_PREFIX@_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */
 #endif /* !defined _@GUARD_PREFIX@_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */