In perl.git, the branch khw/ebcdic has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/470c08885d443febde79f45f9ac9ad9dba1fe367?hp=3a3d7b8291639e7d2203c4479cbd385cb7117a73>

- Log -----------------------------------------------------------------
commit 470c08885d443febde79f45f9ac9ad9dba1fe367
Author: Karl Williamson <[email protected]>
Date:   Sat Mar 2 20:53:04 2013 -0700

    regen/unicode_constants.pl: Change #define name
    
    This was added in the 5.17 series so there's no code relying on its
    current name.  I think that the abbreviation is clearer.

M       regen/unicode_constants.pl
M       unicode_constants.h
M       x2p/a2py.c

commit 4f8b93a842173f115684ea676cf371a25f689ff6
Author: Karl Williamson <[email protected]>
Date:   Sat Mar 2 20:43:56 2013 -0700

    regen/unicode_constants.pl: Make portable to non-ASCII
    
    This now uses the U+ notation to indicate code points, which is
    unambiguous not matter what the platform's character set is.  (charnames
    accepts the U+ notation)

M       regen/unicode_constants.pl
M       unicode_constants.h

commit 9fb61760aafb635756b11a370bb963e205c6bdf5
Author: Karl Williamson <[email protected]>
Date:   Sat Mar 2 20:29:33 2013 -0700

    regen/unicode_constants.pl: Remove unused constant
    
    This was added in the 5.17 series, so can't be yet in the field; and
    isn't needed.

M       regen/unicode_constants.pl
M       unicode_constants.h

commit 7ff8fc387b76bb2b329d3eaa9f70cc1411c7217b
Author: Karl Williamson <[email protected]>
Date:   Sat Mar 2 19:28:43 2013 -0700

    regen/unicode_constants.pl: Pass through input comments
    
    The data can now have comments, which are converted to C and passed
    through

M       regen/unicode_constants.pl

commit 3a36b05dd2c40f72d576789566888bdd6bc16da7
Author: Karl Williamson <[email protected]>
Date:   Sat Mar 2 19:19:02 2013 -0700

    regen/unicode_constants.pl: Convert '-' in names to '_'
    
    Unicode character names can have dashes in them.  These aren't accepted
    in C macro names.  Change so both blanks and the hyphen-minus are
    converted to underscores.

M       regen/unicode_constants.pl

commit f3ba2e6e698e0615892860560ca189a6be0bab4b
Author: Aaron Crane <[email protected]>
Date:   Mon Feb 4 17:14:20 2013 +0000

    Configure: bail out when neither stdarg.h nor varargs.h
    
    Perl uses variadic functions, so we need at least one of the relevant
    mechanisms available; for this reason, the CompCert C compiler is unsuitable
    for our purposes.
    
    If the person building Perl wants to carry on regardless, they can use the
    "-K" option.
    
    This partly addresses RT#112494.

M       Configure

commit be4a7f8cad34a20bd5c968fd6475ddf5d839870a
Author: Chris 'BinGOs' Williams <[email protected]>
Date:   Sun Mar 3 09:18:12 2013 +0000

    Update IPC-Cmd to CPAN version 0.80
    
      [DELTA]
    
      Changes for 0.80    Sat Mar  2 22:03:49 GMT 2013
      =================================================
      * Use File::Spec->path instead of relying on
        Config (William Orr)

M       Porting/Maintainers.pl
M       cpan/IPC-Cmd/lib/IPC/Cmd.pm

commit 405132737bc6f3fce6d2fa5fb8f5e145f2d1331b
Author: H.Merijn Brand <[email protected]>
Date:   Sun Mar 3 09:34:17 2013 +0100

    fixed minor typo in delta

M       pod/perldelta.pod

commit 68c6779df0e6bbbb581d0b616810a38ff8fafa38
Author: David Mitchell <[email protected]>
Date:   Sun Mar 3 00:57:07 2013 +0000

    deparse.t: mask STDERR noise on lex sub TODO test
    
    A Deparse TODO test which tries to deparse lexical subs, produce a bunch of
    "unexpected OP_CLONE" etc on STDERR (since it doesn't handle those new ops
    yet). Capture and skip those warnings for now.
    
    Also, add 'no warnings "experimental::lexical_subs"'
    to stop a warning about using an experimental feature.

