Change 19657 by [EMAIL PROTECTED] on 2003/06/02 08:54:04

        Stick with the original (5.8.0) logic.

Affected files ...

... //depot/perl/op.c#566 edit

Differences ...

==== //depot/perl/op.c#566 (text) ====
Index: perl/op.c
--- perl/op.c#565~19656~        Mon Jun  2 01:28:51 2003
+++ perl/op.c   Mon Jun  2 01:54:04 2003
@@ -6520,7 +6520,16 @@
 #ifdef PERL_EXTERNAL_GLOB
      /* File::Temp pulls in Fcntl, which may not be available with
       *  e.g. miniperl, use mkstemp() or stdio tmpfile() instead. */
-#   ifdef HAS_MKSTEMP
+#   if defined(WIN32) || !defined(HAS_MKSTEMP)
+     FILE *stdio = PerlSIO_tmpfile();
+     if (stdio) {
+         if ((f = PerlIO_push(aTHX_(PerlIO_allocate(aTHX)),
+                              &PerlIO_stdio, "w+", Nullsv))) {
+              PerlIOStdio *s = PerlIOSelf(f, PerlIOStdio);
+              s->stdio = stdio;
+         }
+     }
+#   else /* !WIN32 && HAS_MKSTEMP */
      SV *sv = newSVpv("/tmp/PerlIO_XXXXXX", 0);
      fd = mkstemp(SvPVX(sv));
      if (fd >= 0) {
@@ -6530,16 +6539,7 @@
               SvREFCNT_dec(sv);
          }
      }
-#   else
-     FILE *stdio = PerlSIO_tmpfile();
-     if (stdio) {
-         if ((f = PerlIO_push(aTHX_(PerlIO_allocate(aTHX)),
-                              &PerlIO_stdio, "w+", Nullsv))) {
-              PerlIOStdio *s = PerlIOSelf(f, PerlIOStdio);
-              s->stdio = stdio;
-         }
-     }
-#   endif /* HAS_MKSTEMP */
+#   endif /* WIN32 || !HAS_MKSTEMP */
 #else
      /* We have internal glob, which probably also means that we 
       * can also use File::Temp (which uses Fcntl) with impunity. */
End of Patch.

Reply via email to