diff -C 2 -P -b -r perl5.004_02.ori/Configure perl5.004_02/Configure *** perl5.004_02.ori/Configure Thu Aug 7 16:08:44 1997 --- perl5.004_02/Configure Mon Sep 22 17:07:10 1997 *************** *** 64,67 **** --- 64,70 ---- OS2_SHELL=`cmd /c "echo %OS2_SHELL%" | tr '\\\\' / | tr '[A-Z]' '[a-z]'` fi + if test -d c:/. -a -n "$DJDIR"; then + p_=\; + fi : Proper PATH setting *************** *** 904,911 **** dir=`expr X$file : 'X\(.*\)/'` file=`expr X$file : 'X.*/\(.*\)'` ! (cd $dir && . ./$file) ;; *) ! . ./$file ;; esac --- 907,914 ---- dir=`expr X$file : 'X\(.*\)/'` file=`expr X$file : 'X.*/\(.*\)'` ! (cd $dir && $sh ./$file) ;; *) ! $sh ./$file ;; esac *************** *** 914,918 **** if test ! -f config.h; then : oops, they left it out of MANIFEST, probably, so do it anyway. ! . ./config_h.SH fi fi --- 917,921 ---- if test ! -f config.h; then : oops, they left it out of MANIFEST, probably, so do it anyway. ! $sh ./config_h.SH fi fi *************** *** 1892,1895 **** --- 1895,1902 ---- osname=os2 osvers="$5" + if test -n "$DJDIR"; then + osname=dos + osvers=djgpp + fi fi fi *************** *** 9797,9825 **** for xxx in $known_extensions ; do case "$xxx" in ! DB_File) case "$i_db" in $define) avail_ext="$avail_ext $xxx" ;; esac ;; ! GDBM_File) case "$i_gdbm" in $define) avail_ext="$avail_ext $xxx" ;; esac ;; ! NDBM_File) case "$i_ndbm" in $define) avail_ext="$avail_ext $xxx" ;; esac ;; ! ODBM_File) case "${i_dbm}${i_rpcsvcdbm}" in *"${define}"*) avail_ext="$avail_ext $xxx" ;; esac ;; ! POSIX) case "$useposix" in true|define|y) avail_ext="$avail_ext $xxx" ;; esac ;; ! Opcode) case "$useopcode" in true|define|y) avail_ext="$avail_ext $xxx" ;; esac ;; ! Socket) case "$d_socket" in $define) avail_ext="$avail_ext $xxx" ;; esac --- 9804,9832 ---- for xxx in $known_extensions ; do case "$xxx" in ! DB_File|db_file) case "$i_db" in $define) avail_ext="$avail_ext $xxx" ;; esac ;; ! GDBM_File|gdbm_fil) case "$i_gdbm" in $define) avail_ext="$avail_ext $xxx" ;; esac ;; ! NDBM_File|ndbm_fil) case "$i_ndbm" in $define) avail_ext="$avail_ext $xxx" ;; esac ;; ! ODBM_File|odbm_fil) case "${i_dbm}${i_rpcsvcdbm}" in *"${define}"*) avail_ext="$avail_ext $xxx" ;; esac ;; ! POSIX|posix) case "$useposix" in true|define|y) avail_ext="$avail_ext $xxx" ;; esac ;; ! Opcode|opcode) case "$useopcode" in true|define|y) avail_ext="$avail_ext $xxx" ;; esac ;; ! Socket|socket) case "$d_socket" in $define) avail_ext="$avail_ext $xxx" ;; esac diff -C 2 -P -b -r perl5.004_02.ori/MANIFEST perl5.004_02/MANIFEST *** perl5.004_02.ori/MANIFEST Tue Jul 29 02:01:17 1997 --- perl5.004_02/MANIFEST Sat Sep 6 22:54:06 1997 *************** *** 5,9 **** Changes5.002 Differences between 5.001 and 5.002 Changes5.003 Differences between 5.002 and 5.003 - configure Crude emulation of GNU configure configure.gnu Copy of configure (for case-insensitive systems) Configure Portability tool --- 5,8 ---- *************** *** 26,29 **** --- 25,29 ---- README.vms Notes about VMS port README.win32 Notes about Win32 port + README.dos Notes about dos/djgpp port Todo The Wishlist XSUB.h Include file for extension subroutines *************** *** 43,46 **** --- 43,51 ---- cygwin32/perlld Cygwin32 port deb.c Debugging routines + djgpp/config.over DOS/DJGPP port + djgpp/configure.bat DOS/DJGPP port + djgpp/djgpp.c DOS/DJGPP port + djgpp/djgppsed.sh DOS/DJGPP port + djgpp/fixpmain DOS/DJGPP port doio.c I/O operations doop.c Support code for various operations *************** *** 268,271 **** --- 273,277 ---- hints/mpc.sh Hints for named architecture hints/mpeix.sh Hints for named architecture + hints/dos_djgpp.sh Hints for named architecture hints/ncr_tower.sh Hints for named architecture hints/netbsd.sh Hints for named architecture diff -C 2 -P -b -r perl5.004_02.ori/Makefile.SH perl5.004_02/Makefile.SH *** perl5.004_02.ori/Makefile.SH Thu Aug 7 14:10:53 1997 --- perl5.004_02/Makefile.SH Tue Aug 26 20:52:44 1997 *************** *** 350,354 **** $(plextract): miniperl lib/Config.pm ! ./miniperl -Ilib $@.PL install: all install.perl install.man --- 350,354 ---- $(plextract): miniperl lib/Config.pm ! `echo ./miniperl -Ilib $@.PL` install: all install.perl install.man diff -C 2 -P -b -r perl5.004_02.ori/README.dos perl5.004_02/README.dos *** perl5.004_02.ori/README.dos Thu Jan 1 01:00:00 1970 --- perl5.004_02/README.dos Sat Oct 4 14:04:46 1997 *************** *** 0 **** --- 1,164 ---- + This is a DOS/DJGPP port of Perl 5.004_02 + + 1. Installation + ------------ + + - Unzip the binary package perl54b.zip preserving the directory + structure (-d switch to PKUNZIP) from the top DJGPP directory. + If you want to use perl with long file names (win0.95), then use a LFN + aware unzip and add + + set LFN=y + + to your autoexec.bat or DJGPP.ENV. + + - Edit lib/perl5/Config.pm, and replace every 'c:/djgpp' with your + DJGPP root directory. This can be done with perl too: + + perl -i~ -pe "s!c:/djgpp!x:/djroot!i;" lib/perl5/Config.pm + ^^^^^^^^^ + Substitute this with your DJGPP root directory! + + - This version of perl searches its library files in '../lib/perl5/', + which is relative to the path of perl.exe. If you don't like this, + you can use the PERL5LIB environment variable to tell perl where + the library is. E.g: + + set PERL5LIB=c:/perl/lib + + Warning: if you set PERL5LIB and use tainting checks (-T command line + option), perl ignores PERL5LIB, so you must use the -I command line + switch or the "use lib '...'" construct. Or you can patch perl.exe :) + + - Perl works best with a unixy shell, so you may want to download and + install bash (bshXXXXb.zip from the usual DJGPP sites). After installing + it make the 'SHELL' environment variable point to your bash.exe. + Finally create a `link' to your bash.exe in your %DJDIR%/bin directory: + + ln -s bash.exe sh.exe + or + stubify -g sh.exe + stubedit sh.exe runfile=bash + + - The documentation is in lib/perl5/pod. You can read the .pod files + with any editor, or you can use the `perldoc' utility. For more info: + + perl -S perldoc -h + + It tries to use less.exe or more.com, but you can set your pager with: + + SET PAGER=path_of_your_favourite_pager + + 2. Building Perl + ------------- + + - In addition to the standard DJGPP tools, you will need sed, gawk, grep, + sh-utils, textutils, fileutils, bash, diffutils, make and findutils. :-) + You can find them on the usual DJGPP sites. If you want to build perl + under win0.95, then you MUST use fileutils 3.16+ (3.13 doesn't work). + + - Unzip the source package perl54s.zip preserving the directory + structure (-d switch to PKUNZIP) from the top DJGPP directory. + Under plain DOS, use the -o switch too when unzipping. + This creates the directory gnu/perl5004. + + - Create a symlink or copy your bash.exe to sh.exe in your DJGPP/bin + directory. + + ln -s bash.exe sh.exe + + And make the 'SHELL' environment variable point to this sh.exe: + + set SHELL=c:/djgpp/bin/sh.exe (use full path name!) + + You can do this in djgpp.env too. Add this line BEFORE any section + definition: + + +SHELL=%DJDIR%/bin/sh.exe + + - If you have split.exe and gsplit.exe in your path, then rename split.exe + to djsplit.exe, and gsplit.exe to split.exe. + + - Copy or link gecho.exe to echo.exe if you don't have echo.exe. + + - Copy or link gawk.exe to awk.exe if you don't have awk.exe. + + - Chdir to the gnu/perl5004/djgpp directory and type the following + command: + + configure.bat + + This will do some preprocessing then run the Configure script. + + The Configure script is interactive, but in most of the cases you + just need to press ENTER. + + If the script says that your package is incomplete, and ask whether + to continue, just answer with Y (this can only happen if you don't use + long filenames). + + When Configure asks about the extensions, I suggest IO and Fcntl, + and if you want database handling then SDBM_File or GDBM_File + (you need to install gdbm for this one). If you want to use the + POSIX extension (this is the default), make sure that the stack + size of your cc1.exe is at least 512kbyte (you can check this + with: stubedit cc1.exe). + + You can use the Configure script in non-interactive mode too. + When I've built my perl.exe, I used this: + + configure.bat -Uuseposix -dEs + + then edited config.sh (set hostname & domainname), then + + sh Configure -S + + You can find more info about Configure's command line switches in + the `INSTALL' file. + + - When the script ends, and you want to change some values in the + generated config.sh file, then run + + sh Configure -S + + after you made your modifications. + + IMPORTANT: if you use this -S switch, be sure to delete the CONFIG + environment variable before running the script: + + set CONFIG= + + - Now you can compile Perl. Type: + + make + + - Run the tests: + + make test + + You should see "All tests successful" if you configured a database + manager, and 1 failed test script if not (lib/anydbm.t). If you + configured POSIX you will see 4 failed subtests in lib/posix.t. + + - If you want the documentation in HTML format, then read INSTALL in + the main perl5004 source directory. + + WARNING: if you want to use absolute path names with `installhtml', + use something like this: + + --htmldir=f:/html + --htmlroot='/f|/html' # "|" instead of ":" !!! + + or NETSCAPE does strange things. + + - If you don't want to use the modules, then you are ready: copy perl.exe + into your bin directory. + + - Else install the files with: + + make install + + Enjoy. + + Laszlo Molnar + diff -C 2 -P -b -r perl5.004_02.ori/djgpp/config.over perl5.004_02/djgpp/config.over *** perl5.004_02.ori/djgpp/config.over Thu Jan 1 01:00:00 1970 --- perl5.004_02/djgpp/config.over Thu Aug 28 12:23:26 1997 *************** *** 0 **** --- 1,16 ---- + ln='cp' + pager='less' + + # This is because of the filename conversion under DOS + repair() + { + echo "$1" | tr '[a-z]' '[A-Z]' | sed -e 's/CNTL/cntl/'\ + -e 's/_FIL/_File/g' -e 's/PCODE/pcode/' -e 's/OCKET/ocket/'\ + -e 's/leE/le/g' + } + static_ext=$(repair "$static_ext") + extensions=$(repair "$extensions") + known_extensions=$(repair "$known_extensions") + + # I use Dos::UseLFN in AutoSplit.pm to override this under win0.95 + d_flexfnam='undef' diff -C 2 -P -b -r perl5.004_02.ori/djgpp/configure.bat perl5.004_02/djgpp/configure.bat *** perl5.004_02.ori/djgpp/configure.bat Thu Jan 1 01:00:00 1970 --- perl5.004_02/djgpp/configure.bat Mon Sep 22 22:09:36 1997 *************** *** 0 **** --- 1,37 ---- + @echo off + set CONFIG= + set PATH_SEPARATOR=; + set PATH_EXPAND=y + sh -c 'if test $PATH_SEPARATOR = ";"; then exit 1; fi' + if ERRORLEVEL 1 goto path_sep_ok + echo Error: + echo Make sure the environment variable PATH_SEPARATOR=; while building perl! + echo Please check your DJGPP.ENV! + goto end + + :path_sep_ok + sh -c 'if test $PATH_EXPAND = "Y" -o $PATH_EXPAND = "y"; then exit 1; fi' + if ERRORLEVEL 1 goto path_exp_ok + echo Error: + echo Make sure the environment variable PATH_EXPAND=Y while building perl! + echo Please check your DJGPP.ENV! + goto end + + :path_exp_ok + sh -c '$SHELL -c "exit 128"' + if ERRORLEVEL 128 goto shell_ok + + echo Error: + echo The SHELL environment variable must be set to the full path of your sh.exe! + goto end + + :shell_ok + sh -c 'if test ! -d /tmp; then mkdir /tmp; fi' + cp djgpp.c config.over .. + cd .. + echo Running sed... + sh djgpp/djgppsed.sh + + echo Running Configure... + sh Configure %1 %2 %3 %4 %5 %6 %7 %8 %9 + :end \ No newline at end of file diff -C 2 -P -b -r perl5.004_02.ori/djgpp/djgpp.c perl5.004_02/djgpp/djgpp.c *** perl5.004_02.ori/djgpp/djgpp.c Thu Jan 1 01:00:00 1970 --- perl5.004_02/djgpp/djgpp.c Tue Sep 23 21:41:35 1997 *************** *** 0 **** --- 1,549 ---- + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include "EXTERN.h" + #include "perl.h" + #include "XSUB.h" + + #if DJGPP==2 && DJGPP_MINOR<2 + + /* This is from popen.c */ + + /* Copyright (C) 1997 DJ Delorie, see COPYING.DJ for details */ + /* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ + /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ + + /* hold file pointer, descriptor, command, mode, temporary file name, + and the status of the command */ + struct pipe_list { + FILE *fp; + int fd; + int exit_status; + char *command, mode[10], temp_name[L_tmpnam]; + struct pipe_list *next; + }; + + /* static, global list pointer */ + static struct pipe_list *pl = NULL; + + FILE * + popen (const char *cm, const char *md) /* program name, pipe mode */ + { + struct pipe_list *l1; + + /* make new node */ + if ((l1 = (struct pipe_list *) malloc (sizeof (struct pipe_list))) == NULL) + return NULL; + + /* zero out elements to we'll get here */ + l1->fp = NULL; + l1->next = NULL; + + if (pl!=NULL) + l1->next = pl; + pl = l1; + + /* stick in elements we know already */ + l1->exit_status = -1; + strcpy (l1->mode, md); + if (tmpnam (l1->temp_name) == NULL) + return NULL; + + /* if can save the program name, build temp file */ + if ((l1->command = malloc(strlen(cm)+1))) + { + strcpy(l1->command, cm); + /* if caller wants to read */ + if (l1->mode[0] == 'r') + { + /* dup stdout */ + if ((l1->fd = dup (fileno (stdout))) == EOF) + l1->fp = NULL; + else if (!(l1->fp = freopen (l1->temp_name, "wb", stdout))) + l1->fp = NULL; + else + /* exec cmd */ + { + if ((l1->exit_status = system (cm)) == EOF) + l1->fp = NULL; + } + /* reopen real stdout */ + if (dup2 (l1->fd, fileno (stdout)) == EOF) + l1->fp = NULL; + else + /* open file for reader */ + l1->fp = fopen (l1->temp_name, l1->mode); + close(l1->fd); + } + else + /* if caller wants to write */ + if (l1->mode[0] == 'w') + /* open temp file */ + l1->fp = fopen (l1->temp_name, l1->mode); + else + /* unknown mode */ + l1->fp = NULL; + } + return l1->fp; /* return == NULL ? ERROR : OK */ + } + + int + pclose (FILE *pp) + { + struct pipe_list *l1, *l2; /* list pointers */ + int retval=0; /* function return value */ + + /* if pointer is first node */ + if (pl->fp == pp) + { + /* save node and take it out the list */ + l1 = pl; + pl = l1->next; + } + else + /* if more than one node in list */ + if (pl->next) + { + /* find right node */ + for (l2 = pl, l1 = pl->next; l1; l2 = l1, l1 = l2->next) + if (l1->fp == pp) + break; + + /* take node out of list */ + l2->next = l1->next; + } + else + return -1; + + /* if FILE not in list - return error */ + if (l1->fp == pp) + { + /* close the (hopefully) popen()ed file */ + fclose (l1->fp); + + /* if pipe was opened to write */ + if (l1->mode[0] == 'w') + { + /* dup stdin */ + if ((l1->fd = dup (fileno (stdin))) == EOF) + retval = -1; + else + /* open temp stdin */ + if (!(l1->fp = freopen (l1->temp_name, "rb", stdin))) + retval = -1; + else + /* exec cmd */ + if ((retval = system (l1->command)) != EOF) + { + /* reopen stdin */ + if (dup2 (l1->fd, fileno (stdin)) == EOF) + retval = -1; + } + close(l1->fd); + } + else + /* if pipe was opened to read, return the exit status we saved */ + if (l1->mode[0] == 'r') + retval = l1->exit_status; + else + /* invalid mode */ + retval = -1; + } + remove (l1->temp_name); /* remove temporary file */ + free (l1->command); /* dealloc memory */ + free (l1); /* dealloc memory */ + l1 = NULL; /* make pointer bogus */ + + return retval; /* retval==0 ? OK : ERROR */ + } + + #endif + + /* try both lfn and sfn under win95 */ + + static + FILE *fopen_try_SFN_and_LFN(const char *name, const char *mode) + { + FILE *f; + + /* open the file */ + f = fopen(name,mode); + if (f) + return f; + if (errno != ENOENT || (_crt0_startup_flags & _CRT0_FLAG_NO_LFN)) + return NULL; + + if (_USE_LFN) + { + /* try again with SFN */ + int k = _crt0_startup_flags; + _crt0_startup_flags |= _CRT0_FLAG_NO_LFN; + f = fopen(name,mode); + _crt0_startup_flags = k; + } + else + { + /* try again with LFN */ + const char *l = getenv("LFN"); + char s[32+1]; + if (l && (l[0] == 'n' || l[0] == 'N') && strlen(l) < 32-4) + { + putenv("LFN=y"); + f = fopen(name,mode); + sprintf(s,"LFN=%s",l); + putenv(s); + } + } + + return f; + } + + #ifdef PERLIO_IS_STDIO + + FILE * + PerlIO_open_require(const char *name, const char *mode) + { + return fopen_try_SFN_and_LFN(name,mode); + } + + #else + + #undef PerlIO_open_require + PerlIO * + PerlIO_open_require(const char *name, const char *mode) + { + return (PerlIO *) fopen_try_SFN_and_LFN(name,mode); + } + + #endif + + /**/ + + #define EXECF_SPAWN 0 + #define EXECF_EXEC 1 + + static int + convretcode (int rc,char *prog,int fl) + { + if (rc < 0 && dowarn) + warn ("Can't %s \"%s\": %s",fl ? "exec" : "spawn",prog,Strerror (errno)); + if (rc > 0) + return rc <<= 8; + if (rc < 0) + return 255 << 8; + return 0; + } + + int + do_aspawn (SV *really,SV **mark,SV **sp) + { + int rc; + char **a,*tmps,**argv; + + if (sp<=mark) + return -1; + a=argv=(char**) alloca ((sp-mark+3)*sizeof (char*)); + + while (++mark <= sp) + if (*mark) + *a++ = SvPVx(*mark, na); + else + *a++ = ""; + *a = Nullch; + + if (argv[0][0] != '/' && argv[0][0] != '\\' + && !(argv[0][0] && argv[0][1] == ':' + && (argv[0][2] == '/' || argv[0][2] != '\\')) + ) /* will swawnvp use PATH? */ + TAINT_ENV(); /* testing IFS here is overkill, probably */ + + if (really && *(tmps = SvPV(really, na))) + rc=spawnvp (P_WAIT,tmps,argv); + else + rc=spawnvp (P_WAIT,argv[0],argv); + + return convretcode (rc,argv[0],EXECF_SPAWN); + } + + #define EXTRA "\x00\x00\x00\x00\x00\x00" + + int + do_spawn2 (char *cmd,int execf) + { + char **a,*s,*shell,*metachars; + int rc,unixysh; + + if ((shell=getenv("SHELL"))==NULL && (shell=getenv("COMSPEC"))==NULL) + shell="c:\\command.com" EXTRA; + + unixysh=_is_unixy_shell (shell); + metachars=unixysh ? "$&*(){}[]'\";\\?>|<~`\n" EXTRA : "*?[|<>\"\\" EXTRA; + + while (*cmd && isSPACE(*cmd)) + cmd++; + + if (strnEQ (cmd,"/bin/sh",7) && isSPACE (cmd[7])) + cmd+=5; + + /* save an extra exec if possible */ + /* see if there are shell metacharacters in it */ + if (strstr (cmd,"...")) + goto doshell; + if (unixysh) + { + if (*cmd=='.' && isSPACE (cmd[1])) + goto doshell; + if (strnEQ (cmd,"exec",4) && isSPACE (cmd[4])) + goto doshell; + for (s=cmd; *s && isALPHA (*s); s++) ; /* catch VAR=val gizmo */ + if (*s=='=') + goto doshell; + } + for (s=cmd; *s; s++) + if (strchr (metachars,*s)) + { + if (*s=='\n' && s[1]=='\0') + { + *s='\0'; + break; + } + doshell: + if (execf==EXECF_EXEC) + return convretcode (execl (shell,shell,unixysh ? "-c" : "/c",cmd,NULL),cmd,execf); + return convretcode (system (cmd),cmd,execf); + } + + New (1303,Argv,(s-cmd)/2+2,char*); + Cmd=savepvn (cmd,s-cmd); + a=Argv; + for (s=Cmd; *s;) { + while (*s && isSPACE (*s)) s++; + if (*s) + *(a++)=s; + while (*s && !isSPACE (*s)) s++; + if (*s) + *s++='\0'; + } + *a=Nullch; + if (!Argv[0]) + return -1; + + if (execf==EXECF_EXEC) + rc=execvp (Argv[0],Argv); + else + rc=spawnvp (P_WAIT,Argv[0],Argv); + return convretcode (rc,Argv[0],execf); + } + + int + do_spawn (char *cmd) + { + return do_spawn2 (cmd,EXECF_SPAWN); + } + + bool + do_exec (char *cmd) + { + do_spawn2 (cmd,EXECF_EXEC); + return FALSE; + } + + /**/ + + struct globinfo + { + int fd; + char *matches; + size_t size; + }; + + #define MAXOPENGLOBS 10 + + static struct globinfo myglobs[MAXOPENGLOBS]; + + static struct globinfo * + searchfd (int fd) + { + int ic; + for (ic=0; icmatches=p1=(char*) malloc (gi->size=len))==NULL) + break; + for (ic=0; icmatches=strdup (name))==NULL) + break; + gi->size=strlen (name)+1; + } + globfree (&pglob); + gi->fd=*rv=__FSEXT_alloc_fd (glob_handler); + return 1; + } + case __FSEXT_read: + { + int fd=va_arg (args,int); + char *buf=va_arg (args,char*); + size_t siz=va_arg (args,size_t); + + if ((gi=searchfd (fd))==NULL) + break; + + ic=tell (fd); + if (siz+ic>=gi->size) + siz=gi->size-ic; + memcpy (buf,ic+gi->matches,siz); + lseek (fd,siz,1); + *rv=siz; + return 1; + } + case __FSEXT_close: + { + int fd=va_arg (args,int); + + if ((gi=searchfd (fd))==NULL) + break; + free (gi->matches); + gi->fd=-1; + break; + } + default: + break; + } + return 0; + } + + static + XS(dos_GetCwd) + { + dXSARGS; + + if (items) + croak ("Usage: Dos::GetCwd()"); + { + char tmp[PATH_MAX+2]; + ST(0)=sv_newmortal (); + if (getcwd (tmp,PATH_MAX+1)!=NULL) + sv_setpv ((SV*)ST(0),tmp); + } + XSRETURN (1); + } + + static + XS(dos_UseLFN) + { + dXSARGS; + XSRETURN_IV (_USE_LFN); + } + + void + init_os_extras() + { + char *file = __FILE__; + + dXSUB_SYS; + + newXS ("Dos::GetCwd",dos_GetCwd,file); + newXS ("Dos::UseLFN",dos_UseLFN,file); + + /* install my File System Extension for globbing */ + __FSEXT_add_open_handler (glob_handler); + memset (myglobs,-1,sizeof (myglobs)); + } + + static char *perlprefix; + + #define PERL5 "/perl5" + + char *djgpp_pathexp (const char *p) + { + static char expp[PATH_MAX]; + strcpy (expp,perlprefix); + switch (p[0]) + { + case 'B': + strcat (expp,"/bin"); + break; + case 'S': + strcat (expp,"/lib" PERL5 "/site"); + break; + default: + strcat (expp,"/lib" PERL5); + break; + } + return expp; + } + + void + Perl_DJGPP_init (int *argcp,char ***argvp) + { + char *p; + + perlprefix=strdup (**argvp); + strlwr (perlprefix); + if ((p=strrchr (perlprefix,'/'))!=NULL) + { + *p=0; + if (strEQ (p-4,"/bin")) + p[-4]=0; + } + else + strcpy (perlprefix,".."); + } + diff -C 2 -P -b -r perl5.004_02.ori/djgpp/djgppsed.sh perl5.004_02/djgpp/djgppsed.sh *** perl5.004_02.ori/djgpp/djgppsed.sh Thu Jan 1 01:00:00 1970 --- perl5.004_02/djgpp/djgppsed.sh Mon Sep 22 22:17:58 1997 *************** *** 0 **** --- 1,43 ---- + #! /bin/sh + + # Change some files to work under DOS + # Most of this stuff does .xx -> _xx and aa.bb.ccc -> aa_bb.cc conversion + + SCONFIG='s=\.\(config\)=_\1=g' + SLIST='s=\.\([a-z]\+list\)=_\1=g' + SGREPTMP='s=\.\(greptmp\)=_\1=g' + SECHOTMP='s=\.\(echotmp\)=_\1=g' + SDDC='s=\.\($$\.c\)=_\1=g' + SOUT='s=\([^a-z1-9?]\)\.\(out\)=\1_\2=g' + SEXISTS='s=\.\(exists\)=_\1=g' + SPOD2HTML='s=pod2html-=pod2html.=g' + SCC='s=\.c\.c=.c_c=g' + SFILEC="s=\(\$file\)\.c=\\1'_c'=g" + SCOR='s=c\\\.c|=c\_c|=g' + SHSED='s=\.\(hsed\)=_\1=g' + SDEPTMP='s=\.\(deptmp\)=_\1=g' + SCPP='s=\.\(cpp\.\)=_\1=g' + SARGV='s=\.\(argv\.\)=_\1=g' + SABC='s=\.\([abc][^a]\)=_\1=g' + SDBMX='s=\.\(dbmx\)=_\1=g' + SDBHASH='s=dbhash\.tmp=dbhash_tmp=g' + SSTAT='s=\.\(stat\.\)=_\1=g' + STMP2='s=tmp2=tm2=g' + SPACKLIST='s=\.\(packlist\)=_\1=g' + + sed -e $SCONFIG -e $SGREPTMP -e $SECHOTMP -e $SDDC -e $SOUT Configure |tr -d '\r' >s; mv -f s Configure + sed -e $SEXISTS -e $SLIST -e $SCONFIG Makefile.SH |tr -d '\r' >s; mv -f s Makefile.SH + sed -e $SEXISTS -e $SPACKLIST lib/ExtUtils/Install.pm |tr -d '\r' >s; mv -f s lib/ExtUtils/Install.pm + sed -e $SEXISTS -e $SPACKLIST lib/ExtUtils/MM_Unix.pm |tr -d '\r' >s; mv -f s lib/ExtUtils/MM_Unix.pm + sed -e $SPOD2HTML lib/Pod/Html.pm |tr -d '\r' >s; mv -f s lib/Pod/Html.pm + sed -e $SCC -e $SLIST -e $SFILEC -e $SCOR -e $SDEPTMP -e $SHSED makedepend.SH |tr -d '\r' >s; mv -f s makedepend.SH + sed -e $SCPP t/comp/cpp.aux |tr -d '\r' >s; mv -f s t/comp/cpp.aux + sed -e $SARGV t/io/argv.t >s; mv -f s t/io/argv.t + sed -e $SABC t/io/inplace.t >s; mv -f s t/io/inplace.t + sed -e $SDBMX t/lib/anydbm.t >s; mv -f s t/lib/anydbm.t + sed -e $SDBMX -e $SDBHASH t/lib/gdbm.t >s; mv -f s t/lib/gdbm.t + sed -e $SDBMX -e $SDBHASH t/lib/sdbm.t >s; mv -f s t/lib/sdbm.t + sed -e $SSTAT -e $STMP2 t/op/stat.t >s; mv -f s t/op/stat.t + sed -e $SLIST x2p/Makefile.SH |tr -d '\r' >s; mv -f s x2p/Makefile.SH + sed -e 's=^#define.\([A-Z]\+\)_EXP.*$=#define \1_EXP djgpp_pathexp("\1")=g' config_h.SH >s; mv -f s config_h.SH + sed -e 's=:^/:={^([a-z]:)?[\\\\/]}=g' lib/termcap.pl >s; mv -f s lib/termcap.pl diff -C 2 -P -b -r perl5.004_02.ori/djgpp/fixpmain perl5.004_02/djgpp/fixpmain *** perl5.004_02.ori/djgpp/fixpmain Thu Jan 1 01:00:00 1970 --- perl5.004_02/djgpp/fixpmain Mon Sep 22 17:08:59 1997 *************** *** 0 **** --- 1,30 ---- + #!perl -w + # Fix perlmain.c under DOS (short & case insensitive filenames). + # Called from Makefile.aperl when needed. + # You don't need this when LFN=y. + + use Config; + + open (PERLM,"; + $makefile=; + + ($_) = $makefile =~ /\bNAME\b.*=>\W*([\w\:]+)/; # extract module name + $badname=join ("__",map {lc substr ($_,0,8)} split /:+/); # dosify + $perlmain =~ s/^.*boot_$badname.*$//gm if $badname; # delete bad lines + + @exts=split (" ",$Config{known_extensions}); + for $realname (@exts,'DynaLoader') + { + $dosname=substr (lc $realname,0,8); + $perlmain =~ s/boot_$dosname/boot_$realname/gm; + $perlmain =~ s/$dosname(::bootstrap)/$realname$1/gm; + } + + #DynaLoader is special + $perlmain =~ s/(DynaLoader:\:boot)strap/$1_DynaLoader/gm; + + open (PERLM,">perlmain.c") or die "Can't write perlmain.c: $!"; + print PERLM $perlmain; diff -C 2 -P -b -r perl5.004_02.ori/doio.c perl5.004_02/doio.c *** perl5.004_02.ori/doio.c Tue Jul 29 03:08:11 1997 --- perl5.004_02/doio.c Thu Sep 11 02:17:30 1997 *************** *** 420,425 **** if (Stat(SvPVX(sv),&statbuf) >= 0 && statbuf.st_dev == filedev ! && statbuf.st_ino == fileino ) { ! warn("Can't do inplace edit: %s > 14 characters", SvPVX(sv) ); do_close(gv,FALSE); --- 420,429 ---- if (Stat(SvPVX(sv),&statbuf) >= 0 && statbuf.st_dev == filedev ! && statbuf.st_ino == fileino ! #ifdef DJGPP ! || (_djstat_fail_bits & _STFAIL_TRUENAME)!=0 ! #endif ! ) { ! warn("Can't do inplace edit: %s would not be uniq", SvPVX(sv) ); do_close(gv,FALSE); *************** *** 943,947 **** } ! #if !defined(OS2) && !defined(WIN32) bool --- 947,951 ---- } ! #if !defined(OS2) && !defined(WIN32) && !defined(DJGPP) bool diff -C 2 -P -b -r perl5.004_02.ori/dosish.h perl5.004_02/dosish.h *** perl5.004_02.ori/dosish.h Thu Jul 31 19:38:06 1997 --- perl5.004_02/dosish.h Mon Sep 22 17:07:34 1997 *************** *** 8,14 **** # define BIT_BUCKET "nul" # define OP_BINARY O_BINARY ! void Perl_DJGPP_init(); ! # define PERL_SYS_INIT(argcp, argvp) STMT_START { \ ! Perl_DJGPP_init(); } STMT_END #else /* DJGPP */ # ifdef WIN32 --- 8,16 ---- # define BIT_BUCKET "nul" # define OP_BINARY O_BINARY ! # define PERL_SYS_INIT(c,v) Perl_DJGPP_init(c,v) ! # include ! # define HAS_UTIME ! # define HAS_KILL ! char *djgpp_pathexp (const char*); #else /* DJGPP */ # ifdef WIN32 diff -C 2 -P -b -r perl5.004_02.ori/ext/POSIX/POSIX.xs perl5.004_02/ext/POSIX/POSIX.xs *** perl5.004_02.ori/ext/POSIX/POSIX.xs Tue Aug 5 15:03:01 1997 --- perl5.004_02/ext/POSIX/POSIX.xs Thu Sep 11 22:09:11 1997 *************** *** 2970,2976 **** --- 2970,2978 ---- hv_store(RETVAL, "mon_decimal_point", 17, newSVpv(lcbuf->mon_decimal_point, 0), 0); + #if !defined(DJGPP) || (DJGPP==2 && DJGPP_MINOR>1) if (lcbuf->mon_thousands_sep && *lcbuf->mon_thousands_sep) hv_store(RETVAL, "mon_thousands_sep", 17, newSVpv(lcbuf->mon_thousands_sep, 0), 0); + #endif if (lcbuf->mon_grouping && *lcbuf->mon_grouping) hv_store(RETVAL, "mon_grouping", 12, diff -C 2 -P -b -r perl5.004_02.ori/hints/dos_djgpp.sh perl5.004_02/hints/dos_djgpp.sh *** perl5.004_02.ori/hints/dos_djgpp.sh Thu Jan 1 01:00:00 1970 --- perl5.004_02/hints/dos_djgpp.sh Sun Sep 7 14:44:44 1997 *************** *** 0 **** --- 1,61 ---- + # hints file for dos/djgpp v2.xx + # Original by Laszlo Molnar + + archname='djgpp' + archobjs='djgpp.o' + path_sep=\; + startsh="#!sh" + + cc='gcc' + ld='gcc' + usrinc="$DJDIR/include" + + libpth="$DJDIR/lib" + libc="$libpth/libc.a" + + so='none' + usedl='n' + + firstmakefile='GNUmakefile' + exe_ext='.exe' + + randbits=31 + + ln='cp' # no REAL ln on dos + lns='cp' + + usenm='true' + d_bincompat3='undef' + + d_link='undef' # these are empty functions in libc.a + d_symlink='undef' + d_fork='undef' + d_pipe='undef' + + startperl='#!perl' + + case "X$optimize" in + X) + optimize="-O2 -fomit-frame-pointer -malign-loops=2 -malign-jumps=2 -malign-functions=2" + ;; + esac + ldflags='-s' + usemymalloc='n' + timetype='time_t' + + prefix=$DJDIR + privlib=$prefix/lib/perl5 + archlib=$privlib + sitelib=$privlib/site + sitearch=$sitelib + + : set up the translation script tr + + cat >../UU/tr <); %archpms = (Config => 1, FileHandle => 1, overload => 1); + $archpms{config} = 1 if $Is_Dos; + $archpms{filehand} = 1 if $Is_Dos; find(sub { if ("$File::Find::dir/$_" =~ m{^ext/[^/]+/(.*)\.pm$}) { *************** *** 87,93 **** # First we install the version-numbered executables. ! safe_unlink("$installbin/perl$ver$exe_ext"); ! copy("perl$exe_ext", "$installbin/perl$ver$exe_ext"); ! chmod(0755, "$installbin/perl$ver$exe_ext"); safe_unlink("$installbin/sperl$ver$exe_ext"); --- 91,103 ---- # First we install the version-numbered executables. ! if (!Is_Dos) { ! safe_unlink("$installbin/perl$ver$exe_ext"); ! copy("perl$exe_ext", "$installbin/perl$ver$exe_ext"); ! chmod(0755, "$installbin/perl$ver$exe_ext"); ! } else { ! safe_unlink("$installbin/perl.exe"); ! copy("perl.exe", "$installbin/perl.exe"); ! system("djp", "$installbin/perl.exe"); ! } safe_unlink("$installbin/sperl$ver$exe_ext"); *************** *** 172,176 **** # Make links to ordinary names if installbin directory isn't current directory. ! if (! $versiononly && ! samepath($installbin, '.')) { safe_unlink("$installbin/perl$exe_ext", "$installbin/suidperl$exe_ext"); link("$installbin/perl$ver$exe_ext", "$installbin/perl$exe_ext"); --- 182,186 ---- # Make links to ordinary names if installbin directory isn't current directory. ! if (! $versiononly && ! samepath($installbin, '.') && ! Is_Dos) { safe_unlink("$installbin/perl$exe_ext", "$installbin/suidperl$exe_ext"); link("$installbin/perl$ver$exe_ext", "$installbin/perl$exe_ext"); *************** *** 183,186 **** --- 193,197 ---- copy("x2p/a2p$exe_ext", "$installbin/a2p$exe_ext"); chmod(0755, "$installbin/a2p$exe_ext"); + system ("djp", "$installbin/a2p$exe_ext") if $Is_Dos; } *************** *** 211,215 **** --- 222,230 ---- if (! $versiononly) { safe_unlink("$installscript/pstruct"); + if ($Is_Dos) { + copy("$installscript/c2ph","$installscript/pstruct"); + } else { link("$installscript/c2ph","$installscript/pstruct"); + } } *************** *** 245,249 **** mkpath("${installarchlib}/pod", 1, 0777); unlink($to); ! link($from, $to); } } --- 260,264 ---- mkpath("${installarchlib}/pod", 1, 0777); unlink($to); ! link($from, $to) if (!$Is_Dos); } } *************** *** 367,370 **** --- 382,386 ---- local($mode,$name) = @_; + return if $Is_Dos; printf STDERR " chmod %o %s\n", $mode, $name; CORE::chmod($mode,$name) *************** *** 404,408 **** # ignore patch backups and the .exists files. ! return if $name =~ m{\.orig$|~$|^\.exists}; $name = "$dir/$name" if $dir ne ''; --- 420,424 ---- # ignore patch backups and the .exists files. ! return if $name =~ m{\.orig$|~$|^[._]exists}; $name = "$dir/$name" if $dir ne ''; diff -C 2 -P -b -r perl5.004_02.ori/lib/AutoSplit.pm perl5.004_02/lib/AutoSplit.pm *** perl5.004_02.ori/lib/AutoSplit.pm Fri Jun 13 16:03:11 1997 --- perl5.004_02/lib/AutoSplit.pm Thu Aug 28 14:53:02 1997 *************** *** 106,109 **** --- 106,112 ---- $maxflen = 255; $maxflen = 14 if $Config{'d_flexfnam'} ne 'define'; + if (defined (&Dos::UseLFN)) { + $maxflen = Dos::UseLFN() ? 255 : 11; + } $Is_VMS = ($^O eq 'VMS'); *************** *** 200,204 **** die "Package $package ($modpname.pm) does not match filename $filename" unless ($filename =~ m/\Q$modpname.pm\E$/ or ! ($^O eq "msdos") or ($^O eq 'MSWin32') or $Is_VMS && $filename =~ m/$modpname.pm/i); --- 203,207 ---- die "Package $package ($modpname.pm) does not match filename $filename" unless ($filename =~ m/\Q$modpname.pm\E$/ or ! ($^O eq 'dos') or ($^O eq 'MSWin32') or $Is_VMS && $filename =~ m/$modpname.pm/i); *************** *** 248,251 **** --- 251,256 ---- # For now both of these produce warnings. + my $Is83 = $maxflen==11; # plain, case INSENSITIVE dos filenames + open(OUT,">/dev/null") || open(OUT,">nla0:"); # avoid 'not opened' warning my(@subnames, %proto); *************** *** 270,278 **** unless(open(OUT, ">$lpath")){ open(OUT, ">$spath") or die "Can't create $spath: $!\n"; ! push(@names, $sname); ! print " writing $spath (with truncated name)\n" ! if ($Verbose>=1); }else{ ! push(@names, $lname); print " writing $lpath\n" if ($Verbose>=2); } --- 275,282 ---- unless(open(OUT, ">$lpath")){ open(OUT, ">$spath") or die "Can't create $spath: $!\n"; ! push(@names, $Is83 ? lc $sname : $sname); ! print " writing $spath (with truncated name)\n" if ($Verbose>=1); }else{ ! push(@names, $Is83 ? lc substr ($lname,0,8) : $lname); print " writing $lpath\n" if ($Verbose>=2); } *************** *** 311,314 **** --- 315,319 ---- my($subname) = m/(.*)\.al$/; next if $names{substr($subname,0,$maxflen-3)}; + next if ($Is83 && $names{lc substr($subname,0,8)}); my($file) = "$autodir/$modpname/$_"; print " deleting $file\n" if ($Verbose>=2); diff -C 2 -P -b -r perl5.004_02.ori/lib/Cwd.pm perl5.004_02/lib/Cwd.pm *** perl5.004_02.ori/lib/Cwd.pm Thu Apr 17 20:21:30 1997 --- perl5.004_02/lib/Cwd.pm Thu Aug 28 13:32:47 1997 *************** *** 180,184 **** sub chdir_init { ! if ($ENV{'PWD'} and $^O ne 'os2' and $^O ne 'msdos') { my($dd,$di) = stat('.'); my($pd,$pi) = stat($ENV{'PWD'}); --- 180,184 ---- sub chdir_init { ! if ($ENV{'PWD'} and $^O ne 'os2' and $^O ne 'dos') { my($dd,$di) = stat('.'); my($pd,$pi) = stat($ENV{'PWD'}); *************** *** 330,337 **** *_NT_cwd = \&_os2_cwd unless defined &_NT_cwd; ! sub _msdos_cwd { $ENV{'PWD'} = `command /c cd`; chop $ENV{'PWD'}; $ENV{'PWD'} =~ s:\\:/:g ; return $ENV{'PWD'}; } --- 330,341 ---- *_NT_cwd = \&_os2_cwd unless defined &_NT_cwd; ! sub _dos_cwd { ! if (!defined &Dos::GetCwd) { $ENV{'PWD'} = `command /c cd`; chop $ENV{'PWD'}; $ENV{'PWD'} =~ s:\\:/:g ; + } else { + $ENV{'PWD'} = Dos::GetCwd(); + } return $ENV{'PWD'}; } *************** *** 364,372 **** *abs_path = \&fast_abs_path; } ! elsif ($^O eq 'msdos') { ! *cwd = \&_msdos_cwd; ! *getcwd = \&_msdos_cwd; ! *fastgetcwd = \&_msdos_cwd; ! *fastcwd = \&_msdos_cwd; *abs_path = \&fast_abs_path; } --- 368,376 ---- *abs_path = \&fast_abs_path; } ! elsif ($^O eq 'dos') { ! *cwd = \&_dos_cwd; ! *getcwd = \&_dos_cwd; ! *fastgetcwd = \&_dos_cwd; ! *fastcwd = \&_dos_cwd; *abs_path = \&fast_abs_path; } diff -C 2 -P -b -r perl5.004_02.ori/lib/ExtUtils/Install.pm perl5.004_02/lib/ExtUtils/Install.pm *** perl5.004_02.ori/lib/ExtUtils/Install.pm Fri Aug 1 20:36:58 1997 --- perl5.004_02/lib/ExtUtils/Install.pm Thu Aug 28 12:39:12 1997 *************** *** 12,16 **** $Is_VMS = $^O eq 'VMS'; ! my $splitchar = $^O eq 'VMS' ? '|' : $^O eq 'os2' ? ';' : ':'; my @PERL_ENV_LIB = split $splitchar, defined $ENV{'PERL5LIB'} ? $ENV{'PERL5LIB'} : $ENV{'PERLLIB'} || ''; my $Inc_uninstall_warn_handler; --- 12,16 ---- $Is_VMS = $^O eq 'VMS'; ! my $splitchar = $^O eq 'VMS' ? '|' : ($^O eq 'os2' || $^O eq 'dos') ? ';' : ':'; my @PERL_ENV_LIB = split $splitchar, defined $ENV{'PERL5LIB'} ? $ENV{'PERL5LIB'} : $ENV{'PERLLIB'} || ''; my $Inc_uninstall_warn_handler; diff -C 2 -P -b -r perl5.004_02.ori/lib/ExtUtils/MM_Unix.pm perl5.004_02/lib/ExtUtils/MM_Unix.pm *** perl5.004_02.ori/lib/ExtUtils/MM_Unix.pm Tue Aug 5 15:28:08 1997 --- perl5.004_02/lib/ExtUtils/MM_Unix.pm Sat Aug 30 22:20:26 1997 *************** *** 6,10 **** use DirHandle; use strict; ! use vars qw($VERSION $Is_Mac $Is_OS2 $Is_VMS $Is_Win32 $Verbose %pm %static $Xsubpp_Version); --- 6,10 ---- use DirHandle; use strict; ! use vars qw($VERSION $Is_Mac $Is_OS2 $Is_VMS $Is_Win32 $Is_Dos $Verbose %pm %static $Xsubpp_Version); *************** *** 18,21 **** --- 18,22 ---- $Is_Mac = $^O eq 'MacOS'; $Is_Win32 = $^O eq 'MSWin32'; + $Is_Dos = $^O eq 'dos'; if ($Is_VMS = $^O eq 'VMS') { *************** *** 267,271 **** .C$(OBJ_EXT): $(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(DEFINE) $*.C ! ' if $^O ne 'os2' and $^O ne 'MSWin32'; # Case-specific push @m, ' .cpp$(OBJ_EXT): --- 268,272 ---- .C$(OBJ_EXT): $(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(DEFINE) $*.C ! ' if $^O ne 'os2' and $^O ne 'MSWin32' and $^O ne 'dos'; #Case-specific push @m, ' .cpp$(OBJ_EXT): *************** *** 1050,1054 **** --- 1051,1060 ---- sub file_name_is_absolute { my($self,$file) = @_; + if ($Is_Dos){ + $file =~ m{^([a-z]:)?[\\/]}i ; + } + else { $file =~ m:^/: ; + } } *************** *** 2294,2297 **** --- 2300,2306 ---- }; + push @m, "\t",$self->{NOECHO}.q{$(PERL) $(INSTALLSCRIPT)/fixpmain + } if (defined (&Dos::UseLFN) && Dos::UseLFN()==0); + push @m, q{ *************** *** 2571,2575 **** sub path { my($self) = @_; ! my $path_sep = $Is_OS2 ? ";" : ":"; my $path = $ENV{PATH}; $path =~ s:\\:/:g if $Is_OS2; --- 2580,2584 ---- sub path { my($self) = @_; ! my $path_sep = ($Is_OS2 || $Is_Dos) ? ";" : ":"; my $path = $ENV{PATH}; $path =~ s:\\:/:g if $Is_OS2; diff -C 2 -P -b -r perl5.004_02.ori/lib/ExtUtils/Manifest.pm perl5.004_02/lib/ExtUtils/Manifest.pm *** perl5.004_02.ori/lib/ExtUtils/Manifest.pm Fri Mar 14 23:14:10 1997 --- perl5.004_02/lib/ExtUtils/Manifest.pm Fri Aug 29 01:18:02 1997 *************** *** 88,95 **** --- 88,101 ---- my $found = manifind(); my $file; + my $dosnames=(defined(&Dos::UseLFN) && Dos::UseLFN()==0); my(@missfile,@missentry); if ($arg & 1){ foreach $file (sort keys %$read){ warn "Debug: manicheck checking from $MANIFEST $file\n" if $Debug; + if ($dosnames){ + $file = lc $file; + $file =~ s=(\.(\w|-)+)=substr ($1,0,4)=ge; + $file =~ s=((\w|-)+)=substr ($1,0,8)=ge; + } unless ( exists $found->{$file} ) { warn "No such file: $file\n" unless $Quiet; diff -C 2 -P -b -r perl5.004_02.ori/lib/File/Basename.pm perl5.004_02/lib/File/Basename.pm *** perl5.004_02.ori/lib/File/Basename.pm Wed Apr 16 19:47:42 1997 --- perl5.004_02/lib/File/Basename.pm Thu Aug 28 12:57:26 1997 *************** *** 142,146 **** if (@_) { $Fileparse_fstype = $_[0]; ! $Fileparse_igncase = ($_[0] =~ /^(?:MacOS|VMS|AmigaOS|os2|RISCOS|MSWin32)/i); } wantarray ? @old : $old[0]; --- 142,146 ---- if (@_) { $Fileparse_fstype = $_[0]; ! $Fileparse_igncase = ($_[0] =~ /^(?:MacOS|VMS|AmigaOS|os2|RISCOS|MSWin32|MSDOS)/i); } wantarray ? @old : $old[0]; diff -C 2 -P -b -r perl5.004_02.ori/lib/File/Find.pm perl5.004_02/lib/File/Find.pm *** perl5.004_02.ori/lib/File/Find.pm Thu Jul 31 23:10:02 1997 --- perl5.004_02/lib/File/Find.pm Thu Aug 28 12:39:00 1997 *************** *** 271,275 **** $dont_use_nlink = 1 ! if $^O eq 'os2' || $^O eq 'msdos' || $^O eq 'amigaos'; 1; --- 271,275 ---- $dont_use_nlink = 1 ! if $^O eq 'os2' || $^O eq 'dos' || $^O eq 'amigaos'; 1; diff -C 2 -P -b -r perl5.004_02.ori/lib/File/Path.pm perl5.004_02/lib/File/Path.pm *** perl5.004_02.ori/lib/File/Path.pm Fri Aug 1 00:57:26 1997 --- perl5.004_02/lib/File/Path.pm Thu Aug 28 12:39:06 1997 *************** *** 112,116 **** # These OSes complain if you want to remove a file that you have no # write permission to: ! my $force_writeable = ($^O eq 'os2' || $^O eq 'msdos' || $^O eq 'MSWin32' || $^O eq 'amigaos'); --- 112,116 ---- # These OSes complain if you want to remove a file that you have no # write permission to: ! my $force_writeable = ($^O eq 'os2' || $^O eq 'dos' || $^O eq 'MSWin32' || $^O eq 'amigaos'); diff -C 2 -P -b -r perl5.004_02.ori/lib/FindBin.pm perl5.004_02/lib/FindBin.pm *** perl5.004_02.ori/lib/FindBin.pm Wed Apr 16 00:03:28 1997 --- perl5.004_02/lib/FindBin.pm Sat Oct 4 17:17:06 1997 *************** *** 88,92 **** { local $_ = shift if (@_); ! if ($^O eq 'MSWin32') { return m#^[a-z]:[\\/]#i; --- 88,92 ---- { local $_ = shift if (@_); ! if ($^O eq 'MSWin32' || $^O eq 'dos') { return m#^[a-z]:[\\/]#i; diff -C 2 -P -b -r perl5.004_02.ori/lib/Pod/Html.pm perl5.004_02/lib/Pod/Html.pm *** perl5.004_02.ori/lib/Pod/Html.pm Thu Jul 31 23:01:47 1997 --- perl5.004_02/lib/Pod/Html.pm Thu Aug 28 12:41:07 1997 *************** *** 200,203 **** --- 200,205 ---- my %items = (); # associative array used to find the location # of =item directives referenced by C<> links + my $Is83; # is dos with short filenames (8.3) + sub init_globals { $dircache = "pod2html-dircache"; *************** *** 245,249 **** #%items = (); # associative array used to find the location # of =item directives referenced by C<> links ! } --- 247,251 ---- #%items = (); # associative array used to find the location # of =item directives referenced by C<> links ! $Is83=$^O eq 'dos'; } *************** *** 255,258 **** --- 257,262 ---- init_globals(); + $Is83 = 0 if (defined (&Dos::UseLFN) && Dos::UseLFN()); + # cache of %pages and %items from last time we ran pod2html *************** *** 1064,1067 **** --- 1068,1073 ---- if (defined $pages{$2}) { # is a link qq($1$2); + } elsif (defined $pages{dosify($2)}) { # is a link + qq($1$2); } else { "$1$2"; *************** *** 1310,1313 **** --- 1316,1332 ---- # + # dosify - convert filenames to 8.3 + # + sub dosify { + my($str) = @_; + if ($Is83) { + $str = lc $str; + $str =~ s/(\.\w+)/substr ($1,0,4)/ge; + $str =~ s/(\w+)/substr ($1,0,8)/ge; + } + return $str; + } + + # # process_L - convert a pod L<> directive to a corresponding HTML link. # most of the links made are inferred rather than known about directly *************** *** 1321,1325 **** sub process_L { my($str) = @_; ! my($s1, $s2, $linktext, $page, $section, $link); # work strings $str =~ s/\n/ /g; # undo word-wrapped tags --- 1340,1344 ---- sub process_L { my($str) = @_; ! my($s1, $s2, $linktext, $page, $page83, $section, $link); # work strings $str =~ s/\n/ /g; # undo word-wrapped tags *************** *** 1347,1350 **** --- 1366,1371 ---- } + $page83=dosify($page); + $page=$page83 if (defined $pages{$page83}); if ($page eq "") { $link = "#" . htmlify(0,$section); diff -C 2 -P -b -r perl5.004_02.ori/lib/Pod/Text.pm perl5.004_02/lib/Pod/Text.pm *** perl5.004_02.ori/lib/Pod/Text.pm Thu Jul 31 22:47:58 1997 --- perl5.004_02/lib/Pod/Text.pm Thu Aug 28 12:38:52 1997 *************** *** 80,84 **** || $ENV{COLUMNS} || ($ENV{TERMCAP} =~ /co#(\d+)/)[0] ! || ($^O ne 'MSWin32' && (`stty -a 2>/dev/null` =~ /(\d+) columns/)[0]) || 72; --- 80,84 ---- || $ENV{COLUMNS} || ($ENV{TERMCAP} =~ /co#(\d+)/)[0] ! || ($^O ne 'MSWin32' && $^O ne 'dos' && (`stty -a 2>/dev/null` =~ /(\d+) columns/)[0]) || 72; diff -C 2 -P -b -r perl5.004_02.ori/lib/Term/Cap.pm perl5.004_02/lib/Term/Cap.pm *** perl5.004_02.ori/lib/Term/Cap.pm Thu Apr 10 22:02:19 1997 --- perl5.004_02/lib/Term/Cap.pm Mon Sep 1 21:07:04 1997 *************** *** 107,111 **** push(@termcap_path, $ENV{TERMCAP}) if ((exists $ENV{TERMCAP}) && ! (($^O eq 'os2' || $^O eq 'MSWin32') ? $ENV{TERMCAP} =~ /^[a-z]:[\\\/]/i : $ENV{TERMCAP} =~ /^\//)); --- 107,111 ---- push(@termcap_path, $ENV{TERMCAP}) if ((exists $ENV{TERMCAP}) && ! (($^O eq 'os2' || $^O eq 'MSWin32' || $^O eq 'dos') ? $ENV{TERMCAP} =~ /^[a-z]:[\\\/]/i : $ENV{TERMCAP} =~ /^\//)); diff -C 2 -P -b -r perl5.004_02.ori/lib/perl5db.pl perl5.004_02/lib/perl5db.pl *** perl5.004_02.ori/lib/perl5db.pl Tue Aug 5 15:23:18 1997 --- perl5.004_02/lib/perl5db.pl Sun Oct 5 18:16:15 1997 *************** *** 291,295 **** if (-e "/dev/tty") { $console = "/dev/tty"; ! } elsif (-e "con" or $^O eq 'MSWin32') { $console = "con"; } else { --- 291,295 ---- if (-e "/dev/tty") { $console = "/dev/tty"; ! } elsif ($^O eq 'dos' or -e "con" or $^O eq 'MSWin32') { $console = "con"; } else { diff -C 2 -P -b -r perl5.004_02.ori/makedepend.SH perl5.004_02/makedepend.SH *** perl5.004_02.ori/makedepend.SH Thu Oct 10 20:48:28 1996 --- perl5.004_02/makedepend.SH Tue Aug 26 21:36:20 1997 *************** *** 49,53 **** # Put .. and . first so that we pick up the present cppstdin, not # an older one lying about in /usr/local/bin. ! PATH=".:..:$PATH" export PATH --- 49,53 ---- # Put .. and . first so that we pick up the present cppstdin, not # an older one lying about in /usr/local/bin. ! PATH=".$path_sep..$path_sep$PATH" export PATH diff -C 2 -P -b -r perl5.004_02.ori/mg.c perl5.004_02/mg.c *** perl5.004_02.ori/mg.c Tue Aug 5 15:25:59 1997 --- perl5.004_02/mg.c Wed Aug 13 19:48:54 1997 *************** *** 592,596 **** #endif ! #if !defined(OS2) && !defined(AMIGAOS) && !defined(WIN32) /* And you'll never guess what the dog had */ /* in its mouth... */ --- 592,596 ---- #endif ! #if !defined(OS2) && !defined(AMIGAOS) && !defined(WIN32) && !defined(MSDOS) /* And you'll never guess what the dog had */ /* in its mouth... */ *************** *** 640,644 **** } } ! #endif /* neither OS2 nor AMIGAOS nor WIN32 */ return 0; --- 640,644 ---- } } ! #endif /* neither OS2 nor AMIGAOS nor WIN32 nor MSDOS */ return 0; diff -C 2 -P -b -r perl5.004_02.ori/patchlevel.h perl5.004_02/patchlevel.h *** perl5.004_02.ori/patchlevel.h Fri Aug 1 16:07:34 1997 --- perl5.004_02/patchlevel.h Sat Oct 4 14:10:50 1997 *************** *** 39,42 **** --- 39,43 ---- static char *local_patches[] = { NULL + ,"DOS_DJGPP_2 - patch for the dos/djgpp port" ,NULL }; diff -C 2 -P -b -r perl5.004_02.ori/perl.c perl5.004_02/perl.c *** perl5.004_02.ori/perl.c Tue Aug 5 15:38:36 1997 --- perl5.004_02/perl.c Thu Sep 11 02:10:22 1997 *************** *** 773,777 **** if (xsinit) (*xsinit)(); /* in case linked C routines want magical variables */ ! #if defined(VMS) || defined(WIN32) init_os_extras(); #endif --- 773,777 ---- if (xsinit) (*xsinit)(); /* in case linked C routines want magical variables */ ! #if defined(VMS) || defined(WIN32) || defined(DJGPP) init_os_extras(); #endif *************** *** 1503,1506 **** --- 1503,1507 ---- #ifdef DJGPP printf("djgpp v2 port (jpl5003c) by Hirofumi Watanabe, 1996\n"); + printf("djgpp v2 port (perl5004) by Laszlo Molnar, 1997\n"); #endif #ifdef OS2 *************** *** 2433,2437 **** continue; *s++ = '\0'; ! #ifdef WIN32 (void)strupr(*env); #endif --- 2434,2438 ---- continue; *s++ = '\0'; ! #if defined(WIN32) || defined(MSDOS) (void)strupr(*env); #endif diff -C 2 -P -b -r perl5.004_02.ori/pp_ctl.c perl5.004_02/pp_ctl.c *** perl5.004_02.ori/pp_ctl.c Tue Aug 5 15:26:00 1997 --- perl5.004_02/pp_ctl.c Sun Sep 14 23:07:21 1997 *************** *** 2230,2233 **** --- 2230,2240 ---- } + #ifndef PerlIO_open_require + #ifdef __DJGPP__ + extern PerlIO *PerlIO_open_require(const char *, const char *); + #else + #define PerlIO_open_require PerlIO_open + #endif + #endif PP(pp_require) { *************** *** 2278,2282 **** { tryname = name; ! tryrsfp = PerlIO_open(name,"r"); } else { --- 2285,2289 ---- { tryname = name; ! tryrsfp = PerlIO_open_require(name,"r"); } else { *************** *** 2301,2305 **** #endif tryname = SvPVX(namesv); ! tryrsfp = PerlIO_open(tryname, "r"); if (tryrsfp) { if (tryname[0] == '.' && tryname[1] == '/') --- 2308,2312 ---- #endif tryname = SvPVX(namesv); ! tryrsfp = PerlIO_open_require(tryname, "r"); if (tryrsfp) { if (tryname[0] == '.' && tryname[1] == '/') diff -C 2 -P -b -r perl5.004_02.ori/pp_hot.c perl5.004_02/pp_hot.c *** perl5.004_02.ori/pp_hot.c Tue Aug 5 15:26:01 1997 --- perl5.004_02/pp_hot.c Mon Sep 22 22:50:48 1997 *************** *** 1118,1124 **** --- 1118,1129 ---- sv_catpv(tmpcmd, "; do echo \"$a\\0\\c\"; done |"); #else + #ifdef DJGPP + sv_setpv(tmpcmd, "/dev/dosglob/"); /* File System Extension */ + sv_catsv(tmpcmd, tmpglob); + #else sv_setpv(tmpcmd, "perlglob "); sv_catsv(tmpcmd, tmpglob); sv_catpv(tmpcmd, " |"); + #endif /* !DJGPP */ #endif /* !OS2 */ #else /* !DOSISH */ diff -C 2 -P -b -r perl5.004_02.ori/t/io/fs.t perl5.004_02/t/io/fs.t *** perl5.004_02.ori/t/io/fs.t Thu Apr 10 16:24:13 1997 --- perl5.004_02/t/io/fs.t Thu Aug 28 12:38:23 1997 *************** *** 10,13 **** --- 10,15 ---- use Config; + $Is_Dos=$^O eq 'dos'; + # avoid win32 (for now) do { print "1..0\n"; exit(0); } if $^O eq 'MSWin32'; *************** *** 31,45 **** close(fh); ! if (eval {link('a','b')}) {print "ok 2\n";} else {print "not ok 2\n";} ! if (eval {link('b','c')}) {print "ok 3\n";} else {print "not ok 3\n";} ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, $blksize,$blocks) = stat('c'); ! if ($Config{dont_use_nlink} || $nlink == 3) {print "ok 4\n";} else {print "not ok 4\n";} ! if (($mode & 0777) == 0666 || $^O eq 'amigaos') {print "ok 5\n";} else {print "not ok 5\n";} --- 33,47 ---- close(fh); ! if (eval {link('a','b')} || $Is_Dos) {print "ok 2\n";} else {print "not ok 2\n";} ! if (eval {link('b','c')} || $Is_Dos) {print "ok 3\n";} else {print "not ok 3\n";} ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, $blksize,$blocks) = stat('c'); ! if ($Config{dont_use_nlink} || $nlink == 3 || $Is_Dos) {print "ok 4\n";} else {print "not ok 4\n";} ! if (($mode & 0777) == 0666 || $^O eq 'amigaos' || $Is_Dos) {print "ok 5\n";} else {print "not ok 5\n";} *************** *** 48,63 **** ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, $blksize,$blocks) = stat('c'); ! if (($mode & 0777) == 0777) {print "ok 7\n";} else {print "not ok 7\n";} ! if ((chmod 0700,'c','x') == 2) {print "ok 8\n";} else {print "not ok 8\n";} ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, $blksize,$blocks) = stat('c'); ! if (($mode & 0777) == 0700) {print "ok 9\n";} else {print "not ok 9\n";} ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, $blksize,$blocks) = stat('x'); ! if (($mode & 0777) == 0700) {print "ok 10\n";} else {print "not ok 10\n";} ! if ((unlink 'b','x') == 2) {print "ok 11\n";} else {print "not ok 11\n";} ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, $blksize,$blocks) = stat('b'); --- 50,65 ---- ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, $blksize,$blocks) = stat('c'); ! if (($mode & 0777) == 0777 || $Is_Dos) {print "ok 7\n";} else {print "not ok 7\n";} ! if ((chmod 0700,'c','x') == 2 || $Is_Dos) {print "ok 8\n";} else {print "not ok 8\n";} ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, $blksize,$blocks) = stat('c'); ! if (($mode & 0777) == 0700 || $Is_Dos) {print "ok 9\n";} else {print "not ok 9\n";} ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, $blksize,$blocks) = stat('x'); ! if (($mode & 0777) == 0700 || $Is_Dos) {print "ok 10\n";} else {print "not ok 10\n";} ! if ((unlink 'b','x') == 2 || $Is_Dos) {print "ok 11\n";} else {print "not ok 11\n";} ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, $blksize,$blocks) = stat('b'); *************** *** 77,81 **** if ($ino) {print "ok 17\n";} else {print "not ok 17\n";} if (($atime == 500000000 && $mtime == 500000001) ! || $wd =~ m#/afs/# || $^O eq 'amigaos') {print "ok 18\n";} else --- 79,83 ---- if ($ino) {print "ok 17\n";} else {print "not ok 17\n";} if (($atime == 500000000 && $mtime == 500000001) ! || $wd =~ m#/afs/# || $^O eq 'amigaos' || $Is_Dos) {print "ok 18\n";} else *************** *** 121,126 **** --- 123,134 ---- print FH "helloworld\n"; truncate FH, 5; + if ($Is_Dos) { + close (FH); open (FH, ">>Iofs.tmp") or die "Can't reopen Iofs.tmp"; + } if (-s "Iofs.tmp" == 5) {print "ok 25\n"} else {print "not ok 25\n"} truncate FH, 0; + if ($Is_Dos) { + close (FH); open (FH, ">>Iofs.tmp") or die "Can't reopen Iofs.tmp"; + } if (-z "Iofs.tmp") {print "ok 26\n"} else {print "not ok 26\n"} close FH; diff -C 2 -P -b -r perl5.004_02.ori/t/lib/anydbm.t perl5.004_02/t/lib/anydbm.t *** perl5.004_02.ori/t/lib/anydbm.t Fri Apr 4 18:03:34 1997 --- perl5.004_02/t/lib/anydbm.t Thu Aug 28 12:37:49 1997 *************** *** 23,27 **** ($Dfile) = ; } ! if ($^O eq 'amigaos' || $^O eq 'os2' || $^O eq 'MSWin32') { print "ok 2\n"; } --- 23,27 ---- ($Dfile) = ; } ! if ($^O eq 'amigaos' || $^O eq 'os2' || $^O eq 'MSWin32' || $^O eq 'dos') { print "ok 2\n"; } diff -C 2 -P -b -r perl5.004_02.ori/t/lib/filehand.t perl5.004_02/t/lib/filehand.t *** perl5.004_02.ori/t/lib/filehand.t Tue Aug 5 15:38:36 1997 --- perl5.004_02/t/lib/filehand.t Thu Aug 28 12:37:56 1997 *************** *** 65,68 **** --- 65,74 ---- print "ok 10\n"; + if ($^O eq 'dos') + { + printf("ok %d\n",11); + exit(0); + } + ($rd,$wr) = FileHandle::pipe; diff -C 2 -P -b -r perl5.004_02.ori/t/lib/gdbm.t perl5.004_02/t/lib/gdbm.t *** perl5.004_02.ori/t/lib/gdbm.t Fri Aug 1 17:06:36 1997 --- perl5.004_02/t/lib/gdbm.t Thu Aug 28 12:38:07 1997 *************** *** 25,29 **** ($Dfile) = ; } ! if ($^O eq 'amigaos' || $^O eq 'os2' || $^O eq 'MSWin32') { print "ok 2\n"; } --- 25,29 ---- ($Dfile) = ; } ! if ($^O eq 'amigaos' || $^O eq 'os2' || $^O eq 'MSWin32' || $^O eq 'dos') { print "ok 2\n"; } diff -C 2 -P -b -r perl5.004_02.ori/t/lib/io_sel.t perl5.004_02/t/lib/io_sel.t *** perl5.004_02.ori/t/lib/io_sel.t Fri Mar 21 03:50:33 1997 --- perl5.004_02/t/lib/io_sel.t Thu Aug 28 12:38:12 1997 *************** *** 50,54 **** print "ok 9\n"; ! if ($^O eq 'MSWin32') { # 4-arg select is only valid on sockets print "# skipping tests 10..15\n"; for (10 .. 15) { print "ok $_\n" } --- 50,54 ---- print "ok 9\n"; ! if ($^O eq 'MSWin32' || $^O eq 'dos') { # 4-arg select is only valid on sockets print "# skipping tests 10..15\n"; for (10 .. 15) { print "ok $_\n" } diff -C 2 -P -b -r perl5.004_02.ori/t/lib/sdbm.t perl5.004_02/t/lib/sdbm.t *** perl5.004_02.ori/t/lib/sdbm.t Fri Aug 1 17:06:36 1997 --- perl5.004_02/t/lib/sdbm.t Thu Aug 28 12:38:17 1997 *************** *** 28,32 **** ($Dfile) = ; } ! if ($^O eq 'amigaos' || $^O eq 'os2' || $^O eq 'MSWin32') { print "ok 2\n"; } --- 28,32 ---- ($Dfile) = ; } ! if ($^O eq 'amigaos' || $^O eq 'os2' || $^O eq 'MSWin32' || $^O eq 'dos') { print "ok 2\n"; } diff -C 2 -P -b -r perl5.004_02.ori/t/op/magic.t perl5.004_02/t/op/magic.t *** perl5.004_02.ori/t/op/magic.t Fri Aug 1 00:48:24 1997 --- perl5.004_02/t/op/magic.t Thu Aug 28 12:37:12 1997 *************** *** 22,32 **** $Is_MSWin32 = $^O eq 'MSWin32'; $Is_VMS = $^O eq 'VMS'; $PERL = ($Is_MSWin32 ? '.\perl' : './perl'); print "1..30\n"; ! eval '$ENV{"foo"} = "hi there";'; # check that ENV is inited inside eval ! if ($Is_MSWin32) { ok 1, `cmd /x /c set foo` eq "foo=hi there\n"; } ! else { ok 1, `echo \$foo` eq "hi there\n"; } unlink 'ajslkdfpqjsjfk'; --- 22,33 ---- $Is_MSWin32 = $^O eq 'MSWin32'; $Is_VMS = $^O eq 'VMS'; + $Is_Dos = $^O eq 'dos'; $PERL = ($Is_MSWin32 ? '.\perl' : './perl'); print "1..30\n"; ! eval '$ENV{"FOO"} = "hi there";'; # check that ENV is inited inside eval ! if ($Is_MSWin32) { ok 1, `cmd /x /c set FOO` eq "FOO=hi there\n"; } ! else { ok 1, `echo \$FOO` eq "hi there\n"; } unlink 'ajslkdfpqjsjfk'; *************** *** 36,40 **** close FOO; # just mention it, squelch used-only-once ! if ($Is_MSWin32) { ok 3,1; ok 4,1; --- 37,41 ---- close FOO; # just mention it, squelch used-only-once ! if ($Is_MSWin32 || $Is_Dos) { ok 3,1; ok 4,1; *************** *** 149,156 **** --- 150,159 ---- ok 22, chmod(0755, $script), $!; $_ = `$script`; + s/.exe//i if $Is_Dos; s{\bminiperl\b}{perl}; # so that test doesn't fail with miniperl s{is perl}{is $perl}; # for systems where $^X is only a basename ok 23, ($Is_MSWin32 ? uc($_) eq uc($s2) : $_ eq $s2), ":$_:!=:$s2:"; $_ = `$perl $script`; + s/.exe//i if $Is_Dos; ok 24, ($Is_MSWin32 ? uc($_) eq uc($s1) : $_ eq $s1), ":$_:!=:$s1: after `$perl $script`"; ok 25, unlink($script), $!; *************** *** 162,166 **** ok 28, $^T > 850000000, $^T; ! if ($Is_VMS) { ok 29, 1; ok 30, 1; --- 165,169 ---- ok 28, $^T > 850000000, $^T; ! if ($Is_VMS || $Is_Dos) { ok 29, 1; ok 30, 1; diff -C 2 -P -b -r perl5.004_02.ori/t/op/stat.t perl5.004_02/t/op/stat.t *** perl5.004_02.ori/t/op/stat.t Tue Aug 5 15:31:35 1997 --- perl5.004_02/t/op/stat.t Thu Aug 28 12:37:29 1997 *************** *** 13,19 **** $Is_MSWin32 = $^O eq 'MSWin32'; chop($cwd = ($Is_MSWin32 ? `cd` : `pwd`)); ! $DEV = `ls -l /dev` unless $Is_MSWin32; unlink "Op.stat.tmp"; --- 13,20 ---- $Is_MSWin32 = $^O eq 'MSWin32'; + $Is_Dos = $^O eq 'dos'; chop($cwd = ($Is_MSWin32 ? `cd` : `pwd`)); ! $DEV = `ls -l /dev` unless ($Is_MSWin32 || $Is_Dos); unlink "Op.stat.tmp"; *************** *** 21,25 **** # hack to make Apollo update link count: ! $junk = `ls Op.stat.tmp` unless $Is_MSWin32; ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, --- 22,26 ---- # hack to make Apollo update link count: ! $junk = `ls Op.stat.tmp` unless ($Is_MSWin32 || $Is_Dos); ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, *************** *** 34,38 **** sleep 2; ! if ($Is_MSWin32) { unlink "Op.stat.tmp2" } else { `rm -f Op.stat.tmp2;ln Op.stat.tmp Op.stat.tmp2; chmod 644 Op.stat.tmp`; --- 35,39 ---- sleep 2; ! if ($Is_MSWin32 || $Is_Dos) { unlink "Op.stat.tmp2" } else { `rm -f Op.stat.tmp2;ln Op.stat.tmp Op.stat.tmp2; chmod 644 Op.stat.tmp`; *************** *** 42,49 **** $blksize,$blocks) = stat('Op.stat.tmp'); ! if ($Is_MSWin32 || $Config{dont_use_nlink} || $nlink == 2) {print "ok 3\n";} else {print "# \$nlink is |$nlink|\nnot ok 3\n";} ! if ($Is_MSWin32 || ($mtime && $mtime != $ctime) || $cwd =~ m#/afs/# || $^O eq 'amigaos') { print "ok 4\n"; } --- 43,50 ---- $blksize,$blocks) = stat('Op.stat.tmp'); ! if ($Is_MSWin32 || $Is_Dos || $Config{dont_use_nlink} || $nlink == 2) {print "ok 3\n";} else {print "# \$nlink is |$nlink|\nnot ok 3\n";} ! if ($Is_MSWin32 || $Is_Dos || ($mtime && $mtime != $ctime) || $cwd =~ m#/afs/# || $^O eq 'amigaos') { print "ok 4\n"; } *************** *** 71,75 **** chmod 0,'Op.stat.tmp'; eval '$> = 1;'; # so switch uid (may not be implemented) ! if (!$> || ! -r 'Op.stat.tmp') {print "ok 9\n";} else {print "not ok 9\n";} if (!$> || ! -w 'Op.stat.tmp') {print "ok 10\n";} else {print "not ok 10\n";} eval '$> = $olduid;'; # switch uid back (may not be implemented) --- 72,76 ---- chmod 0,'Op.stat.tmp'; eval '$> = 1;'; # so switch uid (may not be implemented) ! if (!$> || $Is_Dos || ! -r 'Op.stat.tmp') {print "ok 9\n";} else {print "not ok 9\n";} if (!$> || ! -w 'Op.stat.tmp') {print "ok 10\n";} else {print "not ok 10\n";} eval '$> = $olduid;'; # switch uid back (may not be implemented) *************** *** 86,90 **** if (-r 'Op.stat.tmp') {print "ok 18\n";} else {print "not ok 18\n";} if (-w 'Op.stat.tmp') {print "ok 19\n";} else {print "not ok 19\n";} ! if ($Is_MSWin32 or -x 'Op.stat.tmp') {print "ok 20\n";} else {print "not ok 20\n";} if (-f 'Op.stat.tmp') {print "ok 21\n";} else {print "not ok 21\n";} --- 87,91 ---- if (-r 'Op.stat.tmp') {print "ok 18\n";} else {print "not ok 18\n";} if (-w 'Op.stat.tmp') {print "ok 19\n";} else {print "not ok 19\n";} ! if ($Is_MSWin32 or $Is_Dos or -x 'Op.stat.tmp') {print "ok 20\n";} else {print "not ok 20\n";} if (-f 'Op.stat.tmp') {print "ok 21\n";} else {print "not ok 21\n";} *************** *** 94,98 **** if (! -f '.') {print "ok 24\n";} else {print "not ok 24\n";} ! if (!$Is_MSWin32 and `ls -l perl` =~ /^l.*->/) { if (-l 'perl') {print "ok 25\n";} else {print "not ok 25\n";} } --- 95,99 ---- if (! -f '.') {print "ok 24\n";} else {print "not ok 24\n";} ! if (!($Is_MSWin32 || $Is_Dos) and `ls -l perl` =~ /^l.*->/) { if (-l 'perl') {print "ok 25\n";} else {print "not ok 25\n";} } *************** *** 107,111 **** if (! -e 'Op.stat.tmp') {print "ok 28\n";} else {print "not ok 28\n";} ! if ($Is_MSWin32) {print "ok 29\n";} elsif ($DEV !~ /\nc.* (\S+)\n/) --- 108,112 ---- if (! -e 'Op.stat.tmp') {print "ok 28\n";} else {print "not ok 28\n";} ! if ($Is_MSWin32 || $Is_Dos) {print "ok 29\n";} elsif ($DEV !~ /\nc.* (\S+)\n/) *************** *** 117,121 **** if (! -c '.') {print "ok 30\n";} else {print "not ok 30\n";} ! if ($Is_MSWin32) {print "ok 31\n";} elsif ($DEV !~ /\ns.* (\S+)\n/) --- 118,122 ---- if (! -c '.') {print "ok 30\n";} else {print "not ok 30\n";} ! if ($Is_MSWin32 || $Is_Dos) {print "ok 31\n";} elsif ($DEV !~ /\ns.* (\S+)\n/) *************** *** 127,131 **** if (! -S '.') {print "ok 32\n";} else {print "not ok 32\n";} ! if ($Is_MSWin32) {print "ok 33\n";} elsif ($DEV !~ /\nb.* (\S+)\n/) --- 128,132 ---- if (! -S '.') {print "ok 32\n";} else {print "not ok 32\n";} ! if ($Is_MSWin32 || $Is_Dos) {print "ok 33\n";} elsif ($DEV !~ /\nb.* (\S+)\n/) *************** *** 137,141 **** if (! -b '.') {print "ok 34\n";} else {print "not ok 34\n";} ! if ($^O eq 'amigaos' or $Is_MSWin32) {print "ok 35\n"; goto tty_test;} $cnt = $uid = 0; --- 138,142 ---- if (! -b '.') {print "ok 34\n";} else {print "not ok 34\n";} ! if ($^O eq 'amigaos' or $Is_MSWin32 || $Is_Dos) {print "ok 35\n"; goto tty_test;} $cnt = $uid = 0; diff -C 2 -P -b -r perl5.004_02.ori/t/op/sysio.t perl5.004_02/t/op/sysio.t *** perl5.004_02.ori/t/op/sysio.t Fri Apr 18 18:08:19 1997 --- perl5.004_02/t/op/sysio.t Thu Aug 28 12:37:37 1997 *************** *** 7,11 **** open(I, 'sysio.t') || die "sysio.t: cannot find myself: $!"; ! $reopen = ($^O eq 'VMS' || $^O eq 'os2' || $^O eq 'MSWin32'); $x = 'abc'; --- 7,11 ---- open(I, 'sysio.t') || die "sysio.t: cannot find myself: $!"; ! $reopen = ($^O eq 'VMS' || $^O eq 'os2' || $^O eq 'MSWin32' || $^O eq 'dos'); $x = 'abc'; diff -C 2 -P -b -r perl5.004_02.ori/t/op/taint.t perl5.004_02/t/op/taint.t *** perl5.004_02.ori/t/op/taint.t Fri Jun 13 16:14:49 1997 --- perl5.004_02/t/op/taint.t Thu Aug 28 12:37:43 1997 *************** *** 18,21 **** --- 18,22 ---- my $Is_VMS = $^O eq 'VMS'; my $Is_MSWin32 = $^O eq 'MSWin32'; + my $Is_Dos = $^O eq 'dos'; my $Invoke_Perl = $Is_VMS ? 'MCR Sys$Disk:[]Perl.' : $Is_MSWin32 ? '.\perl' : './perl'; *************** *** 97,101 **** test 1, eval { `$echo 1` } eq "1\n"; ! if ($Is_MSWin32 || $Is_VMS) { print "# Environment tainting tests skipped\n"; for (2..5) { print "ok $_\n" } --- 98,102 ---- test 1, eval { `$echo 1` } eq "1\n"; ! if ($Is_MSWin32 || $Is_VMS || $Is_Dos) { print "# Environment tainting tests skipped\n"; for (2..5) { print "ok $_\n" } *************** *** 121,125 **** my $tmp; ! if ($^O eq 'os2' || $^O eq 'amigaos' || $Is_MSWin32) { print "# all directories are writeable\n"; } --- 122,126 ---- my $tmp; ! if ($^O eq 'os2' || $^O eq 'amigaos' || $Is_MSWin32 || $Is_Dos) { print "# all directories are writeable\n"; } *************** *** 350,354 **** test 65, eval { open FOO, $foo } eq '', 'open for read'; test 66, $@ eq '', $@; # NB: This should be allowed ! test 67, $! == 2; # File not found test 68, eval { open FOO, "> $foo" } eq '', 'open for write'; --- 351,355 ---- test 65, eval { open FOO, $foo } eq '', 'open for read'; test 66, $@ eq '', $@; # NB: This should be allowed ! test 67, $! == ($Config{"archname"} ne "djgpp" ? 2 : 22); # File not found test 68, eval { open FOO, "> $foo" } eq '', 'open for write'; diff -C 2 -P -b -r perl5.004_02.ori/utils/perldoc.PL perl5.004_02/utils/perldoc.PL *** perl5.004_02.ori/utils/perldoc.PL Tue Jul 29 02:23:32 1997 --- perl5.004_02/utils/perldoc.PL Sun Oct 5 18:16:56 1997 *************** *** 61,64 **** --- 61,65 ---- $Is_VMS = $^O eq 'VMS'; $Is_MSWin32 = $^O eq 'MSWin32'; + $Is_Dos = $^O eq 'dos'; sub usage{ *************** *** 107,111 **** if ($opt_t + $opt_u + $opt_m + $opt_l > 1) { usage("only one of -t, -u, -m or -l") ! } elsif ($Is_MSWin32) { $opt_t = 1 unless $opt_t + $opt_u + $opt_m + $opt_l; } --- 108,112 ---- if ($opt_t + $opt_u + $opt_m + $opt_l > 1) { usage("only one of -t, -u, -m or -l") ! } elsif ($Is_MSWin32 || $Is_Dos) { $opt_t = 1 unless $opt_t + $opt_u + $opt_m + $opt_l; } *************** *** 138,142 **** my($file) = @_; # on a case-forgiving file system we can simply use -f $file ! if ($Is_VMS or $Is_MSWin32 or $^O eq 'os2') { return ( -f $file ) ? $file : ''; } --- 139,143 ---- my($file) = @_; # on a case-forgiving file system we can simply use -f $file ! if ($Is_VMS or $Is_MSWin32 or $Is_Dos or $^O eq 'os2') { return ( -f $file ) ? $file : ''; } *************** *** 187,191 **** or ( $^O eq 'os2' and $ret = minus_f_nocase "$dir/$s.cmd" and containspod($ret)) ! or ( ($Is_MSWin32 or $^O eq 'os2') and $ret = minus_f_nocase "$dir/$s.bat" and containspod($ret)) or ( $ret = minus_f_nocase "$dir/pod/$s.pod") --- 188,192 ---- or ( $^O eq 'os2' and $ret = minus_f_nocase "$dir/$s.cmd" and containspod($ret)) ! or ( ($Is_MSWin32 or $Is_Dos or $^O eq 'os2') and $ret = minus_f_nocase "$dir/$s.bat" and containspod($ret)) or ( $ret = minus_f_nocase "$dir/pod/$s.pod") *************** *** 260,263 **** --- 261,269 ---- $tmp = 'Sys$Scratch:perldoc.tmp1_'.$$; push @pagers, qw( most more less type/page ); + } elsif ($Is_Dos) { + $tmp = "$ENV{TEMP}/perldoc1.$$"; + $tmp =~ tr!\\/!//!s; + push @pagers, qw( less.exe more.com< ); + unshift @pagers, $ENV{PAGER} if $ENV{PAGER}; } else { if ($^O eq 'os2') {