M       dist/B-Deparse/t/deparse.t

commit 659d53736890ed7ec53920ac84eb11b38bd4c70a
Author: Peter Martini <[email protected]>
Date:   Sun Mar 3 00:09:58 2013 +0000

    Stop SEGV on 'our sub { syntax error }'
    
    Fix for RT #116981. If a sub is declared with our, the name is added
    to the stash early, and left with a NULL ptr if there's a syntax error
    while compiling it.
    
    Since the only time it becomes an issue is when that same name
    is used in the same scope after a syntax error, what happens in
    the pad is not particularly important.  The simple fix is to
    simply fall back to treating it like a bareword, and pretending
    it was never added to the pad in the first place.

M       t/cmd/lexsub.t
M       toke.c

commit c79e9bdf1e01502277db2a55ebe7a7cfa5900c36
Author: Craig A. Berry <[email protected]>
Date:   Sat Mar 2 18:00:20 2013 -0600

    Enable sem* functions in configure.com for 8.4+.
    
    They became available in VMS v8.4 in 2010.

M       configure.com

commit 3cc6116f972b49ebd519b8a6c3ceb0f1a00d65af
Author: Craig A. Berry <[email protected]>
Date:   Sat Mar 2 17:55:13 2013 -0600

    Fix declaration after statement in vms.c's Perl_my_chdir
    
    And while we're there, set errno appropriately for the empty string
    input case.

M       vms/vms.c

commit 37be61550f8ef2266d8d1f78d52c04a77561f1a1
Author: David Mitchell <[email protected]>
Date:   Sat Mar 2 23:31:13 2013 +0000

    Disable by default the new Copy-on-Write for 5.18
    
    It was felt that the new COW feature wasn't ready to be enabled be default
    in 5.18: principally because too much XS code will assume it can just
    manipulate the PVX buffer of an SVf_POK SV.
    
    See RT #116569 for the discussion.

M       perl.h
M       pod/perldelta.pod
M       t/re/pat_rt_report.t
-----------------------------------------------------------------------

Summary of changes:
 Configure                   |   10 +++++
 Porting/Maintainers.pl      |    2 +-
 configure.com               |   17 +++++++-
 cpan/IPC-Cmd/lib/IPC/Cmd.pm |    7 +--
 dist/B-Deparse/t/deparse.t  |   10 +++++
 perl.h                      |   10 +++-
 pod/perldelta.pod           |   14 ++++++-
 regen/unicode_constants.pl  |   91 +++++++++++++++++++++++-------------------
 t/cmd/lexsub.t              |   15 +++++++-
 t/re/pat_rt_report.t        |    1 +
 toke.c                      |    5 ++
 unicode_constants.h         |   28 +++++++-------
 vms/vms.c                   |    8 ++-
 x2p/a2py.c                  |    2 +-
 14 files changed, 148 insertions(+), 72 deletions(-)

diff --git a/Configure b/Configure
index 7c2527e..b9cb687 100755
--- a/Configure
+++ b/Configure
@@ -10882,6 +10882,7 @@ chmod +x varargs
 : now check which varargs header should be included
 echo " "
 i_varhdr=''
+val=""
 case "$valstd" in
 "$define")
        if `./varargs I_STDARG`; then
@@ -10898,6 +10899,15 @@ case "$valstd" in
 esac
 case "$val" in
 '')
+       echo " "
+       echo "*** WHOA THERE!!! ***" >&4
+       echo "    Your C compiler \"$cc\" doesn't seem to support stdarg or 
varargs!" >&4
+       case "$knowitall" in
+       '')
+       echo "    I'm giving up; maybe you can try again with a different 
compiler?" >&4
+               exit 1
+               ;;
+       esac
 echo "I could not find the definition for va_dcl... You have problems..." >&4
        val="$undef"; set i_stdarg; eval $setvar
        val="$undef"; set i_varargs; eval $setvar
diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index 74419aa..57ab853 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -1049,7 +1049,7 @@ use File::Glob qw(:case);
 
     'IPC::Cmd' => {
         'MAINTAINER'   => 'kane',
-        'DISTRIBUTION' => 'BINGOS/IPC-Cmd-0.78.tar.gz',
+        'DISTRIBUTION' => 'BINGOS/IPC-Cmd-0.80.tar.gz',
         'FILES'        => q[cpan/IPC-Cmd],
         'UPSTREAM'     => 'cpan',
     },
diff --git a/configure.com b/configure.com
index f4e869d..92045cd 100644
--- a/configure.com
+++ b/configure.com
@@ -6206,9 +6206,20 @@ $ WC "d_sched_yield='" + d_sched_yield + "'"
 $ WC "d_scm_rights='undef'"
 $ WC "d_seekdir='define'"
 $ WC "d_select='" + d_select + "'"
-$ WC "d_sem='undef'"
-$ WC "d_semctl_semid_ds='undef'"
-$ WC "d_semctl_semun='undef'"
+$ IF ("''F$EXTRACT(1,3, F$GETSYI(""VERSION""))'".GES."8.4")
+$ THEN
+$   WC "d_sem='define'"
+$   WC "d_semctl_semid_ds='define'"
+$   WC "d_semctl_semun='define'"
+$   WC "d_semget='define'"
+$   WC "d_semop='define'"
+$ ELSE
+$   WC "d_sem='undef'"
+$   WC "d_semctl_semid_ds='undef'"
+$   WC "d_semctl_semun='undef'"
+$   WC "d_semget='undef'"
+$   WC "d_semop='undef'"
+$ ENDIF
 $ WC "d_sendmsg='undef'"
 $ WC "d_setegid='undef'"
 $ WC "d_setenv='" + d_setenv + "'"
diff --git a/cpan/IPC-Cmd/lib/IPC/Cmd.pm b/cpan/IPC-Cmd/lib/IPC/Cmd.pm
index 37e6d1e..c3d18b5 100644
--- a/cpan/IPC-Cmd/lib/IPC/Cmd.pm
+++ b/cpan/IPC-Cmd/lib/IPC/Cmd.pm
@@ -17,7 +17,7 @@ BEGIN {
                         $INSTANCES $ALLOW_NULL_ARGS
                     ];
 
-    $VERSION        = '0.78';
+    $VERSION        = '0.80';
     $VERBOSE        = 0;
     $DEBUG          = 0;
     $WARN           = 1;
@@ -212,7 +212,6 @@ sub can_run {
         return $command if scalar $syms->getsym( uc $command );
     }
 
-    require Config;
     require File::Spec;
     require ExtUtils::MakeMaker;
 
