[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: getopt compilation problem
From: |
Eric Blake |
Subject: |
Re: getopt compilation problem |
Date: |
Mon, 05 Oct 2009 20:21:53 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Eric Blake on 10/5/2009 1:58 PM:
> Reuben Thomas <rrt <at> sc3d.org> writes:
>
>> Using getopt-posix on FreeBSD 6, with current git gnulib, I get the
>> following compilation error:
>>
>> /usr/bin/cc -std=gnu99 -DHAVE_CONFIG_H -I. -I..
>> -I/usr/local/include
That was the missing key in my testing - FreeBSD's /usr/include/getopt.h
is sane, but for some reason, they also ship with a glibc-derivative
/usr/local/include/getopt.h with the faulty _getopt_internal declaration,
which you were seeing because of the -I/usr/local/include.
> $ head -n3 /usr/{,local/}include/getopt.h
> ==> /usr/include/getopt.h <==
> /* $NetBSD: getopt.h,v 1.4 2000/07/07 10:43:54 ad Exp $ */
> /* $FreeBSD: src/include/getopt.h,v 1.6 2004/02/24 08:09:20 ache Exp $ */
>
>
> ==> /usr/local/include/getopt.h <==
> /* Declarations for getopt.
> Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998, 2000
> Free Software Foundation, Inc.
I've reproduced the failure you saw, and confirmed that my patch fixed it,
so I've committed it.
> + getopt: avoid clash with FreeBSD _getopt_internal
> + * lib/getopt.in.h (_getopt_internal): Override the name.
> + * lib/getopt_int.h (includes): Pick up any overrides.
> + Reported by Reuben Thomas.
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkrKqcEACgkQ84KuGfSFAYCEOQCfewUhQ3OtLY1/0nU+B1wacQPY
T3gAoNHPMnxuM4dL3J0T/eLPbBbm0Pcw
=nI4/
-----END PGP SIGNATURE-----