]> Savannah Git Hosting - gnulib.git/commitdiff
stdint, read-file: fix missing SIZE_MAX on Android (tiny change)
authorKevin Cernekee <cernekee@gmail.com>
Wed, 5 Mar 2014 20:10:56 +0000 (12:10 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 6 Mar 2014 01:48:19 +0000 (17:48 -0800)
This is basically one of the options Bruno Haible proposed in:
http://lists.gnu.org/archive/html/bug-gnulib/2012-01/msg00282.html
* lib/sys_types.in.h (_GL_INCLUDING_UNISTD_H): New macro.
* lib/stdint.in.h: Use it.
* modules/stdint (Depends-on): Add sys_types.

ChangeLog
lib/stdint.in.h
lib/sys_types.in.h
modules/stdint

index 4e1984ca03a7ba762989413d0ed523327a7cad53..17b9b886a5d939ae16132deee78d7c7638d7fe99 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2014-03-04  Kevin Cernekee <cernekee@gmail.com>
+
+       stdint, read-file: fix missing SIZE_MAX on Android
+       * lib/sys_types.in.h (_GL_INCLUDING_UNISTD_H): New macro, to work
+       around potential circular dependencies when stdint.h is included
+       by the system's sys/types.h.
+       * lib/stdint.in.h: Use _GL_INCLUDING_UNISTD_H to figure out if
+       we're being included from sys/types.h, as merely checking
+       _SYS_TYPES_H_ could return true if sys/types.h had been previously
+       included.
+       * modules/stdint (Depends-on): Add sys_types.
+
 2014-02-26  Pádraig Brady <P@draigBrady.com>
 
        parse-datetime: fix crash or infloop in TZ="" parsing
index 91fad37d65b87b79939486cbf783a4cc8a36a857..98ee423b18bfaa3156c4e137e95a260f4aba04bf 100644 (file)
@@ -38,8 +38,7 @@
    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 __need_size_t
+#if defined __ANDROID__ && defined _GL_INCLUDING_SYS_TYPES_H
 # @INCLUDE_NEXT@ @NEXT_STDINT_H@
 #else
 
index 803d7b19a46ca98bd076e52a7bfe095aea24f908..b3bf9f2092e7600b79f5ec2660c5baa557d3982b 100644 (file)
@@ -23,7 +23,9 @@
 #ifndef _@GUARD_PREFIX@_SYS_TYPES_H
 
 /* The include_next requires a split double-inclusion guard.  */
+# define _GL_INCLUDING_SYS_TYPES_H
 #@INCLUDE_NEXT@ @NEXT_SYS_TYPES_H@
+# undef _GL_INCLUDING_SYS_TYPES_H
 
 #ifndef _@GUARD_PREFIX@_SYS_TYPES_H
 #define _@GUARD_PREFIX@_SYS_TYPES_H
index 92eb59f94860a396a524c2882093112d9cdd267a..62a57973aa070c386c874d0732f607ba6e873e94 100644 (file)
@@ -14,6 +14,7 @@ m4/longlong.m4
 Depends-on:
 include_next
 multiarch
+sys_types
 
 configure.ac:
 gl_STDINT_H