On Tue, 20 Feb 2001, Dorner Thomas wrote:

> Hi,
> 
> I got another one I'm not quite sure about how to solve it:
> I got got some unresolved externals due to the moved and renamed function
> ebcdic_control (now in util.c).  The linker searched for ebcdic_control but
> the function in the object was Perl_ebcdic_control.  The problem seems to be
> the toCRTL macro in handy.h.  I'm suppose the sequence "include embed.h,
> then handy.h" is the correct one but I'm not sure about it.  Could someone
> please look at it.
> 
> Btw., my quick and dirty solution was the renaming the function in the macro
> definition:
> 
> diff -ru -x *.o -x *~ perl/handy.h perl@8807/handy.h
> --- perl/handy.h      Tue Feb 20 08:54:23 2001
> +++ perl@8807/handy.h Mon Feb 19 13:12:21 2001
> @@ -483,7 +483,7 @@
>  #define isBLANK_LC_utf8(c)   isBLANK(c) /* could be wrong */
>  
>  #ifdef EBCDIC
> -#  define toCTRL(c)  ebcdic_control(c)
> +#  define toCTRL(c)  Perl_ebcdic_control(c)
>  #else
>    /* This conversion works both ways, strangely enough. */
>  #  define toCTRL(c)    (toUPPER(c) ^ 64)
> 
> Regards, Thomas

Thank you Thomas.  With the perl@8841 kit and both of your patches I was
almost able to build perl on OS/390 R2.5.  What I ultimately had to do to
help the linker with its problem resolving ebcdic_control was to remove
mention of ebcdic_control from embed.h.  I think that the proper way to do
this was via the embed.pl script like so:

--- perl/embed.pl       Sun Feb 18 16:17:35 2001
+++ ../perl/embed.pl    Tue Feb 20 15:46:08 2001
@@ -2559,9 +2559,6 @@
 #  if defined(LEAKTEST)
 s      |void   |xstat          |int
 #  endif
-#  if defined(EBCDIC)
-p      |int    |ebcdic_control |int ch
-#  endif
 #endif
 
 #if defined(PERL_OBJECT)
End of Patch.

However, I also edited the generated embed.h so that a clean build picked
up no trace of an ebcdic_control definition:

THIS IS NOT A PATCH FOR THE PUMPKING 
--- perl/embed.h        Sun Feb 18 16:18:26 2001
+++ ../perl/embed.h     Tue Feb 20 15:46:18 2001
@@ -1164,9 +1164,6 @@
 #  if defined(LEAKTEST)
 #define xstat                  S_xstat
 #  endif
-#  if defined(EBCDIC)
-#define ebcdic_control         Perl_ebcdic_control
-#  endif
 #endif
 #if defined(PERL_OBJECT)
 #endif
@@ -2646,9 +2643,6 @@
 #  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
@@ -5133,10 +5127,6 @@
 #  if defined(LEAKTEST)
 #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)
End of Hack - not a patch, regen embed.h instead.

In a separate email I'll address the matter of the <sys/fcntl.h> problem
in Configure.  BTW my `make test` results were:

Failed 14 test scripts out of 276, 94.93% okay.

Peter Prymmer



Reply via email to