summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Zakharevich <ilya@math.berkeley.edu>1999-05-28 08:13:00 -0400
committerJarkko Hietaniemi <jhi@iki.fi>1999-05-28 16:50:54 +0000
commitd6a255e6be67358d1e8a71b939edbfc895ee4fa6 (patch)
tree9ca6b9b4ba46c2b2a496cda3e0b83c68e1fc98d6
parent4435c47799d17bebb53fa0fbe063f550be95a17c (diff)
downloadperl-d6a255e6be67358d1e8a71b939edbfc895ee4fa6.tar.gz
Cosmetic OS/2-related patches
To: perl5-porters@perl.org (Mailing list Perl5) Message-Id: <199905281613.MAA02048@monk.mps.ohio-state.edu> p4raw-id: //depot/cfgperl@3497
-rw-r--r--MANIFEST1
-rw-r--r--Makefile.SH17
-rw-r--r--ext/POSIX/POSIX.xs8
-rw-r--r--hints/os2.sh49
-rw-r--r--os2/Makefile.SHs8
-rwxr-xr-xt/io/pipe.t2
-rwxr-xr-xt/lib/io_sock.t2
7 files changed, 76 insertions, 11 deletions
diff --git a/MANIFEST b/MANIFEST
index 52c0e71d2b..c2a06e2b35 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -907,7 +907,6 @@ os2/OS2/REXX/t/rx_tievar.t DLL access module
os2/OS2/REXX/t/rx_tieydb.t DLL access module
os2/OS2/REXX/t/rx_varset.t DLL access module
os2/OS2/REXX/t/rx_vrexx.t DLL access module
-os2/POSIX.mkfifo POSIX.xs patch
os2/diff.configure Patches to Configure
os2/dl_os2.c Addon for dl_open
os2/dlfcn.h Addon for dl_open
diff --git a/Makefile.SH b/Makefile.SH
index aa0e3f278e..a740419572 100644
--- a/Makefile.SH
+++ b/Makefile.SH
@@ -605,7 +605,9 @@ depend: makedepend
makedepend: makedepend.SH config.sh
sh ./makedepend.SH
-test-prep: miniperl perl preplibrary utilities $(dynamic_ext) $(nonxs_ext)
+# Cannot delegate rebuilding of t/perl to make to allow interlaced
+# test and minitest
+test-prep: miniperl perl preplibrary utilities $(dynamic_ext) $(nonxs_ext) $(TEST_PERL_DLL)
cd t && (rm -f perl$(EXE_EXT); $(LNS) ../perl$(EXE_EXT) perl$(EXE_EXT))
# Second branch is for testing without a tty or controling terminal.
@@ -672,11 +674,18 @@ elc: emacs/cperl-mode.elc
emacs/cperl-mode.elc: emacs/cperl-mode.el
-cd emacs; emacs -batch -q -no-site-file -f batch-byte-compile cperl-mode.el
-etags: emacs/cperl-mode.elc
+etags: TAGS
+
+TAGS: emacs/cperl-mode.elc
sh emacs/ptags
- perl emacs/e2ctags.pl TAGS > tags
-ctags: etags
+ctags: tags
+
+# Let's hope make will not go into an infinite loop on case-unsensitive systems
+# This may also fail if . is in the head of the path, since perl will
+# require -Ilib
+tags: TAGS
+ perl emacs/e2ctags.pl TAGS > tags
# AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
# If this runs make out of memory, delete /usr/include lines.
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs
index 80e92ff2fc..4a5a2a0743 100644
--- a/ext/POSIX/POSIX.xs
+++ b/ext/POSIX/POSIX.xs
@@ -138,8 +138,12 @@
#else
# ifndef HAS_MKFIFO
-# ifndef mkfifo
-# define mkfifo(path, mode) (mknod((path), (mode) | S_IFIFO, 0))
+# ifdef OS2
+# define mkfifo(a,b) not_here("mkfifo")
+# else /* !( defined OS2 ) */
+# ifndef mkfifo
+# define mkfifo(path, mode) (mknod((path), (mode) | S_IFIFO, 0))
+# endif
# endif
# endif /* !HAS_MKFIFO */
diff --git a/hints/os2.sh b/hints/os2.sh
index 5365522c5a..e49ab7f124 100644
--- a/hints/os2.sh
+++ b/hints/os2.sh
@@ -257,9 +257,56 @@ d_setprior='define'
# Commented:
#startsh='extproc ksh\\n#! sh'
+# Find patch:
+gnupatch='patch'
+if (gnupatch -v || gnupatch --version) 2>&1 >/dev/null; then
+ gnupatch=gnupatch
+else
+ if (gpatch -v || gpatch --version) 2>&1 >/dev/null; then
+ gnupatch=gpatch
+ else
+ # They may have a special PATH during configuring
+ if (patch -v || patch --version) 2>&1 >/dev/null; then
+ gnupatch="`./UU/loc patch.exe undef $pth`"
+ fi
+ fi
+fi
+
+# Apply patches if needed
+case "$0$running_c_cmd" in
+ *[/\\]Configure|*[/\\]Configure.|Configure|Configure.) # Skip Configure.cmd
+ if grep "^libnames" ./Configure > /dev/null; then
+ # Not patched!
+ if test -f ./Configure.cmd ; then
+ echo "!!!" >&2
+ echo "!!! ./Configure not patched, but ./Configure.cmd exits" >&2
+ echo "!!! Do not know what to do!" >&2
+ echo "!!!" >&2
+ exit 2
+ fi
+ echo "!!!" >&2
+ echo "!!! You did not patch ./Configure!" >&2
+ echo "!!! I create Configure.cmd and patch it from ./os2/diff.configure." >&2
+ echo "!!!" >&2
+ echo "$gnupatch -b -p1 --output=Configure.cmd <./os2/diff.configure 2>&1 | tee 00_auto_patch" >&2
+ ($gnupatch -b -p1 --output=Configure.cmd <./os2/diff.configure 2>&1 | tee 00_auto_patch) >&2
+ echo "!!!" >&2
+ echo "!!! The report of patching is copied to 00_auto_patch." >&2
+ echo "!!! Now you need to restart Configure.cmd with all the options" >&2
+ echo "!!!" >&2
+ echo "extproc sh" > Configure.ctm
+ cat Configure.cmd >> Configure.ctm && mv -f Configure.ctm Configure.cmd
+ exit 0
+ else
+ echo "!!! Apparently we are running a patched Configure." >&2
+ fi
+ ;;
+ *) echo "!!! Apparently we are running a renamed Configure: '$0'." >&2
+esac
+
# Copy pod:
-cp ./README.os2 ./pod/perlos2.pod
+cp -uf ./README.os2 ./pod/perlos2.pod
# This script UU/usethreads.cbu will get 'called-back' by Configure
# after it has prompted the user for whether to use threads.
diff --git a/os2/Makefile.SHs b/os2/Makefile.SHs
index ced556af9e..c732aced9f 100644
--- a/os2/Makefile.SHs
+++ b/os2/Makefile.SHs
@@ -35,12 +35,13 @@ LD_OPT = $optimize
PERL_DLL_BASE = perl$dll_post
PERL_DLL = \$(PERL_DLL_BASE)\$(DLSUFFIX)
+TEST_PERL_DLL = perl_dll_t
CONFIG_ARGS = $config_args
!GROK!THIS!
$spitshell >>Makefile <<'!NO!SUBS!'
-$(LIBPERL): perl.imp $(PERL_DLL) perl5.def
+$(LIBPERL): perl.imp perl_dll perl5.def
emximp -o $(LIBPERL) perl.imp
$(AOUT_LIBPERL_DLL): perl.imp $(PERL_DLL) perl5.def
@@ -55,6 +56,11 @@ perl.imp: perl5.def
perl_dll: $(PERL_DLL)
+perl_dll_t: t/$(PERL_DLL)
+
+t/$(PERL_DLL): $(PERL_DLL)
+ $(LNS) $(PERL_DLL) t/$(PERL_DLL)
+
$(PERL_DLL): $(obj) perl5.def perl$(OBJ_EXT)
$(LD) $(LD_OPT) $(LDDLFLAGS) -o $@ perl$(OBJ_EXT) $(obj) $(libs) perl5.def
diff --git a/t/io/pipe.t b/t/io/pipe.t
index 1c72440478..37949c4546 100755
--- a/t/io/pipe.t
+++ b/t/io/pipe.t
@@ -61,6 +61,7 @@ if ($^O eq 'vmesa') {
exec 'echo', 'not ok 6';
}
}
+wait; # Collect from $pid
pipe(READER,WRITER) || die "Can't open pipe";
close READER;
@@ -134,7 +135,6 @@ else {
}
# check that status for the correct process is collected
-wait; # Collect from $pid
my $zombie = fork or exit 37;
my $pipe = open *FH, "sleep 2;exit 13|" or die "Open: $!\n";
$SIG{ALRM} = sub { return };
diff --git a/t/lib/io_sock.t b/t/lib/io_sock.t
index e236f5f399..782f2554c8 100755
--- a/t/lib/io_sock.t
+++ b/t/lib/io_sock.t
@@ -134,7 +134,7 @@ if($pid = fork()) {
}
# some machines seem to suffer from a race condition here
- sleep(1);
+ sleep(2);
$sock = IO::Socket::INET->new("127.0.0.1:$port");
if ($sock) {