📄 readme.os2
字号:
UNIX and OS/2 have different ideas about the kill function. I'vedone a pretty feeble job of taking perl's UNIXish approach andtrying to jam it into the OS/2 way. No doubt you'll find thatyour kill()s aren't working. My apologies in advance.3. Bug reports.I don't normally have access to an OS/2 machine, so if you finda bug, you can go ahead and tell me about it, but the odds thatI'd be able to fix it are slim.4. Wish list.4.1. OS/2.Make ENOPIPE a fatal error.Permit linking of files. (Allegedly, they're working on this.)Get a fork.Make CMD.EXE pass through the return code of its child.4.2 perl.Provide a nice way to add new functions to perl without havingto understand the innards of perl. Not being fluent in perlinnards hacking, I added my extra functions via syscall.4.3. My port.4.3.1. In-place editing.Make more idiot-proof.Allow in-place editing without backup. (How?)4.3.2. Spawning and piping.Make popen() cleverer. Currently, it blindly hands everythingoff to CMD.EXE. This wastes an exec if the command line didn'thave any shell metacharacters and if the program being runis not a batch file.Clever spawning is carried out by do_spawn. We should tryto make popen() do much of the same sort of preprocessingas do_spawn does (which means, of course, that we probablyshould yank out code to be dished off into a subroutine).In do_spawn(), use DosExecPgm instead of spawnl in order to get moreprecise reasons why the child terminated (RESULTCODES). July 1990 Raymond Chen <rjc@math.princeton.edu> 1817 Oxford St. Apt 6 Berkeley, CA 94709-1828 USA-----------------------I picked up the OS/2 port with patches 19-28. When compiling, I foundout that os2.c and director.c were missing. I had to rewrite them becauseeven the original author of the port (Raymond Chen) did no longer have them.I had directory routines laying around, this was no big deal.I rewrote os2.c, but did not implement the syscall() as described above.I had not the time and did not really need it. Feel free ...Changes to above described port:- the small program GLOB is now named PERLGLOB for better ordering in my /bin directory- added help page (well, a graphical user interface would be overkill but a simple help page should be in every program :-)- several cosmetic changes in standard distribution files because of naming conventions etc., #ifdef'd OS2- syscall() not supported as noted above- chdir now recognizes also drive letters and changes also the drive- new mypopen(), mypclose() functions and simulation routines for DOS mode, they are selected automatically in real mode- the new pclose() does not kill the child, my experience is that this is not needed.- setpriority is now: setpriority(class, pid, val) see description of DosSetPrty() for class and val meanings- getpriority is now: getpriority(dummy, pid) see description of DosGetPrty()- kill is now: kill(pid, sig) where sig can be 0 (kill process) 1-3 (send process flags A-C, see DosFlagProcess()) if pid is less than zero, the signal is sent to the whole process tree originating at -pid.The following files are now new with patch >=29:readme.os2 this filedir.h sys/dir.hdirector.c directory routinesos2.c kernel of OS/2 port (see below)popen.c new popen.cmktemp.c enhanced mktemp(), uses TMP env. variable, used by popen.calarm.c PD implementation for alarm()alarm.h header for alarm.cperl.cs Compiler Shell script for perl itselfperl.def linker definition file for perlperl.bad names of protect-only API calls for BINDperlglob.cs Compiler Shell script for perl globbing programperlglob.def linker definition file for perlgloba2p.cs Compiler Shell script for a2p (see below)a2p.def linker definition file for a2pmakefile Makefile, not testedperlsh.cmd the converted perlshperldb.dif changes required for perldb.pl (change for your needs)selfrun.cmd sample selfrunning perl script for OS/2selfrun.bat sample selfrunning perl script for DOS modeNote: I don't use make but my own utility, the Compiler Shell CS.It was posted in comp.binaries.os2 or you can ask me for the newestversion. The .CS files are the "makefiles" for it.Note: MS C 6.00 is required. C 5.1 is not capable of compiling perl,especially not with -DDEBUGGING August 1990 Kai Uwe Rommel rommel@lan.informatik.tu-muenchen.dbp.de Zennerstr. 1 D-8000 Muenchen 70+ I have verified with patchlevel 37, that the OS/2 port compiles, after doing two minor changes. HPFS filenames support was also added. Some bugs were fixed.+ To compile, - you need the bison parser generator - copy config.h from os2 into the main perl directory (important !) - copy perl.cs and perlglob.cs from the os2 subdir to the main dir - copy a2p.cs from os2 to x2p - say "bison -d perl.y" "ren perl_tab.c perl.c" and "ren perl_tab.h perly.h" in the main directory - say "cs perl" and "cs perlglob" in the main directory - say "cs a2p" in the x2p subdir+ If you don't have CS or don't want to use it, you have to construct a makefile ...+ If you have GNU gdbm, you can define NDBM in config.h and link with a large model library of gdbm.+ I am not sure if I can verify the OS/2 port with each release from Larry Wall. Therefore, in future releases there may be changes required to compile perl for OS/2. October 1990 Kai Uwe Rommel rommel@lan.informatik.tu-muenchen.dbp.deVerified patchlevel 40.Some bugs were fixed. Added alarm() support (using PD implementation). November 1990 Kai Uwe Rommel rommel@lan.informatik.tu-muenchen.dbp.deVerified perl 4.0 at patchlevel 10Changes:- some minor corrections and updates in various files- new os2/config.h created from original config.H- added support for crypt(), PD routine by A.Tanenbaum in new os2/crypt.c- added support for wait4pid() in os2.c- fixed/added support for -P option (requires a standard CPP for OS/2)- os2/mktemp.c deleted, no longer needed- new Makefile created for MS C 6.00 and it's NMAKE- with os2/perl.cs, bison has no longer to be called manuallyI have successfully run most tests. Diffs are in os2/tests.dif.Often, only command names, shell expansion etc. have to be changed.Test that still don't run are Unix-specific ones or fail becauseof CR/LF-problems:- io/argv.t, io/inplace.t, op/exec.t, op/glob.t (minor problems)- io/fs.t, io/pipe.t op/fork.t, op/magic.t, op/time.t (under OS/2 not supported features of Unix)- op/pat.t (bug, not yet fixed)Remember to remove the HAS_GDBM symbol from os2/config.h orget GNU gdbm for OS/2. June 1991 Kai Uwe Rommel rommel@lan.informatik.tu-muenchen.dbp.deVerified perl 4.0 at patchlevel 19Minor fixes. Previous fixes at PL10 were not included into distribution. November 1991 Kai Uwe Rommel rommel@informatik.tu-muenchen.dbp.deVerified patchlevel 44.Only two #ifdefs added to eval.c. Stack size for A2P had to be corrected.PERLGLOB separated from DOS version because of HPFS support.[Note: instead of #ifdef'ing eval.c I fixed it in perl.h--lwall] January 1991 Kai Uwe Rommel rommel@lan.informatik.tu-muenchen.dbp.de
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -