tech-toolchain archive

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

Re: fix to darwin xcompile by including unistd.h in nbcompat getmode.c compile



Simon Burge <simonb%NetBSD.org@localhost> writes:

> "Darrin B. Jewell" wrote:
>
>> The issue is that darwin uses tricks to version the setmode symbol
>> (appending $UNIX2003), while netbsd's compat_defs.h renames that same
>> token to __nbcompat_setmode.
>
> I think these "tricks" are also the cause of the getopt lossage in
>
>   http://mail-index.netbsd.org/tech-toolchain/2008/02/04/msg000025.html
>
> ?  I never figured out the right fix for this problem.
>
> Cheers,
> Simon.

Ah.  I've now hit that as well.  It seems kind of bogus that darwin is
versioning getopt, but not the opt* variables that it uses.

To avoid the problem with libiberty and mdsetimage, the only way I could
find was to include unistd.h in the getopt.c in libiberty so that the
version of getopt in libiberty also got the rename.

Darrin


Home | Main Index | Thread Index | Old Index