# HG changeset patch # User Paul Eggert # Date 1415334782 28800 # Node ID e6ce17a544835882da56d13d8f120fc57537b0a9 # Parent 5c5dad428438c330a30ea59bb8a9e9dc6b0cc1c7 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. diff --git a/ChangeLog b/ChangeLog --- 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 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -401,6 +401,12 @@ /* 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