In Cygwin display the $ENV{CYGWIN} under perl -V, as suggested
Jarkko Hietaniemi [Sun, 24 Jun 2001 01:29:33 +0000 (01:29 +0000)]
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

perl.c

diff --git a/perl.c b/perl.c
index 5951e22..ae2091f 100644 (file)
--- 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\";");
            }