[ipv6hackers] Definition of "struct ip6_opt" in Mac OS

Adrian Bool adrian.bool at revolution.net.eu
Fri Jul 20 10:30:23 CEST 2012


On Fri, Jul 20, 2012 at 2:12 AM, Fernando Gont <fgont at si6networks.com>wrote:

> On 07/19/2012 09:24 PM, Adrian Bool wrote:
> >
> > If you've got 10.6 headers installed; then I'd imagine the __MAC_10_7
> > contact would be undefined…  Perhaps a good enough handle to make a
> choice?
>
> Yet more Google'ing seems to indicate that there are: XCODE_VERSION and
> MACOSX_VERSION?
>


> Could you please check whether they really exist?
>
>
Not be default,

aid at bullet:~$ cat hello.c
#include <stdio.h>
int main (int argc, char **argv)
{
printf("XCODE_VERSION = '%s'\n", XCODE_VERSION);
printf("MACOSX_VERSION = '%s'\n", MACOSX_VERSION);
return 0;
}aid at bullet:~$ gcc -o hello hello.c
hello.c: In function ‘main’:
hello.c:4: error: ‘XCODE_VERSION’ undeclared (first use in this function)
hello.c:4: error: (Each undeclared identifier is reported only once
hello.c:4: error: for each function it appears in.)
hello.c:5: error: ‘MACOSX_VERSION’ undeclared (first use in this function)
aid at bullet:~$

aid at bullet:~$ grep -R XCODE_VERSION /usr/include/
grep: /usr/include/gcc/darwin/default: No such file or directory
aid at bullet:~$ grep -R MACOSX_VERSION /usr/include/
grep: /usr/include/gcc/darwin/default: No such file or directory
aid at bullet:~$

If I create a blank project (template, Command Line) in Xcode and put the
above code into it, Xcode states that these two constants are undefined.
There may well be a framework I can inculude to get these valuses.  Mmm.
Doubt it,

aid at bullet:~$ mdfind XCODE_VERSION
/Users/aid/Desktop/Fred/Fred/main.c
/Users/aid/hello.c
aid at bullet:~$ mdfind MACOSX_VERSION
/Users/aid/Desktop/Fred/Fred/main.c
/Users/aid/hello.c

The above files are the ones I just created testing this - these strings
don't appear on my system at all.

Cheers,

aid

-- 

-- 

Adrian Bool, Director, Network Revolution Limited


e adrian.bool at revolution.net.eu

w http://revolution.net.eu/

m +44 7525 781 982


*Learn and share IPv6 knowledge for free at
**http://ipv6exchange.net/*<http://ipv6exchange.net/>


Network Revolution Limited, 145-157 St John Street, London, EC1V 4PW,
United Kingdom.

Registered in England and Wales, 7607414.



More information about the Ipv6hackers mailing list