From: Gurusamy Sarathy <gsar@cpan.org>
Date: Sat, 28 Nov 1998 22:30:38 +0000 (+0000)
Subject: various tweaks; result passes all tests for normal build on Solaris;
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=35ef477370235abeea305d760b3f316d7667ba3c;p=p5sagit%2Fp5-mst-13.2.git

various tweaks; result passes all tests for normal build on Solaris;
fails two pat.t tests under USE_THREADS; io_poll.t test#3 fails on
win32 due to lack of select() that works on non-socket fds

p4raw-id: //depot/perl@2377
---

diff --git a/ext/IO/poll.c b/ext/IO/poll.c
index 50a5151..5d806b6 100644
--- a/ext/IO/poll.c
+++ b/ext/IO/poll.c
@@ -35,10 +35,7 @@
 # define POLL_EVENTS_MASK (POLL_CAN_READ | POLL_CAN_WRITE | POLL_HAS_EXCP)
 
 int
-poll(fds, nfds, timeout)
-struct pollfd *fds;
-unsigned long nfds;
-int timeout;
+poll(struct pollfd *fds, unsigned long nfds, int timeout)
 {
     int i,err;
     fd_set rfd,wfd,efd,ifd;
diff --git a/regcomp.c b/regcomp.c
index fb2993b..0915af6 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -824,10 +824,8 @@ pregcomp(char *exp, char *xend, PMOP *pm)
 	PL_reg_flags = 0;
 
     PL_regprecomp = savepvn(exp, xend - exp);
-    DEBUG_r(
-	if (!PL_colorset)
-	    reginitcolors();
-	PerlIO_printf(Perl_debug_log, "%sCompiling%s RE `%s%*s%s'\n",
+    DEBUG_r(if (!PL_colorset) reginitcolors());
+    DEBUG_r(PerlIO_printf(Perl_debug_log, "%sCompiling%s RE `%s%*s%s'\n",
 		      PL_colors[4],PL_colors[5],PL_colors[0],
 		      xend - exp, PL_regprecomp, PL_colors[1]));
     PL_regflags = pm->op_pmflags;
diff --git a/regexec.c b/regexec.c
index 173defa..770fca6 100644
--- a/regexec.c
+++ b/regexec.c
@@ -264,7 +264,8 @@ cache_re(regexp *prog)
 
 STATIC void
 restore_pos(void *arg)
-{	
+{
+    dTHR;
     if (PL_reg_eval_set) {    
 	PL_reg_magic->mg_len = PL_reg_oldpos;
 	PL_reg_eval_set = 0;
@@ -402,10 +403,8 @@ regexec_flags(register regexp *prog, char *stringarg, register char *strend,
 	    s = startpos;
     }
 
-    DEBUG_r(
-	if (!PL_colorset)
-	    reginitcolors();	
-	PerlIO_printf(Perl_debug_log, 
+    DEBUG_r(if (!PL_colorset) reginitcolors());
+    DEBUG_r(PerlIO_printf(Perl_debug_log, 
 		      "%sMatching%s `%s%.60s%s%s' against `%s%.*s%s%s'\n",
 		      PL_colors[4],PL_colors[5],PL_colors[0],
 		      prog->precomp,
diff --git a/scope.c b/scope.c
index b6c0c0a..fadc5df 100644
--- a/scope.c
+++ b/scope.c
@@ -930,8 +930,8 @@ cx_dump(PERL_CONTEXT *cx)
 		(long)cx->sb_iters);
 	PerlIO_printf(Perl_debug_log, "SB_MAXITERS = %ld\n",
 		(long)cx->sb_maxiters);
-	PerlIO_printf(Perl_debug_log, "SB_SAFEBASE = %ld\n",
-		(long)cx->sb_safebase);
+	PerlIO_printf(Perl_debug_log, "SB_RFLAGS = %ld\n",
+		(long)cx->sb_rflags);
 	PerlIO_printf(Perl_debug_log, "SB_ONCE = %ld\n",
 		(long)cx->sb_once);
 	PerlIO_printf(Perl_debug_log, "SB_ORIG = %s\n",
diff --git a/t/lib/io_multihomed.t b/t/lib/io_multihomed.t
index 20ecf6e..3d7188b 100644
--- a/t/lib/io_multihomed.t
+++ b/t/lib/io_multihomed.t
@@ -11,9 +11,10 @@ use Config;
 
 BEGIN {
     if(-d "lib" && -f "TEST") {
-        if ( ($Config{'extensions'} !~ /\bSocket\b/ ||
-              $Config{'extensions'} !~ /\bIO\b/)    &&
-              !(($^O eq 'VMS') && $Config{d_socket})) {
+        if (!$Config{'d_fork'} ||
+	    (($Config{'extensions'} !~ /\bSocket\b/ ||
+	      $Config{'extensions'} !~ /\bIO\b/) &&
+	     !(($^O eq 'VMS') && $Config{d_socket}))) {
 	    print "1..0\n";
 	    exit 0;
         }
diff --git a/win32/makefile.mk b/win32/makefile.mk
index 360bd97..e74dc68 100644
--- a/win32/makefile.mk
+++ b/win32/makefile.mk
@@ -956,7 +956,7 @@ $(DUMPER_DLL): $(PERLEXE) $(DUMPER).xs
 	..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
 	cd $(EXTDIR)\Data\$(*B) && $(MAKE)
 
-$(PEEK_DLL): $(PERLEXE) $(Peek).xs
+$(PEEK_DLL): $(PERLEXE) $(PEEK).xs
 	cd $(EXTDIR)\Devel\$(*B) && \
 	..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
 	cd $(EXTDIR)\Devel\$(*B) && $(MAKE)