@@ -223,7 +222,7 @@ sub can_run {
 
     } else {
         for my $dir (
-            (split /\Q$Config::Config{path_sep}\E/, $ENV{PATH}),
+            File::Spec->path,
             File::Spec->curdir
         ) {
             next if ! $dir || ! -d $dir;
@@ -1883,7 +1882,7 @@ special characters are escaped and passed as arguments 
instead of retaining
 their special meaning.
 
 However, if the command contained arguments that contained whitespace,
-stringifying the command would loose the significance of the whitespace.
+stringifying the command would lose the significance of the whitespace.
 Therefore, C<IPC::Cmd> will quote any arguments containing whitespace in your
 command if the command is passed as an arrayref and contains special 
characters.
 
diff --git a/dist/B-Deparse/t/deparse.t b/dist/B-Deparse/t/deparse.t
index df90124..dce0460 100644
--- a/dist/B-Deparse/t/deparse.t
+++ b/dist/B-Deparse/t/deparse.t
@@ -1372,6 +1372,16 @@ my($a, $b, $c) = @_;
 # SKIP ?$] < 5.017004 && "lexical subs not implemented on this Perl version"
 # TODO unimplemented in B::Deparse; RT #116553
 # lexical subroutine
+
+# XXX remove this __WARN__ once the ops are correctly implemented
+BEGIN {
+    $SIG{__WARN__} = sub {
+       return if $_[0] =~ /unexpected OP_(CLONE|INTRO|PAD)CV/;
+       print STDERR @_;
+    }
+}
+
 use feature 'lexical_subs';
+no warnings "experimental::lexical_subs";
 my sub f {}
 print f();
diff --git a/perl.h b/perl.h
index 07d8cb3..b976a3a 100644
--- a/perl.h
+++ b/perl.h
@@ -2494,9 +2494,11 @@ typedef AV PAD;
 typedef AV PADNAMELIST;
 typedef SV PADNAME;
 
-#if !defined(PERL_OLD_COPY_ON_WRITE) && !defined(PERL_NEW_COPY_ON_WRITE) && 
!defined(PERL_NO_COW)
-# define PERL_NEW_COPY_ON_WRITE
-#endif
+/* XXX for 5.18, disable the COW by default
+ * #if !defined(PERL_OLD_COPY_ON_WRITE) && !defined(PERL_NEW_COPY_ON_WRITE) && 
!defined(PERL_NO_COW)
+ * # define PERL_NEW_COPY_ON_WRITE
+ * #endif
+ */
 
 #if defined(PERL_OLD_COPY_ON_WRITE) || defined(PERL_NEW_COPY_ON_WRITE)
 # if defined(PERL_OLD_COPY_ON_WRITE) && defined(PERL_NEW_COPY_ON_WRITE)
@@ -2504,6 +2506,8 @@ typedef SV PADNAME;
 # else
 #  define PERL_ANY_COW
 # endif
+#else
+# define PERL_SAWAMPERSAND
 #endif
 
 #include "handy.h"
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 8be911f..17db8f7 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -304,7 +304,19 @@ well.
 
 =item *
 
-XXX
+The new copy-on-write mechanism that was introduced in 5.17.7 has now been
+disabled by default, since it was felt that there were too many rough
+edges for the 5.18 release. It is expected that it will be enabled by
+default for 5.20.
+
+This change also re-enables PL_sawampersand by default.
+
+It can be enabled in a perl build by running F<Configure> with
+B<-Accflags=-DPERL_NEW_COPY_ON_WRITE>, and we would encourage XS authors to
+try their code with such an enabled perl, and provide feedback.
+XXX need blurb, e.g. a reference to a new section in perlguts or perlxs
+explaining how XS authors should handle COW strings.
+
 
 =back
 
diff --git a/regen/unicode_constants.pl b/regen/unicode_constants.pl
index 48b43f4..1977fbd 100644
--- a/regen/unicode_constants.pl
+++ b/regen/unicode_constants.pl
@@ -28,12 +28,14 @@ print $out_fh <<END;
 END
 
 # The data are at the end of this file.  A blank line is output as-is.
-# Otherwise, each line represents one #define, and begins with either a
-# Unicode character name with the blanks in it squeezed out or replaced by
-# underscores; or it may be a hexadecimal Unicode code point.  In the latter
+# Comments (lines whose first non-blank is a '#') are converted to C-style,
+# though empty comments are converted to blank lines.  Otherwise, each line
+# represents one #define, and begins with either a Unicode character name with
+# the blanks and dashes in it squeezed out or replaced by underscores; or it
+# may be a hexadecimal Unicode code point of the form U+xxxx.  In the latter
 # case, the name will be looked-up to use as the name of the macro.  In either
-# case, the macro name will have suffixes as listed above, and all blanks will
-# be replaced by underscores.
+# case, the macro name will have suffixes as listed above, and all blanks and
+# dashes will be replaced by underscores.
 #
 # Each line may optionally have one of the following flags on it, separated by
 # white space from the initial token.
@@ -55,12 +57,21 @@ END
 # having to figure things out.
 
 while ( <DATA> ) {
-    if ($_ !~ /\S/) {
-        print $out_fh "\n";
+    chomp;
+
+    # Convert any '#' comments to /* ... */; empty lines and comments are
+    # output as blank lines
+    if ($_ =~ m/ ^ \s* (?: \# ( .* ) )? $ /x) {
+        my $comment_body = $1 // "";
+        if ($comment_body ne "") {
+            print $out_fh "/* $comment_body */\n";
+        }
+        else {
+            print $out_fh "\n";
+        }
         next;
     }
 
-    chomp;
     unless ($_ =~ m/ ^ ( [^\ ]* )           # Name or code point token
                        (?: [\ ]+ ( [^ ]* ) )?  # optional flag
                        (?: [\ ]+ ( .* ) )?  # name if unnamed; flag is required
@@ -75,31 +86,30 @@ while ( <DATA> ) {
 
     my $name;
     my $cp;
+    my $U_cp;   # code point in Unicode (not-native) terms
     my $undef_ok = $desired_name || $flag =~ /skip_if_undef/;
 
-    if ($name_or_cp =~ /[^[:xdigit:]]/) {
-
-        # Anything that isn't a hex value must be a name.
-        $name = $name_or_cp;
-        $cp = charnames::vianame($name =~ s/_/ /gr);
-        die "Unknown name '$name' at line $.: $_\n" unless defined $name;
-    }
-    else {
-        $cp = $name_or_cp;
-        $name = charnames::viacode("0$cp"); # viacode requires a leading zero
-                                            # to be sure that the argument is
-                                            # hex
+    if ($name_or_cp =~ /^U\+(.*)/) {
+        $U_cp = hex $1;
+        $name = charnames::viacode($name_or_cp);
         if (! defined $name) {
-            die "Unknown code point '$cp' at line $.: $_\n" unless $undef_ok;
+            die "Unknown code point '$name_or_cp' at line $.: $_\n" unless 
$undef_ok;
             $name = "";
         }
+        $cp = utf8::unicode_to_native($U_cp);
+    }
+    else {
+        $name = $name_or_cp;
+        $cp = charnames::vianame($name =~ s/_/ /gr);
+        $U_cp = utf8::native_to_unicode($cp);
+        die "Unknown name '$name' at line $.: $_\n" unless defined $name;
     }
 
     $name = $desired_name if $name eq "" && $desired_name;
-    $name =~ s/ /_/g;   # The macro name can have no blanks in it
+    $name =~ s/[- ]/_/g;   # The macro name can have no blanks nor dashes
 
     my $str = join "", map { sprintf "\\x%02X", $_ }
-                       unpack("U0C*", pack("U", hex $cp));
+                       unpack("U0C*", pack("U", $cp));
 
     my $suffix = '_UTF8';
     if (! defined $flag  || $flag =~ /^ string (_skip_if_undef)? $/x) {
@@ -115,15 +125,14 @@ while ( <DATA> ) {
         $str = "0x$str";        # Is a numeric constant
     }
     elsif ($flag eq 'native') {
-        die "Are you sure you want to run this on an above-Latin1 code point?" 
if hex $cp > 0xff;
+        die "Are you sure you want to run this on an above-Latin1 code point?" 
if $cp > 0xff;
         $suffix = '_NATIVE';
-        $str = utf8::unicode_to_native(hex $cp);
-        $str = "0x$cp";        # Is a numeric constant
+        $str = sprintf "0x%02X", $cp;        # Is a numeric constant
     }
     else {
         die "Unknown flag at line $.: $_\n";
     }
-    print $out_fh "#define ${name}$suffix $str    /* U+$cp */\n";
+    printf $out_fh "#define %s%s  %s    /* U+%04X */\n", $name, $suffix, $str, 
$U_cp;
 }
 
 print $out_fh "\n#endif /* H_UNICODE_CONSTANTS */\n";
@@ -131,21 +140,21 @@ print $out_fh "\n#endif /* H_UNICODE_CONSTANTS */\n";
 read_only_bottom_close_and_rename($out_fh);
 
 __DATA__
-0300 string
-0301 string
-0308 string
 
-03B9 string
+U+0300 string
+U+0301 string
+U+0308 string
+
+U+03B9 string
 
-03C5 string
+U+03C5 string
 
-2010 string
-D800 first FIRST_SURROGATE
+U+2010 string
+U+D800 first FIRST_SURROGATE
 
-007F native
-00DF native
-00E5 native
-00C5 native
-00FF native
-00B5 native
-0085 native
+DEL native
+U+00DF native
+U+00E5 native
+U+00C5 native
+U+00FF native
+U+00B5 native
diff --git a/t/cmd/lexsub.t b/t/cmd/lexsub.t
index 86c7e26..46bab03 100644
--- a/t/cmd/lexsub.t
+++ b/t/cmd/lexsub.t
@@ -8,7 +8,7 @@ BEGIN {
     *bar::like = *like;
 }
 no warnings 'deprecated';
-plan 128;
+BEGIN{plan 133;}
 
 # -------------------- Errors with feature disabled -------------------- #
 
@@ -95,6 +95,19 @@ sub bar::c { 43 }
   my $y = if if if;
   is $y, 42, 'our subs from other packages override all keywords';
 }
+# Make sure errors don't pollute the stash (see RT 116981)
+{
+  eval "our sub ln99{!} ln99(1)";
+  eval "ln99(1)";
+  like $@, "Undefined subroutine &main::ln99 called", "Bad definitions do not 
pollute the stash";
+  isnt $::{ln99}, -1, "No placeholder was entered";
+  our sub ln103;
+  is $::{ln103}, -1, "Placeholder was entered";
+  eval "our sub ln103{!} ln103(1)";
+  eval "ln103(1)";
+  like $@, "Undefined subroutine &main::ln103 called", "Bad definitions do not 
pollute the stash";
+  isnt $::{ln103}, -1, "Placeholder was removed";
+}
 
 # -------------------- state -------------------- #
 
diff --git a/t/re/pat_rt_report.t b/t/re/pat_rt_report.t
index e6ee0dd..2244fdf 100644
--- a/t/re/pat_rt_report.t
+++ b/t/re/pat_rt_report.t
@@ -1147,6 +1147,7 @@ EOP
 
     {
         # [perl #4289] First mention $& after a match
+        local $::TODO = "these tests fail without Copy-on-Write enabled";
         fresh_perl_is(
             '$_ = "abc"; /b/g; $_ = "hello"; print eval q|$&|, "\n"',
             "b\n", {}, '$& first mentioned after match');
diff --git a/toke.c b/toke.c
index dff2899..f3fe2d7 100644
--- a/toke.c
+++ b/toke.c
@@ -6882,6 +6882,11 @@ Perl_yylex(pTHX)
                    gv = gv_fetchsv(sv, GV_NOADD_NOINIT | SvUTF8(sv),
                                    SVt_PVCV);
                    off = 0;
+                   if (!gv) {
+                       sv_free(sv);
+                       sv = NULL;
+                       goto just_a_word;
+                   }
                }
                else {
                    rv2cv_op = newOP(OP_PADANY, 0);
diff --git a/unicode_constants.h b/unicode_constants.h
index f4d3172..19f3acd 100644
--- a/unicode_constants.h
+++ b/unicode_constants.h
@@ -20,24 +20,24 @@
  *  "_TAIL"       if instead it represents all but the first byte.  This, and
  *                with no additional suffix are both string constants */
 
-#define COMBINING_GRAVE_ACCENT_UTF8 "\xCC\x80"    /* U+0300 */
-#define COMBINING_ACUTE_ACCENT_UTF8 "\xCC\x81"    /* U+0301 */
-#define COMBINING_DIAERESIS_UTF8 "\xCC\x88"    /* U+0308 */
 
-#define GREEK_SMALL_LETTER_IOTA_UTF8 "\xCE\xB9"    /* U+03B9 */
+#define COMBINING_GRAVE_ACCENT_UTF8  "\xCC\x80"    /* U+0300 */
+#define COMBINING_ACUTE_ACCENT_UTF8  "\xCC\x81"    /* U+0301 */
+#define COMBINING_DIAERESIS_UTF8  "\xCC\x88"    /* U+0308 */
 
-#define GREEK_SMALL_LETTER_UPSILON_UTF8 "\xCF\x85"    /* U+03C5 */
+#define GREEK_SMALL_LETTER_IOTA_UTF8  "\xCE\xB9"    /* U+03B9 */
 
-#define HYPHEN_UTF8 "\xE2\x80\x90"    /* U+2010 */
-#define FIRST_SURROGATE_UTF8_FIRST_BYTE 0xED    /* U+D800 */
+#define GREEK_SMALL_LETTER_UPSILON_UTF8  "\xCF\x85"    /* U+03C5 */
 
-#define DELETE_NATIVE 0x007F    /* U+007F */
-#define LATIN_SMALL_LETTER_SHARP_S_NATIVE 0x00DF    /* U+00DF */
-#define LATIN_SMALL_LETTER_A_WITH_RING_ABOVE_NATIVE 0x00E5    /* U+00E5 */
-#define LATIN_CAPITAL_LETTER_A_WITH_RING_ABOVE_NATIVE 0x00C5    /* U+00C5 */
-#define LATIN_SMALL_LETTER_Y_WITH_DIAERESIS_NATIVE 0x00FF    /* U+00FF */
-#define MICRO_SIGN_NATIVE 0x00B5    /* U+00B5 */
-#define NEXT_LINE_NATIVE 0x0085    /* U+0085 */
+#define HYPHEN_UTF8  "\xE2\x80\x90"    /* U+2010 */
+#define FIRST_SURROGATE_UTF8_FIRST_BYTE  0xED    /* U+D800 */
+
+#define DEL_NATIVE  0x7F    /* U+007F */
+#define LATIN_SMALL_LETTER_SHARP_S_NATIVE  0xDF    /* U+00DF */
+#define LATIN_SMALL_LETTER_A_WITH_RING_ABOVE_NATIVE  0xE5    /* U+00E5 */
+#define LATIN_CAPITAL_LETTER_A_WITH_RING_ABOVE_NATIVE  0xC5    /* U+00C5 */
+#define LATIN_SMALL_LETTER_Y_WITH_DIAERESIS_NATIVE  0xFF    /* U+00FF */
+#define MICRO_SIGN_NATIVE  0xB5    /* U+00B5 */
 
 #endif /* H_UNICODE_CONSTANTS */
 
diff --git a/vms/vms.c b/vms/vms.c
index 82b5d16..58de70d 100644
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -2102,16 +2102,18 @@ int
 Perl_my_chdir(pTHX_ const char *dir)
 {
   STRLEN dirlen = strlen(dir);
+  const char *dir1 = dir;
 
   /* zero length string sometimes gives ACCVIO */
-  if (dirlen == 0) return -1;
-  const char *dir1;
+  if (dirlen == 0) {
+    SETERRNO(EINVAL, SS$_BADPARAM);
+    return -1;
+  }
 
   /* Perl is passing the output of the DCL SHOW DEFAULT with leading spaces.
    * This does not work if DECC$EFS_CHARSET is active.  Hack it here
    * so that existing scripts do not need to be changed.
    */
-  dir1 = dir;
   while ((dirlen > 0) && (*dir1 == ' ')) {
     dir1++;
     dirlen--;
diff --git a/x2p/a2py.c b/x2p/a2py.c
index ca5958b..aec2a0e 100644
--- a/x2p/a2py.c
+++ b/x2p/a2py.c
@@ -18,7 +18,7 @@
 #endif
 #include "util.h"
 #include "../unicode_constants.h"
-#define DELETE_CHAR DELETE_NATIVE
+#define DELETE_CHAR DEL_NATIVE
 
 const char *filename;
 const char *myname;

--
Perl5 Master Repository

Reply via email to