Re: gmake (perl-5.8.6) fails on z/OS
--- Nicholas Clark <[EMAIL PROTECTED]> wrote: > On Thu, Jul 28, 2005 at 02:37:36AM -0700, rajarshi > das wrote: > > > However, if I change the first instance to : > > --- utf8.c 2004-11-17 18:22:09.0 > +0530 > > +++ utf8.c.22005-07-28 13:48:24.0 > +0530 > > @@ -363,6 +363,11 @@ Perl_utf8n_to_uvuni(pTHX_ U8 > *s, > > STRLEN > > warning = UTF8_WARN_EMPTY; > > goto malformed; > > } > > +#ifdef EBCDIC > > +if (uv == 0xBA) { > > + uv = NATIVE_TO_UTF(uv); > > +} > > +#endif > > > > if (UTF8_IS_INVARIANT(uv)) { > > if (retlen) > > > > This allows gmake to complete. > > Thanks for all your help on this. > > Do you have any idea *why* this change makes things > work? I havent been able to figure out why. Meanwhile I have run into something different. Again, a gmake failure due to the following change (I ran gmake with the following change as well as the one mentioned above) : --- utf8.c 2004-11-17 18:22:09.0 +0530 +++ utf8.c.32005-07-28 19:42:50.0 +0530 @@ -80,10 +80,15 @@ Perl_uvuni_to_utf8_flags(pTHX_ U8 *d, UV Perl_warner(aTHX_ packWARN(WARN_UTF8), "Unicode character 0x%04"UVxf" is illegal", uv); } +# ifdef EBCDIC +if ((uv > 0x9E && uv < 0xFE) && (UTF8_IS_INVARIANT(uv))) { +# else if (UNI_IS_INVARIANT(uv)) { +# endif *d++ = (U8)UTF_TO_NATIVE(uv); return d; } + #if defined(EBCDIC) else { STRLEN len = UNISKIP(uv); Here's a snapshot of the gmake output : -- gmake[1]: Entering directory `/usr1/perl-5.8.6/ext/Encode' Makefile out-of-date with respect to ../../lib/Config.pm Cleaning current config before rebuilding Makefile... gmake -f Makefile.old clean > /dev/null 2>&1 || /bin/sh -c true ../../miniperl "-I../../lib" "-I../../lib" Makefile.PL "INSTALLDIRS=perl" "PERL_CO RE=1" "LIBPERL_A=libperl.a" Checking if your kit is complete... Looks good ERROR from evaluation of /usr1/perl-5.8.6/ext/Encode/Byte/Makefile.PL: Perl v 32.32.32 required--this is only v5.8.6, stopped at ./Makefile.PL line 1. BEGIN failed--compilation aborted at ./Makefile.PL line 1. gmake[1]: *** [Makefile] Error 113 gmake[1]: Leaving directory `/usr1/perl-5.8.6/ext/Encode' gmake config failed, continuing anyway... gmake[1]: Entering directory `/usr1/perl-5.8.6/ext/Encode' gmake[1]: *** No rule to make target `all'. Stop. gmake[1]: Leaving directory `/usr1/perl-5.8.6/ext/Encode' gmake: *** [lib/auto/Encode/Encode.a] Error 2 Thanks, Rajarshi. > > Nicholas Clark > Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs
Re: gmake (perl-5.8.6) fails on z/OS
On Thu, Jul 28, 2005 at 02:37:36AM -0700, rajarshi das wrote: > However, if I change the first instance to : > --- utf8.c 2004-11-17 18:22:09.0 +0530 > +++ utf8.c.22005-07-28 13:48:24.0 +0530 > @@ -363,6 +363,11 @@ Perl_utf8n_to_uvuni(pTHX_ U8 *s, > STRLEN > warning = UTF8_WARN_EMPTY; > goto malformed; > } > +#ifdef EBCDIC > +if (uv == 0xBA) { > + uv = NATIVE_TO_UTF(uv); > +} > +#endif > > if (UTF8_IS_INVARIANT(uv)) { > if (retlen) > > This allows gmake to complete. > Thanks for all your help on this. Do you have any idea *why* this change makes things work? Nicholas Clark
Re: gmake (perl-5.8.6) fails on z/OS
--- rajarshi das <[EMAIL PROTECTED]> wrote: > > > --- Nicholas Clark <[EMAIL PROTECTED]> wrote: > > > On Tue, Jul 26, 2005 at 08:34:02AM -0700, rajarshi > > das wrote: > > > > > Yes, the second call to NATIVE_TO_UTF is still > > present > > > in the modified code. Typically, one wouldnt > want > > to > > > do a NATIVE_TO_UTF(NATIVE_TO_UTF(uv)) which is > > what I > > > am doing due to the second call. But does that > > make a > > > difference to miniperl ? > > > > Well, the code is linked into miniperl, so I can > > only assume that it's > > getting called. > > > > If so, does removing the second instance of > > NATIVE_TO_UTF() improve things? > No it doesnt. The same error messages are generated. > However, if I change the first instance to : --- utf8.c 2004-11-17 18:22:09.0 +0530 +++ utf8.c.22005-07-28 13:48:24.0 +0530 @@ -363,6 +363,11 @@ Perl_utf8n_to_uvuni(pTHX_ U8 *s, STRLEN warning = UTF8_WARN_EMPTY; goto malformed; } +#ifdef EBCDIC +if (uv == 0xBA) { + uv = NATIVE_TO_UTF(uv); +} +#endif if (UTF8_IS_INVARIANT(uv)) { if (retlen) This allows gmake to complete. Thanks for all your help on this. > > Thanks, > Rajarshi. > > > > Nicholas Clark > > > > > __ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam > protection around > http://mail.yahoo.com > Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs
Re: gmake (perl-5.8.6) fails on z/OS
--- Nicholas Clark <[EMAIL PROTECTED]> wrote: > On Tue, Jul 26, 2005 at 08:34:02AM -0700, rajarshi > das wrote: > > > Yes, the second call to NATIVE_TO_UTF is still > present > > in the modified code. Typically, one wouldnt want > to > > do a NATIVE_TO_UTF(NATIVE_TO_UTF(uv)) which is > what I > > am doing due to the second call. But does that > make a > > difference to miniperl ? > > Well, the code is linked into miniperl, so I can > only assume that it's > getting called. > > If so, does removing the second instance of > NATIVE_TO_UTF() improve things? No it doesnt. The same error messages are generated. Thanks, Rajarshi. > > Nicholas Clark > __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: gmake (perl-5.8.6) fails on z/OS
On Tue, Jul 26, 2005 at 08:34:02AM -0700, rajarshi das wrote: > Yes, the second call to NATIVE_TO_UTF is still present > in the modified code. Typically, one wouldnt want to > do a NATIVE_TO_UTF(NATIVE_TO_UTF(uv)) which is what I > am doing due to the second call. But does that make a > difference to miniperl ? Well, the code is linked into miniperl, so I can only assume that it's getting called. If so, does removing the second instance of NATIVE_TO_UTF() improve things? Nicholas Clark
Re: gmake (perl-5.8.6) fails on z/OS
On Tue, Jul 26, 2005 at 03:29:43PM +0100, Nicholas Clark wrote: > On Tue, Jul 26, 2005 at 07:22:55AM -0700, rajarshi das wrote: > > Hi, > > I made the following modifications to utf8.c : > > #ifdef EBCDIC > > uv = NATIVE_TO_UTF(uv); > > #endif > > Where in utf8.c? Your description of what you changed is inadequate for > anyone else to understand the context of your change. > > > I tried redoing it with a clean build, but it still > > fails. > > > > Why does configpm generate errors ? > > I don't know. I don't fully understand the workings of how perl's UTF-8 > implementation is supposed to work on EBCDIC platforms. > > 1: Is that the only change you've made to the source code? > 2: Without that change, how does your build fail? How do the errors differ? And some further questions: what exactly was the change you made? Did you wrap the existing uv = NATIVE_TO_UTF(uv) line with #ifdef, #endif; or did you add three extra lines somewhere, and if so, where? The usual way of providing this information is as the output of the diff command (if your system supports it), in fact preferably 'diff -u'. Why have you made this change? Did you read somewhere that it was necessary, and if so, where did you read this? (Url please.) If not, how did you come to the conclusion that the change was required? And what problem were you trying to fix? Dave -- Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
Re: gmake (perl-5.8.6) fails on z/OS
--- Dave Mitchell <[EMAIL PROTECTED]> wrote: > On Tue, Jul 26, 2005 at 03:29:43PM +0100, Nicholas > Clark wrote: > > On Tue, Jul 26, 2005 at 07:22:55AM -0700, rajarshi > das wrote: > > > Hi, > > > I made the following modifications to utf8.c : > > > #ifdef EBCDIC > > > uv = NATIVE_TO_UTF(uv); > > > #endif > > > > Where in utf8.c? Your description of what you > changed is inadequate for > > anyone else to understand the context of your > change. > > > > > I tried redoing it with a clean build, but it > still > > > fails. > > > > > > Why does configpm generate errors ? > > > > I don't know. I don't fully understand the > workings of how perl's UTF-8 > > implementation is supposed to work on EBCDIC > platforms. > > > > 1: Is that the only change you've made to the > source code? > > 2: Without that change, how does your build fail? > How do the errors differ? > > And some further questions: > > what exactly was the change you made? Did you wrap > the existing > uv = NATIVE_TO_UTF(uv) > line with #ifdef, #endif; or did you add three extra > lines somewhere, and > if so, where? The usual way of providing this > information is as the output > of the diff command (if your system supports it), in > fact preferably > 'diff -u'. Here's the diff output : --- utf8.c 2004-11-17 18:22:09.0 +0530 +++ utf8.c.12005-07-26 20:50:11.0 +0530 @@ -363,7 +363,9 @@ Perl_utf8n_to_uvuni(pTHX_ U8 *s, STRLEN warning = UTF8_WARN_EMPTY; goto malformed; } - +#ifdef EBCDIC +uv = NATIVE_TO_UTF(uv); +#endif if (UTF8_IS_INVARIANT(uv)) { if (retlen) *retlen = 1; > > Why have you made this change? I made this change since the value of uv is such that in the subsequent call (immediately after the change) : if UTF8_IS_INVARIANT(uv), UTF8_IS_INVARIANT evaluates to false which is incorrect. It is supposed to evaluate to true. Did you read > somewhere that it was > necessary, and if so, where did you read this? (Url > please.) If not, > how did you come to the conclusion that the change > was required? And what > problem were you trying to fix? This is based on a comparison with other sample values of 'uv' in which case the condition mentioned above evaluates to true (and in which case, the test case that I run passes). > > Dave Thanks, Rajarshi. > > -- > Hofstadter's Law: > It always takes longer than you expect, even when > you take into account > Hofstadter's Law. > __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: gmake (perl-5.8.6) fails on z/OS
--- Nicholas Clark <[EMAIL PROTECTED]> wrote: > On Tue, Jul 26, 2005 at 07:55:21AM -0700, rajarshi > das wrote: > > > The change is in the fn Perl_utf8n_to_uvuni : > > --- > > . > > > > > > #define UTF8_WARN_LONG 8 > > #define UTF8_WARN_ 9 > /* > > Also FFFE. */ > > > > if (curlen == 0 && > > !(flags & UTF8_ALLOW_EMPTY)) { > > warning = UTF8_WARN_EMPTY; > > goto malformed; > > } > > #ifdef EBCDIC /* the change */ > > uv = NATIVE_TO_UTF(uv); > > #endif /* the change ends here */ > > > > if (UTF8_IS_INVARIANT(uv)) { > > if (retlen) > > *retlen = 1; > > return (UV) (NATIVE_TO_UTF(*s)); > > } > > > > ... > > > A context or unified diff with the original source > would have been clearer, > at least in part because most people on the list are > used to it. Here's the diff : --- utf8.c 2004-11-17 18:22:09.0 +0530 +++ utf8.c.12005-07-26 20:50:11.0 +0530 @@ -363,7 +363,9 @@ Perl_utf8n_to_uvuni(pTHX_ U8 *s, STRLEN warning = UTF8_WARN_EMPTY; goto malformed; } - +#ifdef EBCDIC +uv = NATIVE_TO_UTF(uv); +#endif if (UTF8_IS_INVARIANT(uv)) { if (retlen) *retlen = 1; > > I don't understand this code, so I don't know why. I > think that part of the > reason that you're getting few to no responses to > your questions is because > few people understand this code in the first place, > and none of them > understand how it interacts with EBCDIC. > > > The only thing I can think of is that I notice that > further down that function > there is: > > #ifdef EBCDIC > uv = NATIVE_TO_UTF(uv); > #else > if ((uv == 0xfe || uv == 0xff) && > !(flags & UTF8_ALLOW_FE_FF)) { > warning = UTF8_WARN_FE_FF; > goto malformed; > } > #endif > > Is that second call to NATIVE_TO_UTF still present > in your modified code? Yes, the second call to NATIVE_TO_UTF is still present in the modified code. Typically, one wouldnt want to do a NATIVE_TO_UTF(NATIVE_TO_UTF(uv)) which is what I am doing due to the second call. But does that make a difference to miniperl ? > > Nicholas Clark > Thanks, Rajarshi. Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs
Re: gmake (perl-5.8.6) fails on z/OS
On Tue, Jul 26, 2005 at 07:55:21AM -0700, rajarshi das wrote: > The change is in the fn Perl_utf8n_to_uvuni : > --- > . > > > #define UTF8_WARN_LONG 8 > #define UTF8_WARN_ 9 /* > Also FFFE. */ > > if (curlen == 0 && > !(flags & UTF8_ALLOW_EMPTY)) { > warning = UTF8_WARN_EMPTY; > goto malformed; > } > #ifdef EBCDIC /* the change */ > uv = NATIVE_TO_UTF(uv); > #endif /* the change ends here */ > > if (UTF8_IS_INVARIANT(uv)) { > if (retlen) > *retlen = 1; > return (UV) (NATIVE_TO_UTF(*s)); > } > > ... A context or unified diff with the original source would have been clearer, at least in part because most people on the list are used to it. I don't understand this code, so I don't know why. I think that part of the reason that you're getting few to no responses to your questions is because few people understand this code in the first place, and none of them understand how it interacts with EBCDIC. The only thing I can think of is that I notice that further down that function there is: #ifdef EBCDIC uv = NATIVE_TO_UTF(uv); #else if ((uv == 0xfe || uv == 0xff) && !(flags & UTF8_ALLOW_FE_FF)) { warning = UTF8_WARN_FE_FF; goto malformed; } #endif Is that second call to NATIVE_TO_UTF still present in your modified code? Nicholas Clark
Re: gmake (perl-5.8.6) fails on z/OS
--- Nicholas Clark <[EMAIL PROTECTED]> wrote: > On Tue, Jul 26, 2005 at 07:22:55AM -0700, rajarshi > das wrote: > > Hi, > > I made the following modifications to utf8.c : > > #ifdef EBCDIC > > uv = NATIVE_TO_UTF(uv); > > #endif > > Where in utf8.c? Your description of what you > changed is inadequate for > anyone else to understand the context of your > change. > The change is in the fn Perl_utf8n_to_uvuni : --- . #define UTF8_WARN_LONG 8 #define UTF8_WARN_ 9 /* Also FFFE. */ if (curlen == 0 && !(flags & UTF8_ALLOW_EMPTY)) { warning = UTF8_WARN_EMPTY; goto malformed; } #ifdef EBCDIC /* the change */ uv = NATIVE_TO_UTF(uv); #endif /* the change ends here */ if (UTF8_IS_INVARIANT(uv)) { if (retlen) *retlen = 1; return (UV) (NATIVE_TO_UTF(*s)); } ... > > I tried redoing it with a clean build, but it > still > > fails. > > > > Why does configpm generate errors ? > > I don't know. I don't fully understand the workings > of how perl's UTF-8 > implementation is supposed to work on EBCDIC > platforms. > > 1: Is that the only change you've made to the source > code? I have other changes in utf8.c, but the build happens fine with them (and without the change mentioned above). > 2: Without that change, how does your build fail? It doesnt fail. > How do the errors differ? > > Nicholas Clark > Thanks, Rajarshi. Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs
Re: gmake (perl-5.8.6) fails on z/OS
On Tue, Jul 26, 2005 at 07:22:55AM -0700, rajarshi das wrote: > Hi, > I made the following modifications to utf8.c : > #ifdef EBCDIC > uv = NATIVE_TO_UTF(uv); > #endif Where in utf8.c? Your description of what you changed is inadequate for anyone else to understand the context of your change. > I tried redoing it with a clean build, but it still > fails. > > Why does configpm generate errors ? I don't know. I don't fully understand the workings of how perl's UTF-8 implementation is supposed to work on EBCDIC platforms. 1: Is that the only change you've made to the source code? 2: Without that change, how does your build fail? How do the errors differ? Nicholas Clark