diff options
author | Perl 5 Porters <perl5-porters@africa.nicoh.com> | 1997-04-03 10:03:25 +1200 |
---|---|---|
committer | Chip Salzenberg <chip@atlantic.net> | 1997-04-03 10:03:25 +1200 |
commit | 5aabfad66ac77650f584e2f07af91645e19fe296 (patch) | |
tree | ac96571984ba780e9ae7736cfe85dd17f6cfd865 /win32 | |
parent | 4a6725af9146bd7faaa10aa5429ff009d393fd6d (diff) | |
download | perl-5aabfad66ac77650f584e2f07af91645e19fe296.tar.gz |
[inseparable changes from match from perl-5.003_97 to perl-5.003_97a]
CORE PORTABILITY
Subject: Add support for Cygwin32 (GNU-Win32) -- very low impact
Date: Thu, 3 Apr 1997 09:21:17 +0100
From: John Cerney <j-cerney1@ti.com>
Files: MANIFEST README.cygwin32 cygwin32/cw32imp.h cygwin32/gcc2 cygwin32/ld2 cygwin32/perlgcc cygwin32/perlld ext/DynaLoader/dl_cygwin32.xs hints/cygwin32.sh perl.h pp_sys.c
Msg-ID: 199704030821.JAA08762@pluto.tiuk.ti.com
(applied based on p5p patch as commit 2a079e0090406b1b2e50643540f149206c9e9de8)
Subject: Win32 update (six patches)
From: Gurusamy Sarathy <gsar@engin.umich.edu>
Files: MANIFEST README.win32 dosish.h t/io/fs.t t/io/tell.t t/lib/io_tell.t t/op/magic.t t/op/mkdir.t t/op/runlevel.t t/op/stat.t t/op/taint.t win32/Makefile win32/VC-2.0/pod.mak win32/makedef.pl win32/pod.mak win32/win32.c win32/win32.h win32/win32io.c win32/win32io.h win32/win32iop.h
LIBRARY AND EXTENSIONS
Subject: Math::Trig, based on (and from an author of) Math::Complex
From: Chip Salzenberg <chip@perl.com>
Files: MANIFEST lib/Math/Complex.pm lib/Math/Trig.pm pod/perldelta.pod t/lib/complex.t t/lib/trig.t
OTHER CORE CHANGES
Subject: Fix const-sub-related panic on C<sub foo { my $x; 0 } foo>
From: Chip Salzenberg <chip@perl.com>
Files: op.c
Subject: Fix warning for useless C<1..2>
From: Chip Salzenberg <chip@perl.com>
Files: op.c
Subject: Minor cleanups
Date: Thu, 03 Apr 1997 19:56:57 -0500
From: Gurusamy Sarathy <gsar@engin.umich.edu>
Files: mg.c mg.h perl.c
Msg-ID: 199704040056.TAA22253@aatma.engin.umich.edu
(applied based on p5p patch as commit 609794497049cf42bdd2396c04cbb7728e10374d)
Subject: Eliminate unreliable warning with %SIG and strict refs
From: Chip Salzenberg <chip@perl.com>
Files: mg.c
Subject: Fix impossible test in vivification
From: Chip Salzenberg <chip@perl.com>
Files: mg.c
Diffstat (limited to 'win32')
-rw-r--r-- | win32/Makefile | 10 | ||||
-rw-r--r-- | win32/VC-2.0/pod.mak | 272 | ||||
-rw-r--r-- | win32/makedef.pl | 3 | ||||
-rw-r--r-- | win32/pod.mak | 272 | ||||
-rw-r--r-- | win32/win32.c | 39 | ||||
-rw-r--r-- | win32/win32.h | 9 | ||||
-rw-r--r-- | win32/win32io.c | 5 | ||||
-rw-r--r-- | win32/win32io.h | 3 | ||||
-rw-r--r-- | win32/win32iop.h | 6 |
9 files changed, 592 insertions, 27 deletions
diff --git a/win32/Makefile b/win32/Makefile index 1136d15097..3da20e77aa 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -220,16 +220,8 @@ $(OPCODE_DLL): $(OPCODE).c $(PERLDLL) $(MAKE) -f $(*B).mak CFG="$(*B) - Win32 $(CFG)" doc: $(PERLEXE) - $(PERLEXE) $(POD2HTML).PL - $(PERLEXE) $(POD2MAN).PL - $(PERLEXE) $(POD2LATEX).PL - $(PERLEXE) $(POD2TEXT).PL - $(PERLEXE) $(PL2BAT) $(POD2HTML) - $(PERLEXE) $(PL2BAT) $(POD2MAN) - $(PERLEXE) $(PL2BAT) $(POD2LATEX) - $(PERLEXE) $(PL2BAT) $(POD2TEXT) cd $(PODDIR) - $(PERLEXE) pod2html.bat *.pod + nmake -f ../win32/pod.mak cd ..\win32 utils: $(PERLEXE) diff --git a/win32/VC-2.0/pod.mak b/win32/VC-2.0/pod.mak new file mode 100644 index 0000000000..538cfa3737 --- /dev/null +++ b/win32/VC-2.0/pod.mak @@ -0,0 +1,272 @@ +CONVERTERS = pod2html pod2latex pod2man pod2text checkpods + +HTMLROOT = / # Change this to fix cross-references in HTML +POD2HTML = pod2html \ + --htmlroot=$(HTMLROOT) \ + --podroot=.. --podpath=pod:lib:ext:vms \ + --libpods=perlfunc:perlguts:perlvar:perlrun:perlop + +all: $(CONVERTERS) html + +PERL = ..\miniperl.exe +PL2BAT = ..\win32\bin\pl2bat.bat + +POD = \ + perl.pod \ + perldelta.pod \ + perldata.pod \ + perlsyn.pod \ + perlop.pod \ + perlre.pod \ + perlrun.pod \ + perlfunc.pod \ + perlvar.pod \ + perlsub.pod \ + perlmod.pod \ + perlform.pod \ + perllocale.pod \ + perlref.pod \ + perldsc.pod \ + perllol.pod \ + perltoot.pod \ + perlobj.pod \ + perltie.pod \ + perlbot.pod \ + perlipc.pod \ + perldebug.pod \ + perldiag.pod \ + perlsec.pod \ + perltrap.pod \ + perlstyle.pod \ + perlpod.pod \ + perlbook.pod \ + perlembed.pod \ + perlapio.pod \ + perlxs.pod \ + perlxstut.pod \ + perlguts.pod \ + perlcall.pod \ + perlfaq.pod \ + perlfaq1.pod \ + perlfaq2.pod \ + perlfaq3.pod \ + perlfaq4.pod \ + perlfaq5.pod \ + perlfaq6.pod \ + perlfaq7.pod \ + perlfaq8.pod \ + perlfaq9.pod \ + perltoc.pod + +MAN = \ + perl.man \ + perldelta.man \ + perldata.man \ + perlsyn.man \ + perlop.man \ + perlre.man \ + perlrun.man \ + perlfunc.man \ + perlvar.man \ + perlsub.man \ + perlmod.man \ + perlform.man \ + perllocale.man \ + perlref.man \ + perldsc.man \ + perllol.man \ + perltoot.man \ + perlobj.man \ + perltie.man \ + perlbot.man \ + perlipc.man \ + perldebug.man \ + perldiag.man \ + perlsec.man \ + perltrap.man \ + perlstyle.man \ + perlpod.man \ + perlbook.man \ + perlembed.man \ + perlapio.man \ + perlxs.man \ + perlxstut.man \ + perlguts.man \ + perlcall.man \ + perlfaq.man \ + perlfaq1.man \ + perlfaq2.man \ + perlfaq3.man \ + perlfaq4.man \ + perlfaq5.man \ + perlfaq6.man \ + perlfaq7.man \ + perlfaq8.man \ + perlfaq9.man \ + perltoc.man + +HTML = \ + perl.html \ + perldelta.html \ + perldata.html \ + perlsyn.html \ + perlop.html \ + perlre.html \ + perlrun.html \ + perlfunc.html \ + perlvar.html \ + perlsub.html \ + perlmod.html \ + perlform.html \ + perllocale.html \ + perlref.html \ + perldsc.html \ + perllol.html \ + perltoot.html \ + perlobj.html \ + perltie.html \ + perlbot.html \ + perlipc.html \ + perldebug.html \ + perldiag.html \ + perlsec.html \ + perltrap.html \ + perlstyle.html \ + perlpod.html \ + perlbook.html \ + perlembed.html \ + perlapio.html \ + perlxs.html \ + perlxstut.html \ + perlguts.html \ + perlcall.html \ + perlfaq.html \ + perlfaq1.html \ + perlfaq2.html \ + perlfaq3.html \ + perlfaq4.html \ + perlfaq5.html \ + perlfaq6.html \ + perlfaq7.html \ + perlfaq8.html \ + perlfaq9.html +# not perltoc.html + +TEX = \ + perl.tex \ + perldelta.tex \ + perldata.tex \ + perlsyn.tex \ + perlop.tex \ + perlre.tex \ + perlrun.tex \ + perlfunc.tex \ + perlvar.tex \ + perlsub.tex \ + perlmod.tex \ + perlform.tex \ + perllocale.tex \ + perlref.tex \ + perldsc.tex \ + perllol.tex \ + perltoot.tex \ + perlobj.tex \ + perltie.tex \ + perlbot.tex \ + perlipc.tex \ + perldebug.tex \ + perldiag.tex \ + perlsec.tex \ + perltrap.tex \ + perlstyle.tex \ + perlpod.tex \ + perlbook.tex \ + perlembed.tex \ + perlapio.tex \ + perlxs.tex \ + perlxstut.tex \ + perlguts.tex \ + perlcall.tex \ + perlfaq.tex \ + perlfaq1.tex \ + perlfaq2.tex \ + perlfaq3.tex \ + perlfaq4.tex \ + perlfaq5.tex \ + perlfaq6.tex \ + perlfaq7.tex \ + perlfaq8.tex \ + perlfaq9.tex \ + perltoc.tex + +man: pod2man $(MAN) + +html: pod2html $(HTML) + +tex: pod2latex $(TEX) + +toc: + $(PERL) -I..\lib buildtoc >perltoc.pod + +.SUFFIXES: .pm .pod + +.SUFFIXES: .man + +.pm.man: + $(PERL) -I..\lib pod2man $*.pm >$*.man + +.pod.man: + $(PERL) -I..\lib pod2man $*.pod >$*.man + +.SUFFIXES: .html + +.pm.html: + $(PERL) -I..\lib $(POD2HTML) --infile=$*.pm --outfile=$*.html + +.pod.html: + $(PERL) -I..\lib $(POD2HTML) --infile=$*.pod --outfile=$*.html + +.SUFFIXES: .tex + +.pm.tex: + $(PERL) -I..\lib pod2latex $*.pm + +.pod.tex: + $(PERL) -I..\lib pod2latex $*.pod + +clean: + del /f $(MAN) $(HTML) $(TEX) + del /f pod2html-*cache + del /f *.aux *.log + +realclean: clean + del /f $(CONVERTERS) + +distclean: realclean + +check: checkpods + @echo "checking..."; \ + $(PERL) -I..\lib checkpods $(POD) + +# Dependencies. +pod2latex: pod2latex.PL ..\lib\Config.pm + $(PERL) -I..\lib pod2latex.PL + $(PERL) $(PL2BAT) pod2latex + +pod2html: pod2html.PL ..\lib\Config.pm + $(PERL) -I..\lib pod2html.PL + $(PERL) $(PL2BAT) pod2html + +pod2man: pod2man.PL ..\lib\Config.pm + $(PERL) -I..\lib pod2man.PL + $(PERL) $(PL2BAT) pod2man + +pod2text: pod2text.PL ..\lib\Config.pm + $(PERL) -I..\lib pod2text.PL + $(PERL) $(PL2BAT) pod2text + +checkpods: checkpods.PL ..\lib\Config.pm + $(PERL) -I..\lib checkpods.PL + $(PERL) $(PL2BAT) checkpods + + diff --git a/win32/makedef.pl b/win32/makedef.pl index 7a1ddb20be..0d510aedcd 100644 --- a/win32/makedef.pl +++ b/win32/makedef.pl @@ -252,6 +252,9 @@ win32_read win32_write win32_spawnvpe win32_spawnle +win32_mkdir +win32_rmdir +win32_chdir win32_htons win32_ntohs win32_htonl diff --git a/win32/pod.mak b/win32/pod.mak new file mode 100644 index 0000000000..538cfa3737 --- /dev/null +++ b/win32/pod.mak @@ -0,0 +1,272 @@ +CONVERTERS = pod2html pod2latex pod2man pod2text checkpods + +HTMLROOT = / # Change this to fix cross-references in HTML +POD2HTML = pod2html \ + --htmlroot=$(HTMLROOT) \ + --podroot=.. --podpath=pod:lib:ext:vms \ + --libpods=perlfunc:perlguts:perlvar:perlrun:perlop + +all: $(CONVERTERS) html + +PERL = ..\miniperl.exe +PL2BAT = ..\win32\bin\pl2bat.bat + +POD = \ + perl.pod \ + perldelta.pod \ + perldata.pod \ + perlsyn.pod \ + perlop.pod \ + perlre.pod \ + perlrun.pod \ + perlfunc.pod \ + perlvar.pod \ + perlsub.pod \ + perlmod.pod \ + perlform.pod \ + perllocale.pod \ + perlref.pod \ + perldsc.pod \ + perllol.pod \ + perltoot.pod \ + perlobj.pod \ + perltie.pod \ + perlbot.pod \ + perlipc.pod \ + perldebug.pod \ + perldiag.pod \ + perlsec.pod \ + perltrap.pod \ + perlstyle.pod \ + perlpod.pod \ + perlbook.pod \ + perlembed.pod \ + perlapio.pod \ + perlxs.pod \ + perlxstut.pod \ + perlguts.pod \ + perlcall.pod \ + perlfaq.pod \ + perlfaq1.pod \ + perlfaq2.pod \ + perlfaq3.pod \ + perlfaq4.pod \ + perlfaq5.pod \ + perlfaq6.pod \ + perlfaq7.pod \ + perlfaq8.pod \ + perlfaq9.pod \ + perltoc.pod + +MAN = \ + perl.man \ + perldelta.man \ + perldata.man \ + perlsyn.man \ + perlop.man \ + perlre.man \ + perlrun.man \ + perlfunc.man \ + perlvar.man \ + perlsub.man \ + perlmod.man \ + perlform.man \ + perllocale.man \ + perlref.man \ + perldsc.man \ + perllol.man \ + perltoot.man \ + perlobj.man \ + perltie.man \ + perlbot.man \ + perlipc.man \ + perldebug.man \ + perldiag.man \ + perlsec.man \ + perltrap.man \ + perlstyle.man \ + perlpod.man \ + perlbook.man \ + perlembed.man \ + perlapio.man \ + perlxs.man \ + perlxstut.man \ + perlguts.man \ + perlcall.man \ + perlfaq.man \ + perlfaq1.man \ + perlfaq2.man \ + perlfaq3.man \ + perlfaq4.man \ + perlfaq5.man \ + perlfaq6.man \ + perlfaq7.man \ + perlfaq8.man \ + perlfaq9.man \ + perltoc.man + +HTML = \ + perl.html \ + perldelta.html \ + perldata.html \ + perlsyn.html \ + perlop.html \ + perlre.html \ + perlrun.html \ + perlfunc.html \ + perlvar.html \ + perlsub.html \ + perlmod.html \ + perlform.html \ + perllocale.html \ + perlref.html \ + perldsc.html \ + perllol.html \ + perltoot.html \ + perlobj.html \ + perltie.html \ + perlbot.html \ + perlipc.html \ + perldebug.html \ + perldiag.html \ + perlsec.html \ + perltrap.html \ + perlstyle.html \ + perlpod.html \ + perlbook.html \ + perlembed.html \ + perlapio.html \ + perlxs.html \ + perlxstut.html \ + perlguts.html \ + perlcall.html \ + perlfaq.html \ + perlfaq1.html \ + perlfaq2.html \ + perlfaq3.html \ + perlfaq4.html \ + perlfaq5.html \ + perlfaq6.html \ + perlfaq7.html \ + perlfaq8.html \ + perlfaq9.html +# not perltoc.html + +TEX = \ + perl.tex \ + perldelta.tex \ + perldata.tex \ + perlsyn.tex \ + perlop.tex \ + perlre.tex \ + perlrun.tex \ + perlfunc.tex \ + perlvar.tex \ + perlsub.tex \ + perlmod.tex \ + perlform.tex \ + perllocale.tex \ + perlref.tex \ + perldsc.tex \ + perllol.tex \ + perltoot.tex \ + perlobj.tex \ + perltie.tex \ + perlbot.tex \ + perlipc.tex \ + perldebug.tex \ + perldiag.tex \ + perlsec.tex \ + perltrap.tex \ + perlstyle.tex \ + perlpod.tex \ + perlbook.tex \ + perlembed.tex \ + perlapio.tex \ + perlxs.tex \ + perlxstut.tex \ + perlguts.tex \ + perlcall.tex \ + perlfaq.tex \ + perlfaq1.tex \ + perlfaq2.tex \ + perlfaq3.tex \ + perlfaq4.tex \ + perlfaq5.tex \ + perlfaq6.tex \ + perlfaq7.tex \ + perlfaq8.tex \ + perlfaq9.tex \ + perltoc.tex + +man: pod2man $(MAN) + +html: pod2html $(HTML) + +tex: pod2latex $(TEX) + +toc: + $(PERL) -I..\lib buildtoc >perltoc.pod + +.SUFFIXES: .pm .pod + +.SUFFIXES: .man + +.pm.man: + $(PERL) -I..\lib pod2man $*.pm >$*.man + +.pod.man: + $(PERL) -I..\lib pod2man $*.pod >$*.man + +.SUFFIXES: .html + +.pm.html: + $(PERL) -I..\lib $(POD2HTML) --infile=$*.pm --outfile=$*.html + +.pod.html: + $(PERL) -I..\lib $(POD2HTML) --infile=$*.pod --outfile=$*.html + +.SUFFIXES: .tex + +.pm.tex: + $(PERL) -I..\lib pod2latex $*.pm + +.pod.tex: + $(PERL) -I..\lib pod2latex $*.pod + +clean: + del /f $(MAN) $(HTML) $(TEX) + del /f pod2html-*cache + del /f *.aux *.log + +realclean: clean + del /f $(CONVERTERS) + +distclean: realclean + +check: checkpods + @echo "checking..."; \ + $(PERL) -I..\lib checkpods $(POD) + +# Dependencies. +pod2latex: pod2latex.PL ..\lib\Config.pm + $(PERL) -I..\lib pod2latex.PL + $(PERL) $(PL2BAT) pod2latex + +pod2html: pod2html.PL ..\lib\Config.pm + $(PERL) -I..\lib pod2html.PL + $(PERL) $(PL2BAT) pod2html + +pod2man: pod2man.PL ..\lib\Config.pm + $(PERL) -I..\lib pod2man.PL + $(PERL) $(PL2BAT) pod2man + +pod2text: pod2text.PL ..\lib\Config.pm + $(PERL) -I..\lib pod2text.PL + $(PERL) $(PL2BAT) pod2text + +checkpods: checkpods.PL ..\lib\Config.pm + $(PERL) -I..\lib checkpods.PL + $(PERL) $(PL2BAT) checkpods + + diff --git a/win32/win32.c b/win32/win32.c index 5efca7c711..7bb003d169 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -345,7 +345,7 @@ do_aspawn(void* really, void** mark, void** arglast) SV *sv = (SV*)really; SV** pSv = (SV**)mark; - New(1110, argv, (arglast - mark) + 3, char*); + New(1110, argv, (arglast - mark) + 4, char*); if(sv != Nullsv) { cmd = SvPV(sv, length); @@ -356,8 +356,8 @@ do_aspawn(void* really, void** mark, void** arglast) argv[index++] = "/c"; } - while(pSv <= (SV**)arglast) { - sv = *pSv++; + while(++pSv <= (SV**)arglast) { + sv = *pSv; strPtr = SvPV(sv, length); if(strPtr != NULL && *strPtr != '\0') argv[index++] = strPtr; @@ -369,8 +369,12 @@ do_aspawn(void* really, void** mark, void** arglast) Safefree(argv); - /* set statusvalue the perl variable $? */ - return (statusvalue = status*256); + if (status < 0) { + if (dowarn) + warn("Can't spawn \"%s\": %s", cmd, strerror(errno)); + status = 255 << 8; + } + return (status); } int @@ -421,9 +425,13 @@ do_spawn(char *cmd) "/x", "/c", cmd, (char*)0, environ); } - - /* set statusvalue the perl variable $? */ - return (statusvalue = status*256); + if (status < 0) { + if (dowarn) + warn("Can't spawn \"%s\": %s", needToTry ? shell : argv[0], + strerror(errno)); + status = 255 << 8; + } + return (status); } @@ -1034,6 +1042,21 @@ win32_write(int fd, const char *buf, unsigned int cnt) } DllExport int +win32_mkdir(const char *dir, int mode) +{ + return pIOSubSystem->pfnmkdir(dir); /* just ignore mode */ +} +DllExport int +win32_rmdir(const char *dir) +{ + return pIOSubSystem->pfnrmdir(dir); +} +DllExport int +win32_chdir(const char *dir) +{ + return pIOSubSystem->pfnchdir(dir); +} +DllExport int win32_spawnvpe(int mode, const char *cmdname, const char *const *argv, const char *const *envp) { diff --git a/win32/win32.h b/win32/win32.h index 7d252f78e5..31dfde05f2 100644 --- a/win32/win32.h +++ b/win32/win32.h @@ -52,15 +52,6 @@ extern FILE *myfdopen(int, char *); #define OP_BINARY _O_BINARY /* Mistake in in pp_sys.c. */ -#undef mkdir -#define mkdir(nm, md) _mkdir(nm) /* For UNIX compatibility. */ - -#undef chdir -#define chdir(nm) _chdir(nm) - -#undef rmdir -#define rmdir(nm) _rmdir(nm) - #undef pipe #define pipe(fd) win32_pipe((fd), 512, _O_BINARY) /* the pipe call is a bit different */ diff --git a/win32/win32io.c b/win32/win32io.c index 333b64a7ec..b4f58242cf 100644 --- a/win32/win32io.c +++ b/win32/win32io.c @@ -16,7 +16,7 @@ extern "C" { #include <assert.h> #include <errno.h> #include <process.h> - +#include <direct.h> #include "win32iop.h" /* @@ -231,6 +231,9 @@ WIN32_IOSUBSYSTEM win32stdio = { my_open_osfhandle, my_get_osfhandle, spawnvpe, + _mkdir, + _rmdir, + _chdir, 87654321L, /* end of structure */ }; diff --git a/win32/win32io.h b/win32/win32io.h index 3ebc70aab5..f73eea1322 100644 --- a/win32/win32io.h +++ b/win32/win32io.h @@ -51,6 +51,9 @@ int (*pfnopenmode)(int mode); int (*pfn_open_osfhandle)(long handle, int flags); long (*pfn_get_osfhandle)(int fd); int (*pfnspawnvpe)(int mode, const char *cmdname, const char *const *argv, const char *const *envp); +int (*pfnmkdir)(const char *path); +int (*pfnrmdir)(const char *path); +int (*pfnchdir)(const char *path); int signature_end; } WIN32_IOSUBSYSTEM; diff --git a/win32/win32iop.h b/win32/win32iop.h index c0d1d57255..d699e03ab6 100644 --- a/win32/win32iop.h +++ b/win32/win32iop.h @@ -58,6 +58,9 @@ EXT int win32_write(int fd, const void *buf, unsigned int cnt); EXT int win32_spawnvpe(int mode, const char *cmdname, const char *const *argv, const char *const *envp); EXT int win32_spawnle(int mode, const char *cmdname, const char *,...); +EXT int win32_mkdir(const char *dir, int mode); +EXT int win32_rmdir(const char *dir); +EXT int win32_chdir(const char *dir); /* * these two are win32 specific but still io related @@ -129,6 +132,9 @@ void * SetIOSubSystem(void *piosubsystem); #define _get_osfhandle stolen_get_osfhandle #define spawnvpe win32_spawnvpe #define spawnle win32_spawnle +#define mkdir win32_mkdir +#define rmdir win32_rmdir +#define chdir win32_chdir #endif /* WIN32IO_IS_STDIO */ #endif /* WIN32IOP_H */ |