This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] testsuite: Add a test for passing of environment variables to inferior
On Thu, Oct 06, 2011 at 05:02:56PM +0200, Corinna Vinschen wrote:
>On Oct 6 10:51, Christopher Faylor wrote:
>> Why not just check if CW_CVT_ENV_TO_WINENV is defined rather than checking
>> specifically for a version number? Checking arbitrary versions like this
>> should be a last resort.
>
>The CW_foo values are not macros, but enum values. You can't check
>them for being defined.
>
>Possible workaround is to define them twice, once as enum and once
>as macro, just as Linux does or just as some Cygwin headers do,
>for instance <cygwin/in.h>:
>
> enum
> {
> IPPROTO_IP = 0, /* Dummy protocol for TCP */
> IPPROTO_HOPOPTS = 0, /* IPv6 Hop-by-Hop options */
> [...]
> };
>
> #define IPPROTO_IP IPPROTO_IP
> #define IPPROTO_HOPOPTS IPPROTO_HOPOPTS
> [...]
>
>If we do that in <sys/cygwin.h> as well, I can change the test to
>#ifdef CW_CVT_ENV_TO_WINENV. What do you think?
Ok.
cgf