diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-12-30 05:44:21 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-12-30 05:44:21 +0000 |
commit | c39cd00800303e8967294e98aa4c427a1872a251 (patch) | |
tree | ee7d7e65e692fcdfd54f0c6a7b3746a07023aa6e /win32 | |
parent | 2dc4c65bf2b389aa184a8e8590cd1ee37ec953bc (diff) | |
download | perl-c39cd00800303e8967294e98aa4c427a1872a251.tar.gz |
enable the PERL_BINMODE_SCRIPTS behavior by default on Windows
to allow ByteLoader to work; the DATA filehandles continue to
be left open in text mode for compatibility
p4raw-id: //depot/perl@4739
Diffstat (limited to 'win32')
-rw-r--r-- | win32/Makefile | 30 | ||||
-rw-r--r-- | win32/makefile.mk | 29 | ||||
-rw-r--r-- | win32/win32.c | 25 | ||||
-rw-r--r-- | win32/win32.h | 8 |
4 files changed, 40 insertions, 52 deletions
diff --git a/win32/Makefile b/win32/Makefile index b3c6e5677f..45f71462ca 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -147,28 +147,36 @@ CCINCDIR = $(CCHOME)\include CCLIBDIR = $(CCHOME)\lib # -# additional compiler flags can be specified here. +# Additional compiler flags can be specified here. # -# Adding -DPERL_POLLUTE enables support for old symbols, at the expense of -# extreme pollution. You most probably want this if you're compiling modules -# from CPAN, or other such serious uses of this experimental perl release. -# We don't enable this by default because we want the modules to get fixed -# instead of clinging to shortcuts like this one. + +# +# This should normally be disabled. Adding -DPERL_POLLUTE enables support +# for old symbols by default, at the expense of extreme pollution. You most +# probably just want to build modules that won't compile with +# perl Makefile.PL POLLUTE=1 +# instead of enabling this. Please report such modules to the respective +# authors. # #BUILDOPT = $(BUILDOPT) -DPERL_POLLUTE # -# enable this to disable the File::Glob implementation of CORE::glob +# This should normally be disabled. Enabling it will disable the File::Glob +# implementation of CORE::glob. # #BUILDOPT = $(BUILDOPT) -DPERL_EXTERNAL_GLOB -# Enabling this causes perl to do its own CR/LF conversions, and is required -# if you want to be able to use the bytecode compiler and ByteLoader -BUILDOPT = $(BUILDOPT) -DUSE_BINMODE_SCRIPTS +# +# This should normally be disabled. Enabling it causes perl to read scripts +# in text mode (which is the 5.005 behavior) and will break ByteLoader. +#BUILDOPT = $(BUILDOPT) -DUSE_TEXTMODE_SCRIPTS -# Enabling this runs a cloned toplevel interpreter (*EXPERIMENTAL*, fails tests) +# +# This should normally be disabled. Enabling it runs a cloned toplevel +# interpreter (*EXPERIMENTAL*, fails tests) #BUILDOPT = $(BUILDOPT) -DTOP_CLONE +# # specify semicolon-separated list of extra directories that modules will # look for libraries (spaces in path names need not be quoted) # diff --git a/win32/makefile.mk b/win32/makefile.mk index 228edca8d2..ac43a1628b 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -166,26 +166,33 @@ CCINCDIR *= $(CCHOME)\include CCLIBDIR *= $(CCHOME)\lib # -# additional compiler flags can be specified here. +# Additional compiler flags can be specified here. # -# Adding -DPERL_POLLUTE enables support for old symbols, at the expense of -# extreme pollution. You most probably want this if you're compiling modules -# from CPAN, or other such serious uses of this experimental perl release. -# We don't enable this by default because we want the modules to get fixed -# instead of clinging to shortcuts like this one. + +# +# This should normally be disabled. Adding -DPERL_POLLUTE enables support +# for old symbols by default, at the expense of extreme pollution. You most +# probably just want to build modules that won't compile with +# perl Makefile.PL POLLUTE=1 +# instead of enabling this. Please report such modules to the respective +# authors. # #BUILDOPT += -DPERL_POLLUTE # -# enable this to disable the File::Glob implementation of CORE::glob +# This should normally be disabled. Enabling it will disable the File::Glob +# implementation of CORE::glob. # #BUILDOPT += -DPERL_EXTERNAL_GLOB -# Enabling this causes perl to do its own CR/LF conversions, and is required -# if you want to be able to use the bytecode compiler and ByteLoader -BUILDOPT += -DUSE_BINMODE_SCRIPTS +# +# This should normally be disabled. Enabling it causes perl to read scripts +# in text mode (which is the 5.005 behavior) and will break ByteLoader. +#BUILDOPT += -DUSE_TEXTMODE_SCRIPTS -# Enabling this runs a cloned toplevel interpreter (*EXPERIMENTAL*, fails tests) +# +# This should normally be disabled. Enabling it runs a cloned toplevel +# interpreter (*EXPERIMENTAL*, fails tests) #BUILDOPT += -DTOP_CLONE # diff --git a/win32/win32.c b/win32/win32.c index ae22a60927..53288af338 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -3688,31 +3688,6 @@ Perl_win32_init(int *argcp, char ***argvp) MALLOC_INIT; } -#ifdef USE_BINMODE_SCRIPTS - -void -win32_strip_return(SV *sv) -{ - char *s = SvPVX(sv); - char *e = s+SvCUR(sv); - char *d = s; - while (s < e) - { - if (*s == '\r' && s[1] == '\n') - { - *d++ = '\n'; - s += 2; - } - else - { - *d++ = *s++; - } - } - SvCUR_set(sv,d-SvPVX(sv)); -} - -#endif - #ifdef USE_ITHREADS # ifdef PERL_OBJECT diff --git a/win32/win32.h b/win32/win32.h index c953f5b38e..24ba7c6784 100644 --- a/win32/win32.h +++ b/win32/win32.h @@ -325,12 +325,10 @@ typedef char * caddr_t; /* In malloc.c (core address). */ #define PERL_CORE #endif -#ifdef USE_BINMODE_SCRIPTS -#define PERL_SCRIPT_MODE "rb" -EXT void win32_strip_return(struct sv *sv); +#ifdef USE_TEXTMODE_SCRIPTS +# define PERL_SCRIPT_MODE "r" #else -#define PERL_SCRIPT_MODE "r" -#define win32_strip_return(sv) NOOP +# define PERL_SCRIPT_MODE "rb" #endif /* |