}
#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,
# 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 */
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
}
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)
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;
*/
# 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
#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 */
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;
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;
# 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
}
#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)
{