Shell portability issue in tests/key-id/key-id

View: New views
3 Messages — Rating Filter:   Alert me  

Shell portability issue in tests/key-id/key-id

by Tom G. Christensen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The tests/key-id/key-id script uses 'if !' which is not understood by
/bin/sh and results in an error on IRIX and Solaris.

$ ./key-id
!: Not found

-tgc


_______________________________________________
Gnutls-devel mailing list
Gnutls-devel@...
http://lists.gnu.org/mailman/listinfo/gnutls-devel

Re: Shell portability issue in tests/key-id/key-id

by Arfrever Frehtes Taifersar Arahesis-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009-09-03 22:46:23 Tom G. Christensen napisał(a):
> The tests/key-id/key-id script uses 'if !' which is not understood by
> /bin/sh and results in an error on IRIX and Solaris.
>
> $ ./key-id
> !: Not found

! is documented by POSIX:
http://www.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_02_01

--
Arfrever Frehtes Taifersar Arahesis


_______________________________________________
Gnutls-devel mailing list
Gnutls-devel@...
http://lists.gnu.org/mailman/listinfo/gnutls-devel

signature.asc (205 bytes) Download Attachment

Re: Shell portability issue in tests/key-id/key-id

by Simon Josefsson-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Arfrever Frehtes Taifersar Arahesis <arfrever.fta@...> writes:

> 2009-09-03 22:46:23 Tom G. Christensen napisał(a):
>> The tests/key-id/key-id script uses 'if !' which is not understood by
>> /bin/sh and results in an error on IRIX and Solaris.
>>
>> $ ./key-id
>> !: Not found
>
> ! is documented by POSIX:
> http://www.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_02_01

Alas it is not portable, see:

http://www.gnu.org/software/autoconf/manual/html_node/Limitations-of-Builtins.html

I have rewritten the code, thanks for the report Tom.

/Simon


_______________________________________________
Gnutls-devel mailing list
Gnutls-devel@...
http://lists.gnu.org/mailman/listinfo/gnutls-devel