From: Ilya Zakharevich Date: Fri, 1 Aug 1997 11:58:26 +0000 (+1200) Subject: Additional OS/2 patches X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d8c2d278168b862ff4120ad8e5887d37d31f858b;p=p5sagit%2Fp5-mst-13.2.git Additional OS/2 patches This is yet-another after-candidate2 -S fix: a) We enable adding extensions for -S search on OS/2 (needed for pod2man in makemaker after binary install); b) remove an extra stat(); c) Update docs; Credited: Gurusamy Sarathy [editor's note: one hunk from original patch was already applied] p5p-msgid: 199708020823.EAA19521@monk.mps.ohio-state.edu --- diff --git a/README.os2 b/README.os2 index 4cef16f..947a569 100644 --- a/README.os2 +++ b/README.os2 @@ -290,6 +290,9 @@ There are also endless possibilities to use I of *nixish shell (like F supplied in the binary distribution), you need to follow the syntax specified in L. +Note that B<-S> switch enables a search with additional extensions +F<.cmd>, F<.btm>, F<.bat>, F<.pl> as well. + =head2 Starting OS/2 (and DOS) programs under Perl This is what system() (see L), C<``> (see diff --git a/os2/Changes b/os2/Changes index 15fad97..9678ea6 100644 --- a/os2/Changes +++ b/os2/Changes @@ -143,3 +143,11 @@ after 5.003_27: environment). Known problems: $$ does not work - is 0, waitpid returns immediately, thus Perl cannot wait for completion of started programs. + +before 5.004_02: + -S switch to perl enables a search with additional extensions + .cmd, .btm, .bat, .pl as well. This means that if you have + mycmd.pl or mycmd.bat on PATH, + perl -S mycmd + will work. Perl will also look in the current directory first. + Moreover, a bug with \; in PATH being non-separator is fixed. diff --git a/perl.c b/perl.c index f1c606b..4eb69e3 100644 --- a/perl.c +++ b/perl.c @@ -1625,6 +1625,10 @@ SV *sv; # define SEARCH_EXTS ".bat", ".cmd", NULL # define MAX_EXT_LEN 4 #endif +#ifdef OS2 +# define SEARCH_EXTS ".cmd", ".btm", ".bat", ".pl", NULL +# define MAX_EXT_LEN 4 +#endif #ifdef VMS # define SEARCH_EXTS ".pl", ".com", NULL # define MAX_EXT_LEN 4