From 08c22d94af9eaac33f7eaa48fdfcffcf2831ec1a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 6 Nov 2014 20:33:02 -0800 Subject: [PATCH] unistd: port to iOS MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 | 7 +++++++ lib/unistd.in.h | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index 7e03d0784e..28dcc5f548 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2014-11-06 Paul Eggert + + 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 obstack: do not reject malloc-style obstack_chunkfun, obstack_freefun diff --git a/lib/unistd.in.h b/lib/unistd.in.h index bfa9578f1e..b4a3f5b312 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -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 +# if !defined TARGET_OS_IPHONE && !defined TARGET_IPHONE_SIMULATOR +# define _GL_USE_CRT_EXTERNS +# endif +# endif +# ifdef _GL_USE_CRT_EXTERNS # include # define environ (*_NSGetEnviron ()) # else -- 2.39.5