bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patch]gnu tar 1.19 canonicalize-lgpl_c.gdiff


From: Jim Meyering
Subject: Re: [patch]gnu tar 1.19 canonicalize-lgpl_c.gdiff
Date: Tue, 01 Apr 2008 09:18:29 +0200

"John E. Malmberg" <address@hidden> wrote:
> Update VMS special code to work with gnulib headers.
>
> -John
> address@hidden
> Personal Opinion Only
> --- /src_root/tar-1.19/lib/canonicalize-lgpl.c        Fri Sep 28 08:11:36 2007
> +++ /stage_vms_src/tar-1.19/lib/canonicalize-lgpl.c   Mon Dec 17 18:37:41 2007
> @@ -68,9 +68,15 @@
>  # include "pathmax.h"
>  # include "malloca.h"
>  # if HAVE_GETCWD
> -#  ifdef VMS
> -    /* We want the directory in Unix syntax, not in VMS syntax.  */
> -#   define __getcwd(buf, max) getcwd (buf, max, 0)
> +#  ifdef __VMS
> +    /* We want the directory in Unix syntax, not in VMS syntax.
> +       getcwd() was defined to be rpl_getcwd earlier, so need to use
> +       the real symbol name for the VMS getcwd routine.
> +
> +       This means that we also need a prototype for it.
> +     */
> +    char * decc$getcwd (char *__buffer, unsigned int __size, ...);
> +#   define __getcwd(buf, max) decc$getcwd (buf, max, 0)
>  #  else
>  #   define __getcwd getcwd
>  #  endif

How about the patch below instead?
I've moved the prototype down, so that we see
the offensive, "$"-containing symbol name only once ;-)

If you're going to contribute much more, you'll have to fill out
copyright assignment paperwork.  Also (assuming you continue) please
provide ChangeLog entries as well as "git format-patch" style diffs,
so it's easier to apply.  If you're not yet comfortable with git,
I've begun a set of contributor guidelines for coreutils that is
intended to help:

http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=blob;f=README-contribution-guidelines;hb=HEAD



>From 248cfe1319e022601239e8f52bf89498f033b541 Mon Sep 17 00:00:00 2001
From: John E. Malmberg <address@hidden>
Date: Tue, 1 Apr 2008 09:12:23 +0200
Subject: [PATCH] canonicalize-lgpl: VMS portability

* lib/canonicalize-lgpl.c: Use __VMS, not VMS in #ifdef.
Provide a prototype for decc$getcwd.

Signed-off-by: Jim Meyering <address@hidden>
---
 ChangeLog               |    6 ++++++
 lib/canonicalize-lgpl.c |   10 +++++++---
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c02f097..a04830e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-04-01  John E. Malmberg  <address@hidden>  (tiny change)
+
+       canonicalize-lgpl: VMS portability
+       * lib/canonicalize-lgpl.c: Use __VMS, not VMS in #ifdef.
+       Provide a prototype for decc$getcwd.
+
 2008-03-31  Eric Blake  <address@hidden>

        Guarantee a definition of NAN.
diff --git a/lib/canonicalize-lgpl.c b/lib/canonicalize-lgpl.c
index 80bef72..882c536 100644
--- a/lib/canonicalize-lgpl.c
+++ b/lib/canonicalize-lgpl.c
@@ -67,9 +67,13 @@
 # include "pathmax.h"
 # include "malloca.h"
 # if HAVE_GETCWD
-#  ifdef VMS
-    /* We want the directory in Unix syntax, not in VMS syntax.  */
-#   define __getcwd(buf, max) getcwd (buf, max, 0)
+#  ifdef __VMS
+    /* We want the directory in Unix syntax, not in VMS syntax.
+       getcwd was defined to be rpl_getcwd earlier, so need to use
+       the real symbol name for the VMS getcwd routine.
+       This means that we also need a prototype for it.  */
+#   define __getcwd decc$getcwd
+    char *__getcwd (char *__buffer, unsigned int __size, ...);
 #  else
 #   define __getcwd getcwd
 #  endif
--
1.5.5.rc1.13.g79388




reply via email to

[Prev in Thread] Current Thread [Next in Thread]