bug-gnulib
[Top][All Lists]
Advanced

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

Re: git-version-gen not EBCDIC compatible


From: Jim Meyering
Subject: Re: git-version-gen not EBCDIC compatible
Date: Mon, 26 Apr 2010 19:01:50 +0200

Eric Blake wrote:
> [redirecting to bug-gnulib, as owner of the file in question]
>
> On 04/26/2010 07:16 AM, Steve Goetze wrote:
>> The following line in m4-1.4.14/build-aux/git-version-gen causes a build
>> failure on z/OS (EBCDIC codeset):
>>
>> # Omit the trailing newline, so that m4_esyscmd can use the result directly.
>> echo "$v" | tr -d '\012'
>>
>> Octal 12 does not represent new line in EBCDIC.
>
> Thanks for the report.  I'll push this patch shortly for
> git-version-gen, but there are other culprits (MODULES.html.sh,
> gnupload, m4/get{delim,line}.m4, m4/javacomp.m4, posix-modules) that are
> still ascii-specific.
>
> diff --git i/ChangeLog w/ChangeLog
> index 786f89e..6076afd 100644
> --- i/ChangeLog
> +++ w/ChangeLog
> @@ -1,3 +1,10 @@
> +2010-04-26  Eric Blake  <address@hidden>
> +
> +     git-version-gen: allow use on EBCDIC hosts.
> +     * build-aux/git-version-gen (dirty): Use literal rather than tying
> +     ourselves to ascii.
> +     Reported by Steve Goetze.
> +
...
>
>  # Omit the trailing newline, so that m4_esyscmd can use the result
> directly.
> -echo "$v" | tr -d '\012'
> +echo "$v" | tr -d '
> +'

Thanks for report and the fix.
I've pushed this small change, since I prefer to keep that simple
filter on a single line:

    echo "$v" | tr -d "$nl"

>From 6e417accc9b6501a730eb21d796c5660647e8aa1 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Mon, 26 Apr 2010 18:59:46 +0200
Subject: [PATCH] git-version-gen: aesthetic tweak

* build-aux/git-version-gen: Use "$nl" rather than a literal,
so that the command remains on a single line.
---
 ChangeLog                 |    6 ++++++
 build-aux/git-version-gen |    5 ++---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d09e5e0..283d4c1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-04-26  Jim Meyering  <address@hidden>
+
+       git-version-gen: aesthetic tweak
+       * build-aux/git-version-gen: Use "$nl" rather than a literal,
+       so that the command remains on a single line.
+
 2010-04-26  Eric Blake  <address@hidden>

        git-version-gen: allow use on EBCDIC hosts
diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen
index be85b6d..5a7e989 100755
--- a/build-aux/git-version-gen
+++ b/build-aux/git-version-gen
@@ -1,6 +1,6 @@
 #!/bin/sh
 # Print a version string.
-scriptversion=2010-04-26.15; # UTC
+scriptversion=2010-04-26.16; # UTC

 # Copyright (C) 2007-2010 Free Software Foundation, Inc.
 #
@@ -140,8 +140,7 @@ case "$dirty" in
 esac

 # Omit the trailing newline, so that m4_esyscmd can use the result directly.
-echo "$v" | tr -d '
-'
+echo "$v" | tr -d "$nl"

 # Local variables:
 # eval: (add-hook 'write-file-hooks 'time-stamp)
--
1.7.1.328.g9993c




reply via email to

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