summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS2
-rw-r--r--README.cygwin21
-rw-r--r--cygwin/cygwin.c2
-rw-r--r--hints/cygwin.sh1
-rw-r--r--mg.c6
-rw-r--r--pod/perlport.pod2
-rw-r--r--unixish.h6
-rw-r--r--util.c44
8 files changed, 20 insertions, 64 deletions
diff --git a/AUTHORS b/AUTHORS
index dbc47bb170..1b804182a9 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -136,7 +136,7 @@ Elaine -HFB- Ashton <elaine@chaos.wustl.edu>
Eric Arnold <eric.arnold@sun.com>
Eric Bartley <bartley@icd.cc.purdue.edu>
Eric E. Coe <Eric.Coe@oracle.com>
-Eric Fifer <EFifer@sanwaint.com>
+Eric Fifer <egf7@columbia.edu>
Erich Rickheit
Eryq <eryq@zeegee.com>
Eugene Alterman <Eugene.Alterman@bremer-inc.com>
diff --git a/README.cygwin b/README.cygwin
index 9718bb5e06..7e6a342b54 100644
--- a/README.cygwin
+++ b/README.cygwin
@@ -27,11 +27,11 @@ platforms. They run thanks to the Cygwin library which provides the UNIX
system calls and environment these programs expect. More information
about this project can be found at:
- http://sources.redhat.com/cygwin/
+ http://www.cygwin.com/
A recent net or commercial release of Cygwin is required.
-At the time this document was last updated, Cygwin 1.1.4 was current.
+At the time this document was last updated, Cygwin 1.1.5 was current.
B<NOTE:> At this point, minimal effort has been made to provide
compatibility with old (beta) Cygwin releases. The focus has been to
@@ -500,12 +500,11 @@ be kept as clean as possible.
=item Documentation
- INSTALL README.cygwin
+ INSTALL README.cygwin README.win32 MANIFEST
Changes Changes5.005 Changes5.004 Changes5.6
- AUTHORS MAINTAIN MANIFEST README.win32
- pod/buildtoc.PL pod/perl.pod pod/perl5004delta.pod pod/perl56delta.pod
- pod/perlfaq3.pod pod/perlhist.pod pod/perlmodlib.pod pod/perlport.pod
- pod/perltoc.pod
+ pod/perl.pod pod/perlport.pod pod/perlfaq3.pod
+ pod/perldelta.pod pod/perl5004delta.pod pod/perl56delta.pod
+ pod/perlhist.pod pod/perlmodlib.pod pod/buildtoc.PL pod/perltoc.pod
=item Build, Configure, Make, Install
@@ -543,9 +542,7 @@ be kept as clean as possible.
perl.h - binmode
doio.c - win9x can not rename a file when it is open
pp_sys.c - do not define h_errno, pp_system with spawn
- mg.c - environ WORKAROUND
- unixish.h - environ WORKAROUND
- util.c - environ WORKAROUND
+ util.c - use setenv
=item Compiled Module Source
@@ -588,7 +585,7 @@ and security contexts are required.
=head1 AUTHORS
Charles Wilson <cwilson@ece.gatech.edu>,
-Eric Fifer <efifer@sanwaint.com>,
+Eric Fifer <egf7@columbia.edu>,
alexander smishlajev <als@turnhere.com>,
Steven Morlock <newspost@morlock.net>,
Sebastien Barre <Sebastien.Barre@utc.fr>,
@@ -596,4 +593,4 @@ Teun Burgers <burgers@ecn.nl>.
=head1 HISTORY
-Last updated: 15 August 2000
+Last updated: 7 November 2000
diff --git a/cygwin/cygwin.c b/cygwin/cygwin.c
index db1c426ea1..33ea4db16b 100644
--- a/cygwin/cygwin.c
+++ b/cygwin/cygwin.c
@@ -146,7 +146,7 @@ XS(Cygwin_cwd)
if(items != 0)
Perl_croak(aTHX_ "Usage: Cwd::cwd()");
- if((cwd = getcwd(NULL, 0))) {
+ if((cwd = getcwd(NULL, -1))) {
ST(0) = sv_2mortal(newSVpv(cwd, 0));
safesysfree(cwd);
XSRETURN(1);
diff --git a/hints/cygwin.sh b/hints/cygwin.sh
index 7be173557c..c57d3f6fdf 100644
--- a/hints/cygwin.sh
+++ b/hints/cygwin.sh
@@ -25,6 +25,7 @@ libswanted=`echo " $libswanted " | sed -e 's/ c / /g'`
libswanted=`echo " $libswanted " | sed -e 's/ m / /g'`
libswanted="$libswanted cygipc"
test -z "$optimize" && optimize='-O2'
+ccflags="$ccflags -DPERL_USE_SAFE_PUTENV"
# - otherwise i686-cygwin
archname='cygwin'
diff --git a/mg.c b/mg.c
index bec0a82f72..923915dd01 100644
--- a/mg.c
+++ b/mg.c
@@ -936,11 +936,6 @@ Perl_magic_clear_all_env(pTHX_ SV *sv, MAGIC *mg)
cur += len+1;
}
FreeEnvironmentStrings(envv);
-# else
-# ifdef __CYGWIN__
- I32 i;
- for (i = 0; environ[i]; i++)
- safesysfree(environ[i]);
# else
# ifndef PERL_USE_SAFE_PUTENV
I32 i;
@@ -951,7 +946,6 @@ Perl_magic_clear_all_env(pTHX_ SV *sv, MAGIC *mg)
for (i = 0; environ[i]; i++)
safesysfree(environ[i]);
# endif /* PERL_USE_SAFE_PUTENV */
-# endif /* __CYGWIN__ */
environ[0] = Nullch;
diff --git a/pod/perlport.pod b/pod/perlport.pod
index 76b22c6bf8..1078e58bf3 100644
--- a/pod/perlport.pod
+++ b/pod/perlport.pod
@@ -686,7 +686,7 @@ The ActiveState Pages, http://www.activestate.com/
=item *
The Cygwin environment for Win32; F<README.cygwin> (installed
-as L<perlcygwin>), http://sources.redhat.com/cygwin/
+as L<perlcygwin>), http://www.cygwin.com/
=item *
diff --git a/unixish.h b/unixish.h
index 5815a19ea7..f6923b7f66 100644
--- a/unixish.h
+++ b/unixish.h
@@ -129,11 +129,7 @@
# ifdef POSIX_BC
# define PERL_SYS_INIT(c,v) sigignore(SIGFPE); MALLOC_INIT
# else
-# ifdef __CYGWIN__
-# define PERL_SYS_INIT(c,v) Perl_my_setenv_init(&environ); MALLOC_INIT
-# else
-# define PERL_SYS_INIT(c,v) MALLOC_INIT
-# endif
+# define PERL_SYS_INIT(c,v) MALLOC_INIT
# endif
#endif
#endif
diff --git a/util.c b/util.c
index 34cdaafe8a..0cb5c3074e 100644
--- a/util.c
+++ b/util.c
@@ -1981,7 +1981,7 @@ Perl_vwarner(pTHX_ U32 err, const char* pat, va_list* args)
#ifdef USE_ENVIRON_ARRAY
/* VMS' and EPOC's my_setenv() is in vms.c and epoc.c */
-#if !defined(WIN32) && !defined(__CYGWIN__)
+#if !defined(WIN32)
void
Perl_my_setenv(pTHX_ char *nam, char *val)
{
@@ -2023,50 +2023,19 @@ Perl_my_setenv(pTHX_ char *nam, char *val)
(void)sprintf(environ[i],"%s=%s",nam,val);/* all that work just for this */
#else /* PERL_USE_SAFE_PUTENV */
+# if defined(__CYGWIN__)
+ setenv(nam, val, 1);
+# else
char *new_env;
new_env = (char*)safesysmalloc((strlen(nam) + strlen(val) + 2) * sizeof(char));
(void)sprintf(new_env,"%s=%s",nam,val);/* all that work just for this */
(void)putenv(new_env);
+# endif /* __CYGWIN__ */
#endif /* PERL_USE_SAFE_PUTENV */
}
-#else /* WIN32 || __CYGWIN__ */
-#if defined(__CYGWIN__)
-/*
- * Save environ of perl.exe, currently Cygwin links in separate environ's
- * for each exe/dll. Probably should be a member of impure_ptr.
- */
-static char ***Perl_main_environ;
-
-EXTERN_C void
-Perl_my_setenv_init(char ***penviron)
-{
- Perl_main_environ = penviron;
-}
-
-void
-Perl_my_setenv(pTHX_ char *nam, char *val)
-{
- /* You can not directly manipulate the environ[] array because
- * the routines do some additional work that syncs the Cygwin
- * environment with the Windows environment.
- */
- char *oldstr = environ[setenv_getix(nam)];
-
- if (!val) {
- if (!oldstr)
- return;
- unsetenv(nam);
- safesysfree(oldstr);
- return;
- }
- setenv(nam, val, 1);
- environ = *Perl_main_environ; /* environ realloc can occur in setenv */
- if(oldstr && environ[setenv_getix(nam)] != oldstr)
- safesysfree(oldstr);
-}
-#else /* if WIN32 */
+#else /* WIN32 */
void
Perl_my_setenv(pTHX_ char *nam,char *val)
@@ -2127,7 +2096,6 @@ Perl_my_setenv(pTHX_ char *nam,char *val)
}
#endif /* WIN32 */
-#endif
I32
Perl_setenv_getix(pTHX_ char *nam)