summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/SDBM_File/Makefile.PL30
-rw-r--r--lib/ExtUtils/MM_Unix.pm26
-rw-r--r--makedef.pl90
-rw-r--r--perlio.c28
-rw-r--r--win32/Makefile116
-rw-r--r--win32/bin/mdelete.bat30
-rw-r--r--win32/config.gc2
-rw-r--r--win32/config.vc2
-rw-r--r--win32/win32.c88
-rw-r--r--win32/win32.h2
-rw-r--r--win32/win32sck.c74
11 files changed, 244 insertions, 244 deletions
diff --git a/ext/SDBM_File/Makefile.PL b/ext/SDBM_File/Makefile.PL
index bff3e7b3bc..132bdadf26 100644
--- a/ext/SDBM_File/Makefile.PL
+++ b/ext/SDBM_File/Makefile.PL
@@ -1,5 +1,5 @@
use ExtUtils::MakeMaker;
-use Config;
+use Config;
# The existence of the ./sdbm/Makefile.PL file causes MakeMaker
# to automatically include Makefile code for the targets
@@ -22,26 +22,26 @@ WriteMakefile(
sub MY::postamble {
if ($^O =~ /MSWin32/ && Win32::IsWin95()) {
- if ($Config{'make'} =~ /dmake/i) {
- # dmake-specific
- return <<EOT;
+ if ($Config{'make'} =~ /dmake/i) {
+ # dmake-specific
+ return <<EOT;
$(MYEXTLIB): sdbm/Makefile
@[
cd sdbm
$(MAKE) all
cd ..
]
-EOT
- } elsif ($Config{'make'} =~ /nmake/i) {
- #
- return <<'EOT';
-$(MYEXTLIB): sdbm/Makefile
- cd sdbm
- $(MAKE) all
- cd ..
-EOT
- }
- } elsif ($^O ne 'VMS') {
+EOT
+ } elsif ($Config{'make'} =~ /nmake/i) {
+ #
+ return <<EOT;
+$(MYEXTLIB): sdbm/Makefile
+ cd sdbm
+ $(MAKE) all
+ cd ..
+EOT
+ }
+} elsif ($^O ne 'VMS') {
'
$(MYEXTLIB): sdbm/Makefile
cd sdbm && $(MAKE) all
diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm
index 66394f113d..f538818a8d 100644
--- a/lib/ExtUtils/MM_Unix.pm
+++ b/lib/ExtUtils/MM_Unix.pm
@@ -3288,9 +3288,9 @@ sub subdir_x {
my($self, $subdir) = @_;
my(@m);
if ($Is_Win32 && Win32::IsWin95()) {
- if ($Config{'make'} =~ /dmake/i) {
- # dmake-specific
- return <<EOT;
+ if ($Config{'make'} =~ /dmake/i) {
+ # dmake-specific
+ return <<EOT;
subdirs ::
@[
cd $subdir
@@ -3298,16 +3298,16 @@ subdirs ::
cd ..
]
EOT
- } elsif ($Config{'make'} =~ /nmake/i) {
- # nmake-specific
- return <<EOT;
-subdirs ::
- cd $subdir
- \$(MAKE) all \$(PASTHRU)
- cd ..
-EOT
- }
- } else {
+ } elsif ($Config{'make'} =~ /nmake/i) {
+ # nmake-specific
+ return <<EOT;
+subdirs ::
+ cd $subdir
+ \$(MAKE) all \$(PASTHRU)
+ cd ..
+EOT
+ }
+ } else {
return <<EOT;
subdirs ::
diff --git a/makedef.pl b/makedef.pl
index 70682f7976..e576245831 100644
--- a/makedef.pl
+++ b/makedef.pl
@@ -73,8 +73,8 @@ if ($PLATFORM eq 'aix') {
}
elsif ($PLATFORM eq 'win32') {
$CCTYPE = "MSVC" unless defined $CCTYPE;
- foreach ($thrdvar_h, $intrpvar_h, $perlvars_h, $global_sym,
- $pp_sym, $globvar_sym, $perlio_sym) {
+ foreach ($thrdvar_h, $intrpvar_h, $perlvars_h, $global_sym,
+ $pp_sym, $globvar_sym, $perlio_sym) {
s!^!..\\!;
}
}
@@ -573,8 +573,8 @@ while (<DATA>) {
if ($PLATFORM eq 'win32') {
foreach my $symbol (qw(
- setuid
- setgid
+ setuid
+ setgid
boot_DynaLoader
Perl_init_os_extras
Perl_thread_create
@@ -683,47 +683,47 @@ if ($PLATFORM eq 'win32') {
win32_getpid
win32_crypt
win32_dynaload
-
- win32_stdin
- win32_stdout
- win32_stderr
- win32_ferror
- win32_feof
- win32_strerror
- win32_fprintf
- win32_printf
- win32_vfprintf
- win32_vprintf
- win32_fread
- win32_fwrite
- win32_fopen
- win32_fdopen
- win32_freopen
- win32_fclose
- win32_fputs
- win32_fputc
- win32_ungetc
- win32_getc
- win32_fileno
- win32_clearerr
- win32_fflush
- win32_ftell
- win32_fseek
- win32_fgetpos
- win32_fsetpos
- win32_rewind
- win32_tmpfile
- win32_setbuf
- win32_setvbuf
- win32_flushall
- win32_fcloseall
- win32_fgets
- win32_gets
- win32_fgetc
- win32_putc
- win32_puts
- win32_getchar
- win32_putchar
+
+ win32_stdin
+ win32_stdout
+ win32_stderr
+ win32_ferror
+ win32_feof
+ win32_strerror
+ win32_fprintf
+ win32_printf
+ win32_vfprintf
+ win32_vprintf
+ win32_fread
+ win32_fwrite
+ win32_fopen
+ win32_fdopen
+ win32_freopen
+ win32_fclose
+ win32_fputs
+ win32_fputc
+ win32_ungetc
+ win32_getc
+ win32_fileno
+ win32_clearerr
+ win32_fflush
+ win32_ftell
+ win32_fseek
+ win32_fgetpos
+ win32_fsetpos
+ win32_rewind
+ win32_tmpfile
+ win32_setbuf
+ win32_setvbuf
+ win32_flushall
+ win32_fcloseall
+ win32_fgets
+ win32_gets
+ win32_fgetc
+ win32_putc
+ win32_puts
+ win32_getchar
+ win32_putchar
))
{
try_symbol($symbol);
diff --git a/perlio.c b/perlio.c
index e15fc5c3d6..4e22bb5d3f 100644
--- a/perlio.c
+++ b/perlio.c
@@ -107,9 +107,9 @@ PerlIO_debug(char *fmt,...)
static int dbg = 0;
if (!dbg)
{
- char *s = PerlEnv_getenv("PERLIO_DEBUG");
+ char *s = PerlEnv_getenv("PERLIO_DEBUG");
if (s && *s)
- dbg = PerlLIO_open3(s,O_WRONLY|O_CREAT|O_APPEND,0666);
+ dbg = PerlLIO_open3(s,O_WRONLY|O_CREAT|O_APPEND,0666);
else
dbg = -1;
}
@@ -128,7 +128,7 @@ PerlIO_debug(char *fmt,...)
Perl_sv_vcatpvf(aTHX_ sv, fmt, &ap);
s = SvPV(sv,len);
- PerlLIO_write(dbg,s,len);
+ PerlLIO_write(dbg,s,len);
va_end(ap);
SvREFCNT_dec(sv);
}
@@ -354,7 +354,7 @@ PerlIO_default_layer(I32 n)
int len;
if (!PerlIO_layer_hv)
{
- char *s = PerlEnv_getenv("PERLIO");
+ char *s = PerlEnv_getenv("PERLIO");
newXS("perlio::import",XS_perlio_import,__FILE__);
newXS("perlio::unimport",XS_perlio_unimport,__FILE__);
PerlIO_layer_hv = get_hv("perlio::layers",GV_ADD|GV_ADDMULTI);
@@ -370,13 +370,13 @@ PerlIO_default_layer(I32 n)
{
while (*s)
{
- while (*s && isSPACE((unsigned char)*s))
+ while (*s && isSPACE((unsigned char)*s))
s++;
if (*s)
{
char *e = s;
SV *layer;
- while (*e && !isSPACE((unsigned char)*e))
+ while (*e && !isSPACE((unsigned char)*e))
e++;
layer = PerlIO_find_layer(s,e-s);
if (layer)
@@ -902,7 +902,7 @@ PerlIOUnix_open(PerlIO_funcs *self, const char *path,const char *mode)
int oflags = PerlIOUnix_oflags(mode);
if (oflags != -1)
{
- int fd = PerlLIO_open3(path,oflags,0666);
+ int fd = PerlLIO_open3(path,oflags,0666);
if (fd >= 0)
{
PerlIOUnix *s = PerlIOSelf(PerlIO_push(f = PerlIO_allocate(),self,mode),PerlIOUnix);
@@ -923,7 +923,7 @@ PerlIOUnix_reopen(const char *path, const char *mode, PerlIO *f)
(*PerlIOBase(f)->tab->Close)(f);
if (oflags != -1)
{
- int fd = PerlLIO_open3(path,oflags,0666);
+ int fd = PerlLIO_open3(path,oflags,0666);
if (fd >= 0)
{
s->fd = fd;
@@ -943,7 +943,7 @@ PerlIOUnix_read(PerlIO *f, void *vbuf, Size_t count)
return 0;
while (1)
{
- SSize_t len = PerlLIO_read(fd,vbuf,count);
+ SSize_t len = PerlLIO_read(fd,vbuf,count);
if (len >= 0 || errno != EINTR)
{
if (len < 0)
@@ -961,7 +961,7 @@ PerlIOUnix_write(PerlIO *f, const void *vbuf, Size_t count)
int fd = PerlIOSelf(f,PerlIOUnix)->fd;
while (1)
{
- SSize_t len = PerlLIO_write(fd,vbuf,count);
+ SSize_t len = PerlLIO_write(fd,vbuf,count);
if (len >= 0 || errno != EINTR)
{
if (len < 0)
@@ -974,7 +974,7 @@ PerlIOUnix_write(PerlIO *f, const void *vbuf, Size_t count)
IV
PerlIOUnix_seek(PerlIO *f, Off_t offset, int whence)
{
- Off_t new = PerlLIO_lseek(PerlIOSelf(f,PerlIOUnix)->fd,offset,whence);
+ Off_t new = PerlLIO_lseek(PerlIOSelf(f,PerlIOUnix)->fd,offset,whence);
PerlIOBase(f)->flags &= ~PERLIO_F_EOF;
return (new == (Off_t) -1) ? -1 : 0;
}
@@ -982,7 +982,7 @@ PerlIOUnix_seek(PerlIO *f, Off_t offset, int whence)
Off_t
PerlIOUnix_tell(PerlIO *f)
{
- return PerlLIO_lseek(PerlIOSelf(f,PerlIOUnix)->fd,0,SEEK_CUR);
+ return PerlLIO_lseek(PerlIOSelf(f,PerlIOUnix)->fd,0,SEEK_CUR);
}
IV
@@ -990,7 +990,7 @@ PerlIOUnix_close(PerlIO *f)
{
int fd = PerlIOSelf(f,PerlIOUnix)->fd;
int code = 0;
- while (PerlLIO_close(fd) != 0)
+ while (PerlLIO_close(fd) != 0)
{
if (errno != EINTR)
{
@@ -2269,7 +2269,7 @@ PerlIO_tmpfile(void)
{
PerlIOBase(f)->flags |= PERLIO_F_TEMP;
}
- PerlLIO_unlink(SvPVX(sv));
+ PerlLIO_unlink(SvPVX(sv));
SvREFCNT_dec(sv);
}
return f;
diff --git a/win32/Makefile b/win32/Makefile
index 121f8c8622..94b01758a7 100644
--- a/win32/Makefile
+++ b/win32/Makefile
@@ -63,12 +63,12 @@ INST_ARCH = \$(ARCHNAME)
#USE_IMP_SYS = define
#
-# uncomment to enable the experimental PerlIO I/O subsystem.
-# This is currently incompatible with USE_MULTI, USE_ITHREADS,
-# and USE_IMP_SYS
-#USE_PERLIO = define
-
-#
+# uncomment to enable the experimental PerlIO I/O subsystem.
+# This is currently incompatible with USE_MULTI, USE_ITHREADS,
+# and USE_IMP_SYS
+#USE_PERLIO = define
+
+#
# WARNING! This option is deprecated and will eventually go away (enable
# USE_ITHREADS instead).
#
@@ -279,18 +279,18 @@ ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-thread
!IF "$(USE_MULTI)" == "define"
ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-multi
!ELSE
-!IF "$(USE_PERLIO)" == "define"
-ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-perlio
-!ELSE
+!IF "$(USE_PERLIO)" == "define"
+ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-perlio
+!ELSE
ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
!ENDIF
!ENDIF
!ENDIF
-!ENDIF
-
-!IF "$(USE_PERLIO)" == "define"
-BUILDOPT = $(BUILDOPT) -DUSE_PERLIO
-!ENDIF
+!ENDIF
+
+!IF "$(USE_PERLIO)" == "define"
+BUILDOPT = $(BUILDOPT) -DUSE_PERLIO
+!ENDIF
!IF "$(USE_ITHREADS)" == "define"
ARCHNAME = $(ARCHNAME)-thread
@@ -479,8 +479,8 @@ RCOPY = xcopy /f /r /i /e /d
NOOP = @echo
NULL =
-DEL = bin\mdelete.bat
-
+DEL = bin\mdelete.bat
+
#
# filenames given to xsubpp must have forward slashes (since it puts
# full pathnames in #line strings)
@@ -707,8 +707,8 @@ CFG_VARS = \
"INST_ARCH=$(INST_ARCH)" \
"archname=$(ARCHNAME)" \
"cc=$(CC)" \
- "ccflags=-nologo -Gf -W3 $(OPTIMIZE:"=\") $(DEFINES) $(BUILDOPT)" \
- "cf_email=$(EMAIL)" \
+ "ccflags=-nologo -Gf -W3 $(OPTIMIZE:"=\") $(DEFINES) $(BUILDOPT)" \
+ "cf_email=$(EMAIL)" \
"d_crypt=$(D_CRYPT)" \
"d_mymalloc=$(PERL_MALLOC)" \
"libs=$(LIBFILES)" \
@@ -769,16 +769,16 @@ regen_config_h:
rename config.h $(CFGH_TMPL)
$(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
- cd ..
- miniperl configpm
- cd win32
+ cd ..
+ miniperl configpm
+ cd win32
if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
$(XCOPY) ..\*.h $(COREDIR)\*.*
$(XCOPY) *.h $(COREDIR)\*.*
$(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
$(RCOPY) include $(COREDIR)\*.*
- -$(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)"
- if errorlevel 1 $(MAKE) /$(MAKEFLAGS) $(CONFIGPM)
+ -$(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)"
+ if errorlevel 1 $(MAKE) /$(MAKEFLAGS) $(CONFIGPM)
$(MINIPERL) : $(MINIDIR) $(MINI_OBJ)
$(LINK32) -subsystem:console -out:$@ @<<
@@ -821,9 +821,9 @@ $(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES)
$(XCOPY) $(PERLIMPLIB) $(COREDIR)
$(MINIMOD) : $(MINIPERL) ..\minimod.pl
- cd ..
- miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
- cd win32
+ cd ..
+ miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
+ cd win32
..\x2p\a2p$(o) : ..\x2p\a2p.c
$(CC) -I..\x2p $(CFLAGS) $(OBJOUT_FLAG)$@ -c ..\x2p\a2p.c
@@ -1024,14 +1024,14 @@ distclean: clean
-del /f $(LIBDIR)\Devel\Peek.pm $(LIBDIR)\Devel\DProf.pm
-del /f $(LIBDIR)\File\Glob.pm
-del /f $(LIBDIR)\Storable.pm
- -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
- -rmdir /s $(LIBDIR)\IO
- -if exist $(LIBDIR)\Thread rmdir /s /q $(LIBDIR)\Thread
- -rmdir /s $(LIBDIR)\Thread
- -if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B
- -rmdir /s $(LIBDIR)\B
- -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
- -rmdir /s $(LIBDIR)\Data
+ -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
+ -rmdir /s $(LIBDIR)\IO
+ -if exist $(LIBDIR)\Thread rmdir /s /q $(LIBDIR)\Thread
+ -rmdir /s $(LIBDIR)\Thread
+ -if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B
+ -rmdir /s $(LIBDIR)\B
+ -if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
+ -rmdir /s $(LIBDIR)\Data
-del /f $(PODDIR)\*.html
-del /f $(PODDIR)\*.bat
cd ..\utils
@@ -1048,10 +1048,10 @@ distclean: clean
cd $(EXTDIR)
-del /s *.lib *.def *.map *.pdb *.bs Makefile *$(o) pm_to_blib
cd ..\win32
- -if exist $(AUTODIR) rmdir /s /q $(AUTODIR)
- -rmdir /s $(AUTODIR)
- -if exist $(COREDIR) rmdir /s /q $(COREDIR)
- -rmdir /s $(COREDIR)
+ -if exist $(AUTODIR) rmdir /s /q $(AUTODIR)
+ -rmdir /s $(AUTODIR)
+ -if exist $(COREDIR) rmdir /s /q $(COREDIR)
+ -rmdir /s $(COREDIR)
install : all installbare installhtml
@@ -1108,26 +1108,26 @@ test-wide-notty : test-prep
cd ..\win32
clean :
- -@$(DEL) miniperlmain$(o)
- -@$(DEL) $(MINIPERL)
- -@$(DEL) perlglob$(o)
- -@$(DEL) perlmain$(o)
- -@$(DEL) config.w32
- -@$(DEL) /f config.h
- -@$(DEL) $(GLOBEXE)
- -@$(DEL) $(PERLEXE)
- -@$(DEL) $(WPERLEXE)
- -@$(DEL) $(PERLDLL)
- -@$(DEL) $(CORE_OBJ)
- -if exist $(MINIDIR) deltree /y $(MINIDIR)
- -@$(DEL) $(WIN32_OBJ)
- -@$(DEL) $(DLL_OBJ)
- -@$(DEL) $(X2P_OBJ)
- -@$(DEL) ..\*$(o) ..\*.lib ..\*.exp *$(o) *.lib *.exp *.res
- -@$(DEL) ..\t\*.exe ..\t\*.dll ..\t\*.bat
- -@$(DEL) ..\x2p\*.exe ..\x2p\*.bat
- -@$(DEL) *.ilk
- -@$(DEL) *.pdb
+ -@$(DEL) miniperlmain$(o)
+ -@$(DEL) $(MINIPERL)
+ -@$(DEL) perlglob$(o)
+ -@$(DEL) perlmain$(o)
+ -@$(DEL) config.w32
+ -@$(DEL) /f config.h
+ -@$(DEL) $(GLOBEXE)
+ -@$(DEL) $(PERLEXE)
+ -@$(DEL) $(WPERLEXE)
+ -@$(DEL) $(PERLDLL)
+ -@$(DEL) $(CORE_OBJ)
+ -if exist $(MINIDIR) deltree /y $(MINIDIR)
+ -@$(DEL) $(WIN32_OBJ)
+ -@$(DEL) $(DLL_OBJ)
+ -@$(DEL) $(X2P_OBJ)
+ -@$(DEL) ..\*$(o) ..\*.lib ..\*.exp *$(o) *.lib *.exp *.res
+ -@$(DEL) ..\t\*.exe ..\t\*.dll ..\t\*.bat
+ -@$(DEL) ..\x2p\*.exe ..\x2p\*.bat
+ -@$(DEL) *.ilk
+ -@$(DEL) *.pdb
# Handy way to run perlbug -ok without having to install and run the
# installed perlbug. We don't re-run the tests here - we trust the user.
diff --git a/win32/bin/mdelete.bat b/win32/bin/mdelete.bat
index 99b1c3dbf0..0e7e8bda0a 100644
--- a/win32/bin/mdelete.bat
+++ b/win32/bin/mdelete.bat
@@ -1,18 +1,18 @@
-@echo off
-rem ! This is a batch file to delete all the files on its
-rem ! command line, to work around command.com's del command's
-rem ! braindeadness
-rem !
-rem ! -- BKS, 11-11-2000
-
-:nextfile
-set file=%1
-shift
-if "%file%"=="" goto end
-del %file%
-goto nextfile
-:end
-
+@echo off
+rem ! This is a batch file to delete all the files on its
+rem ! command line, to work around command.com's del command's
+rem ! braindeadness
+rem !
+rem ! -- BKS, 11-11-2000
+
+:nextfile
+set file=%1
+shift
+if "%file%"=="" goto end
+del %file%
+goto nextfile
+:end
+
@echo off
rem ! This is a batch file to delete all the files on its
rem ! command line, to work around command.com's del command's
diff --git a/win32/config.gc b/win32/config.gc
index 171f153844..ecaeb4bb9e 100644
--- a/win32/config.gc
+++ b/win32/config.gc
@@ -323,7 +323,7 @@ d_statvfs='undef'
d_stdio_cnt_lval='define'
d_stdio_ptr_lval='define'
d_stdio_ptr_lval_sets_cnt='undef'
-d_stdio_ptr_lval_nochange_cnt='define'
+d_stdio_ptr_lval_nochange_cnt='define'
d_stdio_stream_array='undef'
d_stdiobase='define'
d_stdstdio='define'
diff --git a/win32/config.vc b/win32/config.vc
index 6ec27fdab4..bb579629e7 100644
--- a/win32/config.vc
+++ b/win32/config.vc
@@ -323,7 +323,7 @@ d_statvfs='undef'
d_stdio_cnt_lval='define'
d_stdio_ptr_lval='define'
d_stdio_ptr_lval_sets_cnt='undef'
-d_stdio_ptr_lval_nochange_cnt='define'
+d_stdio_ptr_lval_nochange_cnt='define'
d_stdio_stream_array='undef'
d_stdiobase='define'
d_stdstdio='define'
diff --git a/win32/win32.c b/win32/win32.c
index e4e553c36e..f28efa27cb 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -977,31 +977,31 @@ chown(const char *path, uid_t owner, gid_t group)
return 0;
}
-/*
- * XXX this needs strengthening (for PerlIO)
- * -- BKS, 11-11-200
-*/
-int mkstemp(const char *path)
-{
- dTHX;
- char buf[MAX_PATH+1];
- int i = 0, fd = -1;
-
-retry:
- if (i++ > 10) { /* give up */
- errno = ENOENT;
- return -1;
- }
- if (!GetTempFileNameA((LPCSTR)path, "plr", 1, buf)) {
- errno = ENOENT;
- return -1;
- }
- fd = PerlLIO_open3(buf, O_CREAT|O_RDWR|O_EXCL, 0600);
- if (fd == -1)
- goto retry;
- return fd;
-}
-
+/*
+ * XXX this needs strengthening (for PerlIO)
+ * -- BKS, 11-11-200
+*/
+int mkstemp(const char *path)
+{
+ dTHX;
+ char buf[MAX_PATH+1];
+ int i = 0, fd = -1;
+
+retry:
+ if (i++ > 10) { /* give up */
+ errno = ENOENT;
+ return -1;
+ }
+ if (!GetTempFileNameA((LPCSTR)path, "plr", 1, buf)) {
+ errno = ENOENT;
+ return -1;
+ }
+ fd = PerlLIO_open3(buf, O_CREAT|O_RDWR|O_EXCL, 0600);
+ if (fd == -1)
+ goto retry;
+ return fd;
+}
+
static long
find_pid(int pid)
{
@@ -2365,11 +2365,11 @@ win32_pipe(int *pfd, unsigned int size, int mode)
/*
* a popen() clone that respects PERL5SHELL
- *
- * changed to return PerlIO* rather than FILE * by BKS, 11-11-2000
+ *
+ * changed to return PerlIO* rather than FILE * by BKS, 11-11-2000
*/
-DllExport PerlIO*
+DllExport PerlIO*
win32_popen(const char *command, const char *mode)
{
#ifdef USE_RTL_POPEN
@@ -2443,11 +2443,11 @@ win32_popen(const char *command, const char *mode)
}
/* we have an fd, return a file stream */
-#ifdef USE_PERLIO
- return (PerlIO_fdopen(p[parent], (char *)mode));
-#else
- return (fdopen(p[parent], (char *)mode));
-#endif
+#ifdef USE_PERLIO
+ return (PerlIO_fdopen(p[parent], (char *)mode));
+#else
+ return (fdopen(p[parent], (char *)mode));
+#endif
cleanup:
/* we don't need to check for errors here */
@@ -2467,7 +2467,7 @@ cleanup:
*/
DllExport int
-win32_pclose(PerlIO *pf)
+win32_pclose(PerlIO *pf)
{
#ifdef USE_RTL_POPEN
return _pclose(pf);
@@ -2477,7 +2477,7 @@ win32_pclose(PerlIO *pf)
SV *sv;
LOCK_FDPID_MUTEX;
- sv = *av_fetch(w32_fdpid, PerlIO_fileno(pf), TRUE);
+ sv = *av_fetch(w32_fdpid, PerlIO_fileno(pf), TRUE);
if (SvIOK(sv))
childpid = SvIVX(sv);
@@ -2489,11 +2489,11 @@ win32_pclose(PerlIO *pf)
return -1;
}
-#ifdef USE_PERLIO
- PerlIO_close(pf);
-#else
- fclose(pf);
-#endif
+#ifdef USE_PERLIO
+ PerlIO_close(pf);
+#else
+ fclose(pf);
+#endif
SvIVX(sv) = 0;
UNLOCK_FDPID_MUTEX;
@@ -2755,13 +2755,13 @@ win32_open(const char *path, int flag, ...)
return open(PerlDir_mapA(path), flag, pmode);
}
-/* close() that understands socket */
-extern int my_close(int); /* in win32sck.c */
-
+/* close() that understands socket */
+extern int my_close(int); /* in win32sck.c */
+
DllExport int
win32_close(int fd)
{
- return my_close(fd);
+ return my_close(fd);
}
DllExport int
diff --git a/win32/win32.h b/win32/win32.h
index 808191a30c..5b6062cb47 100644
--- a/win32/win32.h
+++ b/win32/win32.h
@@ -302,7 +302,7 @@ extern int kill(int pid, int sig);
extern void *sbrk(int need);
extern char * getlogin(void);
extern int chown(const char *p, uid_t o, gid_t g);
-extern int mkstemp(const char *path);
+extern int mkstemp(const char *path);
#undef Stat
#define Stat win32_stat
diff --git a/win32/win32sck.c b/win32/win32sck.c
index 4a4131c1b1..041963a8c9 100644
--- a/win32/win32sck.c
+++ b/win32/win32sck.c
@@ -418,41 +418,41 @@ win32_socket(int af, int type, int protocol)
return s;
}
-/*
- * close RTL fd while respecting sockets
- * added as temporary measure until PerlIO has real
- * Win32 native layer
- * -- BKS, 11-11-2000
-*/
-
-int my_close(int fd)
-{
- int osf;
- if (!wsock_started) /* No WinSock? */
- return(close(fd)); /* Then not a socket. */
- osf = TO_SOCKET(fd);/* Get it now before it's gone! */
- if (osf != -1) {
- int err;
- err = closesocket(osf);
- if (err == 0) {
-#if defined(USE_FIXED_OSFHANDLE) || defined(PERL_MSVCRT_READFIX)
- _set_osfhnd(fd, INVALID_HANDLE_VALUE);
-#endif
- (void)close(fd); /* handle already closed, ignore error */
- return 0;
- }
- else if (err == SOCKET_ERROR) {
- err = WSAGetLastError();
- if (err != WSAENOTSOCK) {
- (void)close(fd);
- errno = err;
- return EOF;
- }
- }
- }
- return close(fd);
-}
-
+/*
+ * close RTL fd while respecting sockets
+ * added as temporary measure until PerlIO has real
+ * Win32 native layer
+ * -- BKS, 11-11-2000
+*/
+
+int my_close(int fd)
+{
+ int osf;
+ if (!wsock_started) /* No WinSock? */
+ return(close(fd)); /* Then not a socket. */
+ osf = TO_SOCKET(fd);/* Get it now before it's gone! */
+ if (osf != -1) {
+ int err;
+ err = closesocket(osf);
+ if (err == 0) {
+#if defined(USE_FIXED_OSFHANDLE) || defined(PERL_MSVCRT_READFIX)
+ _set_osfhnd(fd, INVALID_HANDLE_VALUE);
+#endif
+ (void)close(fd); /* handle already closed, ignore error */
+ return 0;
+ }
+ else if (err == SOCKET_ERROR) {
+ err = WSAGetLastError();
+ if (err != WSAENOTSOCK) {
+ (void)close(fd);
+ errno = err;
+ return EOF;
+ }
+ }
+ }
+ return close(fd);
+}
+
#undef fclose
int
my_fclose (FILE *pf)
@@ -460,14 +460,14 @@ my_fclose (FILE *pf)
int osf;
if (!wsock_started) /* No WinSock? */
return(fclose(pf)); /* Then not a socket. */
- osf = TO_SOCKET(win32_fileno(pf));/* Get it now before it's gone! */
+ osf = TO_SOCKET(win32_fileno(pf));/* Get it now before it's gone! */
if (osf != -1) {
int err;
win32_fflush(pf);
err = closesocket(osf);
if (err == 0) {
#if defined(USE_FIXED_OSFHANDLE) || defined(PERL_MSVCRT_READFIX)
- _set_osfhnd(win32_fileno(pf), INVALID_HANDLE_VALUE);
+ _set_osfhnd(win32_fileno(pf), INVALID_HANDLE_VALUE);
#endif
(void)fclose(pf); /* handle already closed, ignore error */
return 0;