slackbuilds_ponce/system/pdksh/patches/104_Debian-#415167-lack-of-dot-arguments.patch
2010-05-13 01:01:03 +02:00

22 lines
723 B
Diff

unset on unknown variable is not an error,
see http://www.opengroup.org/onlinepubs/009695399/utilities/unset.html
(from PLD)
@DPATCH@
Index: pdksh-5.2.14/c_sh.c
===================================================================
--- pdksh-5.2.14.orig/c_sh.c 2008-04-15 20:56:22.000000000 +0200
+++ pdksh-5.2.14/c_sh.c 2008-04-15 20:56:53.000000000 +0200
@@ -183,8 +183,10 @@
if (ksh_getopt(wp, &builtin_opt, null) == '?')
return 1;
- if ((cp = wp[builtin_opt.optind]) == NULL)
- return 0;
+ if ((cp = wp[builtin_opt.optind]) == NULL) {
+ bi_errorf("missing argument");
+ return 1;
+ }
file = search(cp, path, R_OK, &err);
if (file == NULL) {
bi_errorf("%s: %s", cp, err ? strerror(err) : "not found");