This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Integrate changes #8373,8487,8544,8783 from mainline.
authorJarkko Hietaniemi <jhi@iki.fi>
Tue, 13 Feb 2001 13:58:07 +0000 (13:58 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Tue, 13 Feb 2001 13:58:07 +0000 (13:58 +0000)
Synchronize the EBCDIC platforms (os390,posix-bc,vmesa):
hints files, the dynaloading, assimilate ebcdic into util.c.

p4raw-link: @8783 on //depot/perl: a926ef6bf408292b4a3963e296e2683a36825a5e
p4raw-link: @8544 on //depot/perl: f2766b05f6136cc9e8c8812afdbe7a31657a110d
p4raw-link: @8487 on //depot/perl: ac9901e0f0bc12ad100c6e8b5f8bd40595e928ad
p4raw-link: @8373 on //depot/perl: 5f912e1cd092576e226110c9da134228d5d5cf3f

p4raw-id: //depot/maint-5.6/perl@8789
p4raw-deleted: from //depot/perl@8786 'delete in' ebcdic.c (@3697..)
p4raw-edited: from //depot/perl@8786 'edit in' MANIFEST (@8772..)
'ignore' hints/posix-bc.sh (@8412..)
p4raw-integrated: from //depot/perl@8786 'copy in'
ext/DynaLoader/dl_dllload.xs hints/os390.sh (@8544..) 'merge
in' hints/vmesa.sh (@7839..) handy.h (@8289..) util.c (@8625..)
objXSUB.h perlapi.c (@8716..) embed.h embed.pl proto.h
(@8760..)
p4raw-integrated: from //depot/perl@8544 'edit in' Makefile.SH
(@8488..) 'merge in' installperl (@8528..)

13 files changed:
MANIFEST
Makefile.SH
ebcdic.c [deleted file]
embed.h
embed.pl
handy.h
hints/os390.sh
hints/posix-bc.sh
hints/vmesa.sh
objXSUB.h
perlapi.c
proto.h
util.c

index 1634a98..9e0dc55 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -85,7 +85,6 @@ doio.c                        I/O operations
 doop.c                 Support code for various operations
 dosish.h               Some defines for MS/DOSish machines
 dump.c                 Debugging output
-ebcdic.c               EBCDIC support routines
 eg/ADB                 An adb wrapper to put in your crash dir
 eg/README              Intro to example perl scripts
 eg/cgi/RunMeFirst              Setup script for CGI examples
@@ -620,13 +619,13 @@ lib/File/DosGlob.pm       Win32 DOS-globbing module
 lib/File/Find.pm       Routines to do a find
 lib/File/Path.pm       Do things like `mkdir -p' and `rm -r'
 lib/File/Spec.pm       portable operations on file names
+lib/File/Spec/Epoc.pm  portable operations on EPOC file names
 lib/File/Spec/Functions.pm     Function interface to File::Spec object methods
 lib/File/Spec/Mac.pm   portable operations on Mac file names
 lib/File/Spec/OS2.pm   portable operations on OS2 file names
 lib/File/Spec/Unix.pm  portable operations on Unix file names
 lib/File/Spec/VMS.pm   portable operations on VMS file names
 lib/File/Spec/Win32.pm portable operations on Win32 file names
-lib/File/Spec/Epoc.pm  portable operations on EPOC file names
 lib/File/Temp.pm       create safe temporary files and file handles
 lib/File/stat.pm       By-name interface to Perl's builtin stat
 lib/FileCache.pm       Keep more files open than the system permits
@@ -1648,8 +1647,8 @@ vos/Changes               Changes made to port Perl to the VOS operating system
 vos/build.cm           VOS command macro to build Perl
 vos/compile_perl.cm    VOS command macro to build multiple version of Perl
 vos/config.alpha.def   definitions used by config.pl
-vos/config.ga.def      definitions used by config.pl
 vos/config.alpha.h     config.h for use with alpha VOS POSIX.1 support
+vos/config.ga.def      definitions used by config.pl
 vos/config.ga.h                config.h for use with generally-available VOS POSIX.1 support
 vos/config.pl          script to convert a config_h.SH to a config.h
 vos/configure_perl.cm  VOS command macro to configure perl before building
index d52bfa4..cf29842 100644 (file)
@@ -78,10 +78,10 @@ true)
                linklibperl="-L `pwd | sed 's/\/UU$//'` -Wl,+s -Wl,+b$archlibexp/CORE -lperl"
                ;;
        os390*)
