Re: [RFA] testsuite: Add a test for passing of environment variables to inferior

Corinna Vinschen
2011-10-07T13:53:28Z

On Oct 7 08:25, Christopher Faylor wrote:
> 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.

Thanks, patch with this change applied.

Corinna

--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat