bug-gnulib
[Top][All Lists]
Advanced

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

Re: gnulib fails for build on Mac OS X 10.4: get_ppid_of.c:36:22: error:


From: Ryan Schmidt
Subject: Re: gnulib fails for build on Mac OS X 10.4: get_ppid_of.c:36:22: error:
Date: Wed, 12 Jan 2022 17:32:05 -0600

On Jan 12, 2022, at 17:18, Bruno Haible wrote:
> 
>>> Despite
>>> -DMAC_OS_X_VERSION_MAX_ALLOWED=1090 -DMAC_OS_X_VERSION_MIN_REQUIRED=1040
>>> it produced code that would *not* run on Mac OS X 10.4.
>> 
>> Uh yeah you can't do that at all. You can check the values of 
>> MAC_OS_X_VERSION_MAX_ALLOWED and MAC_OS_X_VERSION_MIN_REQUIRED in your code 
>> but you don't set them like that on the command line.
> 
> But I need to be able to give some testing to the code before I commit it,
> and installing 15 different versions of Xcode is not an option.
> 
> Next time, I'll try your advice, and see whether it works in my
> environment.

Looks like in a comment in Availability.h Apple says you *can* set the maximum 
SDK version on the command line as you proposed:

https://opensource.apple.com/source/xnu/xnu-2050.18.24/EXTERNAL_HEADERS/Availability.h.auto.html

> The upper bound for the OS version is rarely needed,
> but it can be set on the command line via: 
> -D__MAC_OS_X_VERSION_MAX_ALLOWED=10xx for
> Mac OS X and __IPHONE_OS_VERSION_MAX_ALLOWED = 1xxx for iPhone.

For AvailabilityMacros.h instead of Availability.h I guess that might be 
-DMAC_OS_X_VERSION_MAX_ALLOWED=10xx instead.

I would assume that you could use this to tell the SDK to pretend to be an 
earlier version (i.e. you have the 10.5 SDK but you want to pretend to be the 
10.4 SDK: -DMAC_OS_X_VERSION_MAX_ALLOWED=1040) however you probably can't tell 
an SDK to pretend to be a later version because it wouldn't know what features 
were added or removed in later SDKs.


reply via email to

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