-               shrpldflags='-W l,dll'
-               linklibperl='libperl.x'
-               DPERL_EXTERNAL_GLOB=''
-               ;;
+            shrpldflags='-W l,dll'
+           linklibperl='libperl.x'
+           DPERL_EXTERNAL_GLOB=''
+           ;;
        esac
        case "$ldlibpthname" in
        '') ;;
@@ -313,6 +313,8 @@ utilities:  miniperl lib/Config.pm $(plextract) FORCE
 # Apparently some makes require an action for the FORCE target.
 FORCE:
        @sh -c true
+!NO!SUBS!
+$spitshell >>Makefile <<!GROK!THIS!
 
 !NO!SUBS!
 $spitshell >>Makefile <<!GROK!THIS!
@@ -322,9 +324,15 @@ opmini\$(OBJ_EXT): op.c config.h
        \$(CCCMD) \$(PLDLFLAGS) $DPERL_EXTERNAL_GLOB opmini.c
        \$(RMS) opmini.c
 
+opmini\$(OBJ_EXT): op.c config.h
+       \$(RMS) opmini.c
+       \$(CPS) op.c opmini.c
+       \$(CCCMD) \$(PLDLFLAGS) $DPERL_EXTERNAL_GLOB opmini.c
+       \$(RMS) opmini.c
+
 !GROK!THIS!
 $spitshell >>Makefile <<'!NO!SUBS!'
-miniperlmain$(OBJ_EXT): miniperlmain.c
+miniperlmain$(OBJ_EXT): miniperlmain.c patchlevel.h
        $(CCCMD) $(PLDLFLAGS) $*.c
 
 perlmain.c: miniperlmain.c config.sh $(FIRSTMAKEFILE)
diff --git a/ebcdic.c b/ebcdic.c
deleted file mode 100644 (file)
index d86d50b..0000000
--- a/ebcdic.c
+++ /dev/null
@@ -1,41 +0,0 @@
-#include "EXTERN.h"
-#define PERL_IN_EBCDIC_C
-#include "perl.h"
-
-/* in ASCII order, not that it matters */
-static const char controllablechars[] = "?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_";
-int
-ebcdic_control(int ch)
-{
-       if (ch > 'a') {
-               char *ctlp;
-              if (islower(ch))
-                     ch = toupper(ch);
-              if ((ctlp = strchr(controllablechars, ch)) == 0) {
-                     Perl_die(aTHX_ "unrecognised control character '%c'\n", ch);
-              }
-               if (ctlp == controllablechars)
-                      return('\177'); /* DEL */
-               else
-                      return((unsigned char)(ctlp - controllablechars - 1));
-       } else { /* Want uncontrol */
-               if (ch == '\177' || ch == -1)
-                       return('?');
-               else if (ch == '\157')
-                       return('\177');
-               else if (ch == '\174')
-                       return('\000');
-               else if (ch == '^')    /* '\137' in 1047, '\260' in 819 */
-                       return('\036');
-               else if (ch == '\155')
-                       return('\037');
-               else if (0 < ch && ch < (sizeof(controllablechars) - 1))
-                       return(controllablechars[ch+1]);
-               else
-                       Perl_die(aTHX_ "invalid control request: '\\%03o'\n", ch & 0xFF);
-       }
-}
diff --git a/embed.h b/embed.h
index ca81634..58097fb 100644 (file)
--- a/embed.h
+++ b/embed.h
 #  if defined(LEAKTEST)
 #define xstat                  S_xstat
 #  endif
+#  if defined(EBCDIC)
+#define ebcdic_control         Perl_ebcdic_control
+#  endif
 #endif
 #if defined(PERL_OBJECT)
 #endif
 #  if defined(LEAKTEST)
 #define xstat(a)               S_xstat(aTHX_ a)
 #  endif
+#  if defined(EBCDIC)
+#define ebcdic_control(a)      Perl_ebcdic_control(aTHX_ a)
+#  endif
 #endif
 #if defined(PERL_OBJECT)
 #endif
 #define S_xstat                        CPerlObj::S_xstat
 #define xstat                  S_xstat
 #  endif
