From: Jarkko Hietaniemi Date: Sun, 24 Jun 2001 01:29:33 +0000 (+0000) Subject: In Cygwin display the $ENV{CYGWIN} under perl -V, as suggested X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=69fcd688e15822470f504b6986735ca63bc62068;p=p5sagit%2Fp5-mst-13.2.git In Cygwin display the $ENV{CYGWIN} under perl -V, as suggested by John Peacock. (Can be 'ntea' which means emulate UNIX file attribute semantics as much as possible, or 'ntsec' which uses native NTFS semantics.) (See also #10877.) p4raw-id: //depot/perl@10875 --- diff --git a/perl.c b/perl.c index 5951e22..ae2091f 100644 --- a/perl.c +++ b/perl.c @@ -1152,7 +1152,12 @@ S_parse_body(pTHX_ char **env, XSINIT_t xsinit) #endif sv_catpv(PL_Sv, "; \ $\"=\"\\n \"; \ -@env = map { \"$_=\\\"$ENV{$_}\\\"\" } sort grep {/^PERL/} keys %ENV; \ +@env = map { \"$_=\\\"$ENV{$_}\\\"\" } sort grep {/^PERL/} keys %ENV; "); +#ifdef __CYGWIN__ + sv_catpv(PL_Sv,"\ +push @env, \"CYGWIN=\\\"$ENV{CYGWIN}\\\"\";"); +#endif + sv_catpv(PL_Sv, "\ print \" \\%ENV:\\n @env\\n\" if @env; \ print \" \\@INC:\\n @INC\\n\";"); }