From: Perl 5 Porters Date: Tue, 26 Dec 1995 06:55:30 +0000 (+0000) Subject: New file. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=82835e01f42cf6e6ec087b39a902865e24e1b401;p=p5sagit%2Fp5-mst-13.2.git New file. --- diff --git a/os2/Makefile.SHs b/os2/Makefile.SHs new file mode 100644 index 0000000..35a9f17 --- /dev/null +++ b/os2/Makefile.SHs @@ -0,0 +1,69 @@ +# This file is read by Makefile.SH to produce rules for $(perllib) +# We insert perl5.def since I do not know how to generate it yet. + +$spitshell >>Makefile <<'!NO!SUBS!' +$(perllib): perl.imp perl.dll perl5.def + emximp -o $(perllib) perl.imp + +perl.imp: perl5.def + emximp -o perl.imp perl5.def + +perl.dll: $(obj) perl5.def perl$(OBJ_EXT) + $(LD) $(LDDLFLAGS) -o $@ perl$(OBJ_EXT) $(obj) -lsocket perl5.def + +perl5.def: perl.linkexp + echo "LIBRARY 'Perl' INITINSTANCE TERMINSTANCE" > $@ + echo DESCRIPTION "'Perl interpreter, export autogenerated'" >>$@ + echo STACKSIZE 32768 >>$@ + echo CODE LOADONCALL >>$@ + echo DATA LOADONCALL NONSHARED MULTIPLE >>$@ + echo EXPORTS >>$@ + echo ' "ctermid"' >>$@ +!NO!SUBS! + +if [ ! -z "$myttyname" ] ; then + $spitshell >>Makefile <<'!NO!SUBS!' + echo ' "ttyname"' >>$@ +!NO!SUBS! +fi + +$spitshell >>Makefile <<'!NO!SUBS!' + cat perl.linkexp >>$@ + +# grep -v '"\(malloc\|realloc\|free\)"' perl.linkexp >>$@ + + +# We assume here that perl is available somewhere ... + +perl.exports: perl.exp EXTERN.h perl.h + (echo '#include "EXTERN.h"'; echo '#include "perl.h"' ; \ + echo '#include "perl.exp"') | \ + $(CC) -DEMBED -E - | \ + awk '{if ($$2 == "") print $$1}' | sort | uniq > $@ + +# perl -ne 'print if (/^#!/ .. /^#\s/) && s/^(\w+) *$$/$$1/' > $@ + +perl.linkexp: perl.exports perl.map + cat perl.exports perl.map | sort | uniq -d | sed -e 's/\w\+/ "\0"/' > perl.linkexp + +perl.map: $(obj) perl$(OBJ_EXT) miniperlmain$(OBJ_EXT) + $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o dummy.exe miniperlmain$(OBJ_EXT) perl$(OBJ_EXT) $(obj) -lsocket -lm -Zmap -Zlinker /map + awk '{if ($$3 == "") print $$2}' perl.map + rm dummy.exe dummy.map + +depend: os2ish.h + +# Stupid make? Needed... +os2$(OBJ_EXT) : os2.c + +os2.c: os2/os2.c os2ish.h + cp $< $@ + +os2ish.h: os2/os2ish.h + cp $< $@ + +installcmd : + perl -e 'die qq{Give the option INSTALLCMDDIR=... to make!} if $$ARGV[0] eq ""' $(INSTALLCMDDIR) + perl os2/perl2cmd.pl $(INSTALLCMDDIR) + +!NO!SUBS! diff --git a/os2/diff.MANIFEST b/os2/diff.MANIFEST new file mode 100644 index 0000000..d31936d --- /dev/null +++ b/os2/diff.MANIFEST @@ -0,0 +1,45 @@ +*** MANIFEST.old Mon Nov 20 09:40:40 1995 +--- MANIFEST Tue Dec 26 19:53:02 1995 +*************** +*** 339,354 **** + op.h Opcode syntax tree header + opcode.h Automatically generated opcode header + opcode.pl Opcode header generatore +! os2/Makefile.SH Shared library generation for OS/2 + os2/POSIX.mkfifo POSIX.xs patch. + os2/README OS/2 info. + os2/diff.Makefile Patches to Makefile.SH +! os2/diff.configure Patches to Makefile.SH + os2/diff.installperl Patches to installperl + os2/diff.mkdep Patches to makedepend.SH + os2/diff.x2pMakefile Patches to x2p/Makefile.SH +! os2/os2.c Missing code for OS/2 + os2/os2ish.h Header for OS/2 + patchlevel.h The current patch level of perl + perl.c main() + perl.h Global declarations +--- 341,364 ---- + op.h Opcode syntax tree header + opcode.h Automatically generated opcode header + opcode.pl Opcode header generatore +! os2/Makefile.SHs Shared library generation for OS/2 + os2/POSIX.mkfifo POSIX.xs patch. + os2/README OS/2 info. ++ os2/diff.MANIFEST MANIFEST patch + os2/diff.Makefile Patches to Makefile.SH +! os2/diff.c2ph c2ph patch +! os2/diff.configure Patches to Configure +! os2/diff.db_file patch to DB_File +! os2/diff.init Suggested patch to move initialization code to headers. +! os2/diff.installman Patches to installman + os2/diff.installperl Patches to installperl + os2/diff.mkdep Patches to makedepend.SH ++ os2/diff.rest old patch to t/TEST which was not applied yet + os2/diff.x2pMakefile Patches to x2p/Makefile.SH +! os2/notes Notes for perl maintainer +! os2/os2.c Additional code for OS/2 + os2/os2ish.h Header for OS/2 ++ os2/perl2cmd.pl Corrects installed binaries under OS/2 + patchlevel.h The current patch level of perl + perl.c main() + perl.h Global declarations diff --git a/os2/diff.c2ph b/os2/diff.c2ph new file mode 100644 index 0000000..4d2c320 --- /dev/null +++ b/os2/diff.c2ph @@ -0,0 +1,19 @@ +*** c2ph.PL~ Mon Nov 20 09:36:16 1995 +--- c2ph.PL Thu Dec 07 15:24:10 1995 +*************** +*** 1180,1184 **** + close OUT or die "Can't close $file: $!"; + chmod 0755, $file or die "Can't reset permissions for $file: $!\n"; + unlink 'pstruct'; +! link c2ph, pstruct; + exec("$Config{'eunicefix'} $file") if $Config{'eunicefix'} ne ':'; +--- 1180,1188 ---- + close OUT or die "Can't close $file: $!"; + chmod 0755, $file or die "Can't reset permissions for $file: $!\n"; + unlink 'pstruct'; +! if (defined $Config{d_link}) { +! link 'c2ph', 'pstruct'; +! } else { +! system $Config{cp}, 'c2ph', 'pstruct'; +! } + exec("$Config{'eunicefix'} $file") if $Config{'eunicefix'} ne ':'; diff --git a/os2/diff.db_file b/os2/diff.db_file new file mode 100644 index 0000000..7fcca0a --- /dev/null +++ b/os2/diff.db_file @@ -0,0 +1,15 @@ +*** ext/DB_File/db_file.xs~ Tue Nov 14 11:14:36 1995 +--- ext/DB_File/DB_File.xs Tue Dec 19 00:50:52 1995 +*************** +*** 424,429 **** +--- 424,433 ---- + } + + ++ #ifdef __EMX__ ++ flags |= O_BINARY; ++ #endif /* __EMX__ */ ++ + RETVAL->dbp = dbopen(name, flags, mode, RETVAL->type, openinfo) ; + + #if 0 diff --git a/os2/diff.init b/os2/diff.init new file mode 100644 index 0000000..2b8c511 --- /dev/null +++ b/os2/diff.init @@ -0,0 +1,56 @@ +*** miniperlmain.c~ Sat Nov 18 12:48:10 1995 +--- miniperlmain.c Sun Nov 26 12:44:30 1995 +*************** +*** 31,43 **** + { + int exitstatus; + +! #ifdef OS2 +! _response(&argc, &argv); +! _wildcard(&argc, &argv); +! #endif +! +! #ifdef VMS +! getredirection(&argc,&argv); + #endif + + #if defined(HAS_SETLOCALE) && defined(LC_CTYPE) +--- 31,38 ---- + { + int exitstatus; + +! #ifdef PERL_SYS_INIT +! PERL_SYS_INIT(&argc, &argv); + #endif + + #if defined(HAS_SETLOCALE) && defined(LC_CTYPE) +*** os2/os2ish.h~ Tue Nov 14 08:07:32 1995 +--- os2/os2ish.h Sun Nov 26 13:04:54 1995 +*************** +*** 23,28 **** +--- 23,33 ---- + #endif + #define ABORT() kill(getpid(),SIGABRT); + ++ #define PERL_SYS_INIT(argcp, argvp) do { \ ++ _response(argcp, argvp); \ ++ _wildcard(argcp, argvp); } while (0) ++ ++ + /* + * fwrite1() should be a routine with the same calling sequence as fwrite(), + * but which outputs all of the bytes requested as a single stream (unlike +*** vms/vmsish.h~ Wed Nov 15 19:07:24 1995 +--- vms/vmsish.h Sun Nov 26 12:46:34 1995 +*************** +*** 86,91 **** +--- 86,94 ---- + */ + #define fork vfork + ++ #define PERL_SYS_INIT(argcp, argvp) \ ++ getredirection(argcp, argvp) ++ + /* + * fwrite1() should be a routine with the same calling sequence as fwrite(), + * but which outputs all of the bytes requested as a single stream (unlike diff --git a/os2/diff.installman b/os2/diff.installman new file mode 100644 index 0000000..036cf90 --- /dev/null +++ b/os2/diff.installman @@ -0,0 +1,76 @@ +*** installman.orig Thu Jun 22 10:42:40 1995 +--- installman Thu Nov 02 04:07:38 1995 +*************** +*** 6,11 **** +--- 6,12 ---- + require Cwd; + + umask 022; ++ $ENV{SHELL} = 'sh' if $Config{osname} eq 'os2'; + + $ver = $]; + $release = substr($ver,0,3); # Not used presently. +*************** +*** 38,48 **** + + #Sanity checks + +! -x "./perl" || warn "./perl not found! Have you run make?\n"; + -d $Config{'installprivlib'} + || warn "Perl library directory $Config{'installprivlib'} not found. + Have you run make install?. (Installing anyway.)\n"; +! -x 't/TEST' || warn "WARNING: You've never run 'make test'!!!", + " (Installing anyway.)\n"; + + # Install the main pod pages. +--- 39,50 ---- + + #Sanity checks + +! -x "./perl$Config{exe_ext}" +! or warn "./perl$Config{exe_ext} not found! Have you run make?\n"; + -d $Config{'installprivlib'} + || warn "Perl library directory $Config{'installprivlib'} not found. + Have you run make install?. (Installing anyway.)\n"; +! -x "t/perl$Config{exe_ext}" || warn "WARNING: You've never run 'make test'!!!", + " (Installing anyway.)\n"; + + # Install the main pod pages. +*************** +*** 66,72 **** + # are enhancements or changes from previous installed versions. + # The error message doesn't include the '..' because the user + # won't be aware that we've chdir to $poddir. +! -x "../pod/pod2man" || die "Executable pod/pod2man not found.\n"; + + # We want to be sure to use the current perl. We can't rely on + # the installed perl because it might not be actually installed +--- 68,74 ---- + # are enhancements or changes from previous installed versions. + # The error message doesn't include the '..' because the user + # won't be aware that we've chdir to $poddir. +! -r "../pod/pod2man" || die "Executable pod/pod2man not found.\n"; + + # We want to be sure to use the current perl. We can't rely on + # the installed perl because it might not be actually installed +*************** +*** 86,92 **** + # Convert name from File/Basename.pm to File::Basename.3 format, + # if necessary. + $manpage =~ s#\.p(m|od)$##; +! $manpage =~ s#/#::#g; + $manpage = "${mandir}/${manpage}.${manext}"; + # Print $release $patchlevel stuff? or should pod2man do that? + &cmd("$pod2man $mod > $manpage"); +--- 88,98 ---- + # Convert name from File/Basename.pm to File::Basename.3 format, + # if necessary. + $manpage =~ s#\.p(m|od)$##; +! if ($Config{osname} eq "os2") { +! $manpage =~ s#/#.#g; +! } else { +! $manpage =~ s#/#::#g; +! } + $manpage = "${mandir}/${manpage}.${manext}"; + # Print $release $patchlevel stuff? or should pod2man do that? + &cmd("$pod2man $mod > $manpage"); diff --git a/os2/diff.rest b/os2/diff.rest new file mode 100644 index 0000000..7c44334 --- /dev/null +++ b/os2/diff.rest @@ -0,0 +1,12 @@ +*** t/TEST~ Tue Nov 14 08:22:08 1995 +--- t/TEST Wed Nov 22 02:04:22 1995 +*************** +*** 31,36 **** +--- 31,37 ---- + last; + } + } ++ $sharpbang = 0 if $ENV{OS2_SHELL}; # OS/2 + $bad = 0; + $good = 0; + $total = @ARGV; diff --git a/os2/notes b/os2/notes new file mode 100644 index 0000000..f859187 --- /dev/null +++ b/os2/notes @@ -0,0 +1,28 @@ +mv Makefile.SH Makefile.SHs +exit 0 + +Everything is updated to perl5.002b1d. + +I added a generally useful ;-) code to Makefile.SH to have dependencies +on makedepend, installman and installperl (makedepend is the tricky one!). + +I did update MANIFEST with _all_ the added diff.* files, I hope +some files will be just applied, thus not needed for MANIFEST. Well, the +patch for MANIFEST is in os2/diff.MANIFEST ;-). + +diff.init is just a suggestion to move system-specific code into headers. + +I think that + +diff.Makefile +diff.installperl +diff.installman +diff.x2pMakefile +diff.mkdep + +are ready for prime time, though big ;-(. +It is up to you what to do with them (They use long names like EXE_EXT now). + +diff.c2ph, diff.rest are small and should not break anything. + +diff.db_file adds binary mode. diff --git a/os2/perl2cmd.pl b/os2/perl2cmd.pl new file mode 100644 index 0000000..2155549 --- /dev/null +++ b/os2/perl2cmd.pl @@ -0,0 +1,28 @@ +# This will put installed perl files into some other location +# Note that we cannot put hashbang to be extproc to make Configure work. + +use Config; + +$dir = shift; +$dir =~ s|/|\\|g ; +$nowarn = 1, $dir = shift if $dir eq '-n'; + +die <) { + $base = $file; + $base =~ s/\.$//; # just in case... + $base =~ s|.*/||; + $file =~ s|/|\\|g ; + print "Processing $file => $dir\\$base.cmd\n"; + system "echo extproc perl -S > $dir\\$base.cmd"; + system "type $file >> $dir\\$base.cmd"; +} +