+#  if defined(EBCDIC)
+#define Perl_ebcdic_control    CPerlObj::Perl_ebcdic_control
+#define ebcdic_control         Perl_ebcdic_control
+#  endif
 #endif
 #if defined(PERL_OBJECT)
 #endif
index 823039f..36ef4e5 100755 (executable)
--- a/embed.pl
+++ b/embed.pl
@@ -2531,6 +2531,9 @@ s |SV*    |mess_alloc
 #  if defined(LEAKTEST)
 s      |void   |xstat          |int
 #  endif
+#  if defined(EBCDIC)
+p      |int    |ebcdic_control |int ch
+#  endif
 #endif
 
 #if defined(PERL_OBJECT)
diff --git a/handy.h b/handy.h
index aa6c408..fae08a1 100644 (file)
--- a/handy.h
+++ b/handy.h
@@ -483,7 +483,6 @@ Converts the specified character to lowercase.
 #define isBLANK_LC_utf8(c)     isBLANK(c) /* could be wrong */
 
 #ifdef EBCDIC
-EXT int ebcdic_control (int);
 #  define toCTRL(c)    ebcdic_control(c)
 #else
   /* This conversion works both ways, strangely enough. */
index 54787e8..6f4f39b 100644 (file)
@@ -139,14 +139,6 @@ case "$archname" in
 '') archname="$osname" ;;
 esac
 
-# Architecture related object files.
-# ebcdic.c contains special \cX mapping code for EBCDIC char sets.
-# Prepend your preference with Configure -Darchobs=your_preference.o.
-case "$archname" in
-'') archobjs="ebcdic.o" ;;
-*) archobjs="$archobjs ebcdic.o" ;;
-esac
-
 # We have our own cppstdin script.  This is not a variable since 
 # Configure sees the presence of the script file.
 # We put system header -D definitions in so that Configure
index 2e46b8c..6275233 100644 (file)
@@ -7,11 +7,43 @@
 #
 
 # To get ANSI C, we need to use c89, and ld does not exist
-cc='c89'
-ld='c89'
+# You can override this with Configure -Dcc=gcc -Dld=ld.
+case "$cc" in
+'') cc='c89' ;;
+esac
+case "$ld" in
+'') ld='c89' ;;
+esac
 
 # C-Flags:
-ccflags='-K enum_long,llm_case_lower,llm_keep,no_integer_overflow -DPOSIX_BC -DUSE_PURE_BISON -D_XOPEN_SOURCE_EXTENDED'
+# -DPOSIX_BC
+# -DUSE_PURE_BISON
+# -D_XOPEN_SOURCE_EXTENDED alters system headers.
+# Prepend your favorites with Configure -Dccflags=your_favorites
+case "$ccflags" in
+'') ccflags='-K enum_long,llm_case_lower,llm_keep,no_integer_overflow -DPOSIX_BC -DUSE_PURE_BISON -D_XOPEN_SOURCE_EXTENDED' ;;
+*) ccflags='$ccflags -Kenum_long,llm_case_lower,llm_keep,no_integer_overflow -DPOSIX_BC -DUSE_PURE_BISON -D_XOPEN_SOURCE_EXTENDED' ;;
+esac
+
+# ccdlflags have yet to be determined.
+#case "$ccdlflags" in
+#'') ccdlflags='-c' ;;
+#esac
+
+# cccdlflags have yet to be determined.
+#case "$cccdlflags" in
+#'') cccdlflags='' ;;
+#esac
+
+# ldflags have yet to be determined.
+#case "$ldflags" in
+#'') ldflags='' ;;
+#esac
+
+# lddlflags have yet to be determined.
+#case "$lddlflags" in
+#'') lddlflags='' ;;
+#esac
 
 # Flags on a RISC-Host (SUNRISE):
 if [ -n "`bs2cmd SHOW-SYSTEM-INFO | egrep 'HSI-ATT.*TYPE.*SR'`" ]; then
@@ -23,20 +55,40 @@ if [ -n "`bs2cmd SHOW-SYSTEM-INFO | egrep 'HSI-ATT.*TYPE.*SR'`" ]; then
 fi
 
 # Turning on optimization breaks perl (CORE-DUMP):
-optimize='none'
+# You can override this with Configure -Doptimize='-O' or somesuch.
+case "$optimize" in
+'') optimize='none' ;;
+esac
 
 # we don''t use dynamic memorys (yet):
