In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/a429ddf7a2c14de7caaf9248c6a79212167468f9?hp=9f351b45f43b0ed78a9b796af692ef90a6d23879>

- Log -----------------------------------------------------------------
commit a429ddf7a2c14de7caaf9248c6a79212167468f9
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 09f253ec43d3a97e7882a96f636670c1944f29ad
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
-----------------------------------------------------------------------

Summary of changes:
 configure.com |   17 ++++++++++++++---
 vms/vms.c     |    8 +++++---
 2 files changed, 19 insertions(+), 6 deletions(-)

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/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--;

--
Perl5 Master Repository

Reply via email to