Mailing List Archive

[PATCH libgpg-error] build: Remove literal "\c" strings from lock-obj-pub.native.h
* src/gen-lock-obj.sh: Capture echo output with quotes.

--

Cross-compiling produces a gpg-error.h with instances of "\c"
everywhere which breaks compilation due to invalid syntax. It is
caused by the "echo -n" test having no output, which was not
captured as an empty token due to not being quoted. That meant the
"test" command was operating on only the "-n" argument.

Signed-off-by: David Michael <fedora.dm0@gmail.com>
---

(resending since it doesn't look like this was delivered to the list)

Hi,

Can something like this be applied to fix cross-compiling 1.42? You can
try it with commands like this:

/bin/sh -c 'test -n `echo -n` ; echo $?'
/bin/sh -c 'test -n "`echo -n`" ; echo $?'

Thanks.

David

src/gen-lock-obj.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gen-lock-obj.sh b/src/gen-lock-obj.sh
index a710f0c..258eec6 100755
--- a/src/gen-lock-obj.sh
+++ b/src/gen-lock-obj.sh
@@ -38,7 +38,7 @@
# AWK=gawk ./gen-lock-obj.sh
#

-if test -n `echo -n`; then
+if test -n "`echo -n`"; then
ECHO_C='\c'
ECHO_N=''
else
--
2.26.3

_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-devel
Re: [PATCH libgpg-error] build: Remove literal "\c" strings from lock-obj-pub.native.h [ In reply to ]
David Michael via Gnupg-devel <gnupg-devel@gnupg.org> wrote:
> Can something like this be applied to fix cross-compiling 1.42?

Thank you. Applied and pushed.
--

_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-devel