diff options
author | Fifer, Eric <EFifer@sanwaint.com> | 1999-07-30 19:31:48 +0100 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-08-01 20:49:06 +0000 |
commit | 6dce6b70b85ef184fc8b4432d2436d1be5f0b117 (patch) | |
tree | da1ad9fa7dd8997755758f82d4b17acaac3739c9 | |
parent | 3ed82cfc5b0f2ba85118bedae2541af7b2b2c647 (diff) | |
download | perl-6dce6b70b85ef184fc8b4432d2436d1be5f0b117.tar.gz |
cygwin update
Message-Id: <71E287AB0D94D111BBD600600849EC8185EE06@POST>
Subject: [ID 19990730.003] PATCH] perl5.005_58 cygwin port
p4raw-id: //depot/perl@3855
-rw-r--r-- | doio.c | 2 | ||||
-rw-r--r-- | dosish.h | 2 | ||||
-rw-r--r-- | lib/File/Spec/Unix.pm | 2 | ||||
-rw-r--r-- | mg.c | 10 | ||||
-rw-r--r-- | perl.h | 2 | ||||
-rw-r--r-- | perlsdio.h | 6 | ||||
-rw-r--r-- | pp_sys.c | 4 | ||||
-rw-r--r-- | unixish.h | 6 | ||||
-rw-r--r-- | util.c | 2 |
9 files changed, 25 insertions, 11 deletions
@@ -548,7 +548,7 @@ Perl_nextargv(pTHX_ register GV *gv) } #endif #ifdef HAS_RENAME -#ifndef DOSISH +#if !defined(DOSISH) && !defined(CYGWIN) if (PerlLIO_rename(PL_oldname,SvPVX(sv)) < 0) { if (ckWARN_d(WARN_INPLACE)) Perl_warner(aTHX_ WARN_INPLACE, @@ -23,7 +23,7 @@ # define PERL_SYS_INIT(c,v) Perl_win32_init(c,v) # define BIT_BUCKET "nul" # else -# define PERL_SYS_INIT(c,v) Perl_my_setenv_init(&environ) +# define PERL_SYS_INIT(c,v) # define BIT_BUCKET "\\dev\\nul" /* "wanna be like, umm, Newlined, or somethin?" */ # endif #endif /* DJGPP */ diff --git a/lib/File/Spec/Unix.pm b/lib/File/Spec/Unix.pm index e33ecb7b36..87ad643fe2 100644 --- a/lib/File/Spec/Unix.pm +++ b/lib/File/Spec/Unix.pm @@ -41,7 +41,7 @@ ricochet (some scripts depend on it). sub canonpath { my ($self,$path,$reduce_ricochet) = @_; - $path =~ s|/+|/|g; # xx////xx -> xx/xx + $path =~ s|/+|/|g unless($^O =~ /cygwin/); # xx////xx -> xx/xx $path =~ s|(/\.)+/|/|g; # xx/././xx -> xx/xx $path =~ s|^(\./)+|| unless $path eq "./"; # ./xx -> xx $path =~ s|^/(\.\./)+|/|; # /../../xx -> xx @@ -828,7 +828,12 @@ Perl_magic_clear_all_env(pTHX_ SV *sv, MAGIC *mg) } FreeEnvironmentStrings(envv); # else -# ifndef PERL_USE_SAFE_PUTENV +# ifdef CYGWIN + I32 i; + for (i = 0; environ[i]; i++) + Safefree(environ[i]); +# else +# ifndef PERL_USE_SAFE_PUTENV I32 i; if (environ == PL_origenviron) @@ -836,7 +841,8 @@ Perl_magic_clear_all_env(pTHX_ SV *sv, MAGIC *mg) else for (i = 0; environ[i]; i++) safesysfree(environ[i]); -# endif /* PERL_USE_SAFE_PUTENV */ +# endif /* PERL_USE_SAFE_PUTENV */ +# endif /* CYGWIN */ environ[0] = Nullch; @@ -1653,7 +1653,7 @@ typedef pthread_key_t perl_key; */ # define USEMYBINMODE / **/ # define my_binmode(fp, iotype) \ - (PerlLIO_setmode(PerlIO_fileno(fp), O_BINARY) != -1 ? TRUE : NULL) + (PerlLIO_setmode(PerlIO_fileno(fp), O_BINARY) != -1 ? TRUE : FALSE) #endif #ifdef UNION_ANY_DEFINITION diff --git a/perlsdio.h b/perlsdio.h index efc52e1cd4..46a15de9fa 100644 --- a/perlsdio.h +++ b/perlsdio.h @@ -79,7 +79,11 @@ #ifdef HAS_SETLINEBUF #define PerlIO_setlinebuf(f) setlinebuf(f); #else -#define PerlIO_setlinebuf(f) setvbuf(f, Nullch, _IOLBF, 0); +# ifdef CYGWIN +# define PerlIO_setlinebuf(f) +# else +# define PerlIO_setlinebuf(f) setvbuf(f, Nullch, _IOLBF, 0); +# endif #endif /* Now our interface to Configure's FILE_xxx macros */ @@ -3543,7 +3543,7 @@ PP(pp_fork) PP(pp_wait) { -#if !defined(DOSISH) || defined(OS2) || defined(WIN32) || defined(CYGWIN) +#if !defined(DOSISH) || defined(OS2) || defined(WIN32) djSP; dTARGET; Pid_t childpid; int argflags; @@ -3559,7 +3559,7 @@ PP(pp_wait) PP(pp_waitpid) { -#if !defined(DOSISH) || defined(OS2) || defined(WIN32) || defined(CYGWIN) +#if !defined(DOSISH) || defined(OS2) || defined(WIN32) djSP; dTARGET; Pid_t childpid; int optype; @@ -122,7 +122,11 @@ # ifdef POSIX_BC # define PERL_SYS_INIT(c,v) sigignore(SIGFPE); MALLOC_INIT # else -# define PERL_SYS_INIT(c,v) MALLOC_INIT +# 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 # endif #endif #endif @@ -2547,7 +2547,7 @@ Perl_my_pclose(pTHX_ PerlIO *ptr) } #endif /* !DOSISH */ -#if !defined(DOSISH) || defined(OS2) || defined(WIN32) || defined(CYGWIN) +#if !defined(DOSISH) || defined(OS2) || defined(WIN32) I32 Perl_wait4pid(pTHX_ int pid, int *statusp, int flags) { |