A couple of __BORLAND__ related code in toke.c is now obsolete due to PerlIO
layers, and, moreover, causes in tainting of memory with following core
dump, because it uses direct mention of "FILE*". Following patch fixes this.
Also I'm inserting a couple of changes into win32 makefiles and
configuration files which, in my opinion, will increase a consistency.

diff -u -r perl@8671-orig/toke.c perl@8671/toke.c
--- perl@8671-orig/toke.c Mon Jan 29 18:34:27 2001
+++ perl@8671/toke.c Sun Feb 04 23:42:22 2001
@@ -4170,10 +4170,6 @@
    (void)PerlIO_seek(PL_rsfp, 0L, 0);
       }
       if (PerlLIO_setmode(PerlIO_fileno(PL_rsfp), O_TEXT) != -1) {
-#if defined(__BORLANDC__)
-   /* XXX see note in do_binmode() */
-   ((FILE*)PL_rsfp)->flags |= _F_BIN;
-#endif
    if (loc > 0)
        PerlIO_seek(PL_rsfp, loc, 0);
       }
diff -u -r perl@8671-orig/win32/Makefile perl@8671/win32/Makefile
--- perl@8671-orig/win32/Makefile Fri Feb 02 01:34:32 2001
+++ perl@8671/win32/Makefile Mon Feb 05 01:20:02 2001
@@ -66,9 +66,7 @@

 #
 # uncomment to enable the experimental PerlIO I/O subsystem.
-# This is currently incompatible with USE_MULTI, USE_ITHREADS,
-# and USE_IMP_SYS
-#USE_PERLIO = define
+USE_PERLIO = define

 #
 # WARNING! This option is deprecated and will eventually go away (enable
@@ -247,6 +245,10 @@
 USE_IMP_SYS = undef
 !ENDIF

+!IF "$(USE_PERLIO)" == ""
+USE_PERLIO = undef
+!ENDIF
+
 !IF "$(USE_PERLCRT)" == ""
 USE_PERLCRT = undef
 !ENDIF
@@ -729,6 +731,7 @@
   "useithreads=$(USE_ITHREADS)"  \
   "usethreads=$(USE_5005THREADS)"  \
   "usemultiplicity=$(USE_MULTI)"  \
+  "useperlio=$(USE_PERLIO)"  \
   "LINK_FLAGS=$(LINK_FLAGS:"=\")"  \
   "optimize=$(OPTIMIZE:"=\")"

Only in perl@8671/win32: a.pl
Only in perl@8671-orig/win32/bin: mdelete.bat
diff -u -r perl@8671-orig/win32/config.bc perl@8671/win32/config.bc
--- perl@8671-orig/win32/config.bc Fri Feb 02 01:03:40 2001
+++ perl@8671/win32/config.bc Sun Jan 21 04:06:40 2001
@@ -770,7 +770,7 @@
 usemymalloc='n'
 usenm='false'
 useopcode='true'
-useperlio='undef'
+useperlio='~USE_PERLIO~'
 useposix='true'
 usesfio='false'
 useshrplib='yes'
diff -u -r perl@8671-orig/win32/config.gc perl@8671/win32/config.gc
--- perl@8671-orig/win32/config.gc Fri Feb 02 01:03:40 2001
+++ perl@8671/win32/config.gc Mon Feb 05 01:14:11 2001
@@ -770,7 +770,7 @@
 usemymalloc='n'
 usenm='false'
 useopcode='true'
-useperlio='define'
+useperlio='~USE_PERLIO~'
 useposix='true'
 usesfio='false'
 useshrplib='yes'
Only in perl@8671/win32: config.h
diff -u -r perl@8671-orig/win32/config.vc perl@8671/win32/config.vc
--- perl@8671-orig/win32/config.vc Fri Feb 02 01:03:40 2001
+++ perl@8671/win32/config.vc Mon Feb 05 01:21:00 2001
@@ -770,7 +770,7 @@
 usemymalloc='n'
 usenm='false'
 useopcode='true'
-useperlio='define'
+useperlio='~USE_PERLIO~'
 useposix='true'
 usesfio='false'
 useshrplib='yes'
Only in perl@8671/win32: config.w32
diff -u -r perl@8671-orig/win32/config_H.bc perl@8671/win32/config_H.bc
--- perl@8671-orig/win32/config_H.bc Sun Jan 28 21:28:03 2001
+++ perl@8671/win32/config_H.bc Sun Jan 21 03:10:17 2001
@@ -3123,7 +3123,7 @@
  * used in a fully backward compatible manner.
  */
 #ifndef USE_PERLIO
-/*#define USE_PERLIO  /**/
+#define USE_PERLIO  /**/
 #endif

 /* USE_SOCKS:
diff -u -r perl@8671-orig/win32/makefile.mk perl@8671/win32/makefile.mk
--- perl@8671-orig/win32/makefile.mk Fri Feb 02 01:34:32 2001
+++ perl@8671/win32/makefile.mk Mon Feb 05 01:20:25 2001
@@ -67,6 +67,10 @@
 USE_IMP_SYS *= define

 #
+# uncomment to enable the experimental PerlIO I/O subsystem.
+USE_PERLIO = define
+
+#
 # WARNING! This option is deprecated and will eventually go away (enable
 # USE_ITHREADS instead).
 #
@@ -248,6 +252,7 @@
 USE_OBJECT *= undef
 USE_ITHREADS *= undef
 USE_IMP_SYS *= undef
+USE_PERLIO *= undef
 USE_PERLCRT *= undef

 .IF "$(USE_IMP_SYS)$(USE_MULTI)$(USE_5005THREADS)$(USE_OBJECT)" ==
"defineundefundefundef"
@@ -278,6 +283,11 @@
 .ELIF "$(USE_MULTI)" == "define"
 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-multi
 .ELSE
+.IF "$(USE_PERLIO)" == "define"
+ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-perlio
+.ELSE
+ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
+.ENDIF
 ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
 .ENDIF

@@ -862,6 +872,7 @@
   useithreads=$(USE_ITHREADS) ~ \
   usethreads=$(USE_5005THREADS) ~ \
   usemultiplicity=$(USE_MULTI) ~ \
+  useperlio=$(USE_PERLIO)  ~ \
   LINK_FLAGS=$(LINK_FLAGS:s/\/\\/)  ~ \
   optimize=$(OPTIMIZE)



Vadim.

Reply via email to