patch for dash

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

 



Hi. The following patch fixes dash build failure on Solaris
where /usr/bin/nl (which is in default PATH) is not POSIX compatible.
POSIX-ly correct version is in /usr/xpg4/bin but I think it's easier
to fix use of nl(1).

   [cheusov@pkgsrc-dev]$ /usr/bin/nl -ba -v0 <<< foo
     0  foo
   [cheusov@pkgsrc-dev]$ /usr/bin/nl -b a -v 0 <<< foo
   nl: a: No such file or directory
   [cheusov@pkgsrc-dev]$ uname -srm
   SunOS 5.11 i86pc
   [cheusov@pkgsrc-dev]$


--- src/mkbuiltins.orig	2011-03-15 07:18:06.000000000 +0000
+++ src/mkbuiltins
@@ -97,7 +97,7 @@ cat <<\!
  */
 
 !
-sed 's/	-[a-z]*//' $temp2 | nl -b a -v 0 | LC_COLLATE=C sort -u -k 3,3 |
+sed 's/	-[a-z]*//' $temp2 | nl -ba -v0 | LC_COLLATE=C sort -u -k 3,3 |
 tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ |
 	awk '{	printf "#define %s (builtincmd + %d)\n", $3, $1}'
 printf '\n#define NUMBUILTINS %d\n' $(wc -l < $temp2)

-- 
Best regards, Aleksey Cheusov.
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux