]> Savannah Git Hosting - gnulib.git/commitdiff
unistd: fix iOS check conditional
authorDaiki Ueno <ueno@gnu.org>
Thu, 11 Dec 2014 07:07:31 +0000 (16:07 +0900)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 12 Dec 2014 18:15:26 +0000 (10:15 -0800)
On Mac OS X 10.8, the TARGET_* macros are unconditonally defined
as 0 or 1 in <TargetConditionals.h>, and the previous check always
yielded true on non-iOS environment.
* lib/unistd.in.h (environ) [__APPLE__]: Check the values of
TARGET_OS_IPHONE and TARGET_IPHONE_SIMULATOR, instead of whether
they are defined.

ChangeLog
lib/unistd.in.h

index 5fac19d58b44bc08061b01c449baa5f28ef6913e..2336ee58282263768a724d03a730114f67a29a04 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2014-12-11  Daiki Ueno  <ueno@gnu.org>
+
+       unistd: fix iOS check conditional
+       On Mac OS X 10.8, the TARGET_* macros are unconditonally defined
+       as 0 or 1 in <TargetConditionals.h>, and the previous check always
+       yielded true on non-iOS environment.
+       * lib/unistd.in.h (environ) [__APPLE__]: Check the values of
+       TARGET_OS_IPHONE and TARGET_IPHONE_SIMULATOR, instead of whether
+       they are defined.
+
 2014-12-09  Paul Eggert  <eggert@cs.ucla.edu>
 
        posixtm: avoid compiler warning in a better way
index b4a3f5b312199339d4e182893fbc90f65ea0fb1c..7907f832c952585204aa3bfd2909ad88aaa079b9 100644 (file)
@@ -402,7 +402,7 @@ _GL_WARN_ON_USE (dup3, "dup3 is unportable - "
    "VARIABLE=VALUE", terminated with a NULL.  */
 #  if defined __APPLE__ && defined __MACH__
 #   include <TargetConditionals.h>
-#   if !defined TARGET_OS_IPHONE && !defined TARGET_IPHONE_SIMULATOR
+#   if !TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR
 #    define _GL_USE_CRT_EXTERNS
 #   endif
 #  endif