-so='none'
-usedl='no'
-dlext='none'
+case "$so" in
+'') so='none' ;;
+esac
+
+case "$usemymalloc" in
+'') usemymalloc='n' ;;
+esac
 
 # On BS2000/Posix, libc.a does not really hold anything at all,
 # so running nm on it is pretty useless.
-usenm='no'
-
-# other Options:
-
-usemymalloc='no'
+# You can override this with Configure -Dusenm.
+case "$usenm" in
+'') usenm='false' ;;
+esac
 
-archobjs=ebcdic.o
+# Dynamic loading doesn't work on OS/390 quite yet.
+# You can override this with
+#  Configure -Dusedl -Ddlext=.so -Ddlsrc=dl_dllload.xs.
+case "$usedl" in
+'') usedl='n' ;;
+esac
+case "$dlext" in
+'') dlext='none' ;;
+esac
+#case "$dlsrc" in
+#'') dlsrc='none' ;;
+#esac
+#case "$ldlibpthname" in
+#'') ldlibpthname=LIBPATH ;;
+#esac
 
index 9172c29..0213853 100644 (file)
@@ -24,7 +24,7 @@ d_access='define'
 d_alarm='define'
 d_archlib='define'
 # randbits='15'
-archobjs="ebcdic.o vmesa.o"
+archobjs="vmesa.o"
 d_attribut='undef'
 d_bcmp='define'
 d_bcopy='define'
index 2d20aa1..0f1e918 100644 (file)
--- a/objXSUB.h
+++ b/objXSUB.h
 #if defined(PERL_IN_UTIL_C) || defined(PERL_DECL_PROT)
 #  if defined(LEAKTEST)
 #  endif
+#  if defined(EBCDIC)
+#  endif
 #endif
 #if defined(PERL_OBJECT)
 #endif
index d3dc986..a9f98db 100644 (file)
--- a/perlapi.c
+++ b/perlapi.c
@@ -4110,6 +4110,8 @@ Perl_sys_intern_init(pTHXo)
 #if defined(PERL_IN_UTIL_C) || defined(PERL_DECL_PROT)
 #  if defined(LEAKTEST)
 #  endif
+#  if defined(EBCDIC)
+#  endif
 #endif
 #if defined(PERL_OBJECT)
 #endif
diff --git a/proto.h b/proto.h
index 8710ec3..5c842d6 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -1266,6 +1266,9 @@ STATIC SV*        S_mess_alloc(pTHX);
 #  if defined(LEAKTEST)
 STATIC void    S_xstat(pTHX_ int);
 #  endif
+#  if defined(EBCDIC)
+PERL_CALLCONV int      Perl_ebcdic_control(pTHX_ int ch);
+#  endif
 #endif
 
 #if defined(PERL_OBJECT)
diff --git a/util.c b/util.c
index 8878636..b5c080d 100644 (file)
--- a/util.c
+++ b/util.c
@@ -3964,3 +3964,40 @@ Perl_report_evil_fh(pTHX_ GV *gv, IO *io, I32 op)
                        func, pars);
     }
 }
+
+#ifdef EBCDIC
+int
+Perl_ebcdic_control(pTHX_ int ch)
+{
+       if (ch > 'a') {
+               char *ctlp;
+              if (islower(ch))
+                     ch = toupper(ch);
+              if ((ctlp = strchr(controllablechars, ch)) == 0) {
+                     Perl_die(aTHX_ "unrecognised control character '%c'\n", ch);
+              }
+               if (ctlp == controllablechars)
+                      return('\177'); /* DEL */
+               else
+                      return((unsigned char)(ctlp - controllablechars - 1));
+       } else { /* Want uncontrol */
+               if (ch == '\177' || ch == -1)
+                       return('?');
+               else if (ch == '\157')
+                       return('\177');
+               else if (ch == '\174')
+                       return('\000');
+               else if (ch == '^')    /* '\137' in 1047, '\260' in 819 */
+                       return('\036');
+               else if (ch == '\155')
+                       return('\037');
+               else if (0 < ch && ch < (sizeof(controllablechars) - 1))
+                       return(controllablechars[ch+1]);
+               else
+                       Perl_die(aTHX_ "invalid control request: '\\%03o'\n", ch & 0xFF);
+       }
+}
+#endif