[PATCH libgpg-error] build: Remove literal "\c" strings from lock-obj-pub.native.h

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH libgpg-error] build: Remove literal "\c" strings from lock-obj-pub.native.h

GnuPG - Dev mailing list
* 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 <[hidden email]>
---

(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
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-devel
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH libgpg-error] build: Remove literal "\c" strings from lock-obj-pub.native.h

NIIBE Yutaka
David Michael via Gnupg-devel <[hidden email]> wrote:
> Can something like this be applied to fix cross-compiling 1.42?

Thank you.  Applied and pushed.
--

_______________________________________________
Gnupg-devel mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-devel