Change 20955 by [EMAIL PROTECTED] on 2003/08/30 17:17:57
Integrate:
[ 20952]
Tweak XSLoader.t.
XSLoader is supposed to work even for extensions that
are statically linked. So only check that the extension we
test for is actually available. (This test is not supposed
to be run by miniperl.)
[ 20953]
In maint unpack is ($$), not ($;$).
[ 20954]
A new try at
Subject: [PATCH] maint / blead tweaks in perlio.c for Cygwin
From: "Gerrit P. Haase" <[EMAIL PROTECTED]>
Date: Thu, 28 Aug 2003 08:18:51 +0200
Message-ID: <[EMAIL PROTECTED]>
(this time Cygwin only)
Affected files ...
... //depot/maint-5.8/perl/ext/DynaLoader/t/XSLoader.t#2 integrate
... //depot/maint-5.8/perl/perlio.c#33 integrate
Differences ...
==== //depot/maint-5.8/perl/ext/DynaLoader/t/XSLoader.t#2 (text) ====
Index: perl/ext/DynaLoader/t/XSLoader.t
--- perl/ext/DynaLoader/t/XSLoader.t#1~20947~ Fri Aug 29 23:07:56 2003
+++ perl/ext/DynaLoader/t/XSLoader.t Sat Aug 30 10:17:57 2003
@@ -1,13 +1,8 @@
-#!/usr/bin/perl -w
+#!./perl -w
BEGIN {
- chdir 't';
+ chdir 't' if -d 't';
@INC = '../lib';
- eval 'use Fcntl';
- if ($@ =~ /dynamic loading not available/) {
- print "1..0 # Skip: no dynamic loading\n";
- exit;
- }
require Config; import Config;
if (($Config{'extensions'} !~ /\bSDBM_File\b/) && ($^O ne 'VMS')){
print "1..0 # Skip: no SDBM_File\n";
==== //depot/maint-5.8/perl/perlio.c#33 (text) ====
Index: perl/perlio.c
--- perl/perlio.c#32~20951~ Fri Aug 29 23:51:09 2003
+++ perl/perlio.c Sat Aug 30 10:17:57 2003
@@ -2609,7 +2609,7 @@
while (*mode) {
*tmode++ = *mode++;
}
-#ifdef PERLIO_USING_CRLF
+#if defined(PERLIO_USING_CRLF) || defined(__CYGWIN__)
*tmode++ = 'b';
#endif
*tmode = '\0';
@@ -2710,15 +2710,23 @@
fd = PerlLIO_open3(path, imode, perm);
}
else {
- FILE *stdio = PerlSIO_fopen(path, mode);
+ FILE *stdio;
+ bool appended = FALSE;
+#ifdef __CYGWIN__
+ /* Cygwin wants its 'b' early. */
+ appended = TRUE;
+ mode = PerlIOStdio_mode(mode, tmode);
+#endif
+ stdio = PerlSIO_fopen(path, mode);
if (stdio) {
PerlIOStdio *s;
if (!f) {
f = PerlIO_allocate(aTHX);
}
- if ((f = PerlIO_push(aTHX_ f, self,
- (mode = PerlIOStdio_mode(mode, tmode)),
- PerlIOArg))) {
+ if (!appended)
+ mode = PerlIOStdio_mode(mode, tmode);
+ f = PerlIO_push(aTHX_ f, self, mode, PerlIOArg);
+ if (f) {
s = PerlIOSelf(f, PerlIOStdio);
s->stdio = stdio;
PerlIOUnix_refcnt_inc(fileno(s->stdio));
End of Patch.