]> Savannah Git Hosting - gnulib.git/commitdiff
unistd: port to iOS
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 7 Nov 2014 04:33:02 +0000 (20:33 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 7 Nov 2014 04:33:27 +0000 (20:33 -0800)
Problem reported by AndrĂ© Klitzing in:
http://lists.gnu.org/archive/html/bug-gnulib/2014-11/msg00013.html
* lib/unistd.in.h (environ): Do not include crt_externs.h on iOS.

ChangeLog
lib/unistd.in.h

index 7e03d0784ebb55fa09f61d7ab615f94382f0093b..28dcc5f548baf72f8f22d81a1a41cd29b7e440fd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2014-11-06  Paul Eggert  <eggert@cs.ucla.edu>
+
+       unistd: port to iOS
+       Problem reported by AndrĂ© Klitzing in:
+       http://lists.gnu.org/archive/html/bug-gnulib/2014-11/msg00013.html
+       * lib/unistd.in.h (environ): Do not include crt_externs.h on iOS.
+
 2014-11-05  Paul Eggert  <eggert@cs.ucla.edu>
 
        obstack: do not reject malloc-style obstack_chunkfun, obstack_freefun
index bfa9578f1e265747ea8264fcd0333fe1402cbb00..b4a3f5b312199339d4e182893fbc90f65ea0fb1c 100644 (file)
@@ -401,6 +401,12 @@ _GL_WARN_ON_USE (dup3, "dup3 is unportable - "
 /* Set of environment variables and values.  An array of strings of the form
    "VARIABLE=VALUE", terminated with a NULL.  */
 #  if defined __APPLE__ && defined __MACH__
+#   include <TargetConditionals.h>
+#   if !defined TARGET_OS_IPHONE && !defined TARGET_IPHONE_SIMULATOR
+#    define _GL_USE_CRT_EXTERNS
+#   endif
+#  endif
+#  ifdef _GL_USE_CRT_EXTERNS
 #   include <crt_externs.h>
 #   define environ (*_NSGetEnviron ())
 #  else