bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iOS support for crt_externs.h


From: Eric Blake
Subject: Re: iOS support for crt_externs.h
Date: Thu, 06 Nov 2014 15:43:42 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

On 11/06/2014 03:05 PM, A. Klitzing wrote:
> Hi there,
> 
> we tried to compile gnutls for iOS and needed to patch it because iOS does
> not have a crt_externs.h include.

crt_externs.h is not a standardized header; it also does not have a
listing under gnulib's docs/glibc-headers/ directory.

The only mention I see of it is that on MacOS, it is a file available
for declaration of 'environ' (where declaring environ by hand fails on
that platform); and the usage in lib/unistd.in.h is supposed to be
appropriately guarded:

#if @GNULIB_ENVIRON@
# if address@hidden@
/* 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 <crt_externs.h>
#   define environ (*_NSGetEnviron ())

Okay, I see what you are complaining about - compiling for iOS satisfies
the __APPLE__ and even the __MACH__ defines, but is different than a
MacOS box, so it needs _yet another_ solution for how to declare
'environ' for use on iOS.

I refuse to use iOS myself (it is non-free software), so I cannot
validate if your patch is correct, so I hope someone else will join the
thread.  But off-hand, it seems reasonable.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]