diff mbox

create builtins.c properly on old cpp

Message ID 2410222201414.mjQV5WR4491251$@sra-tohoku.co.jp.msg (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show

Commit Message

kabe@sra-tohoku.co.jp Dec. 22, 2014, 5:50 a.m. UTC
Encontered this on ancient gcc-2.95.3 environment;
src/builtins.def.in -> src/builtins.def generation emitted
^ $
lines (likely by /* */), which where NOT ignored by 
src/mkbuiltins and generating bogus builtins.c.

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

Comments

Herbert Xu Dec. 25, 2014, 10:52 p.m. UTC | #1
kabe@sra-tohoku.co.jp wrote:
> Encontered this on ancient gcc-2.95.3 environment;
> src/builtins.def.in -> src/builtins.def generation emitted
> ^ $
> lines (likely by /* */), which where NOT ignored by 
> src/mkbuiltins and generating bogus builtins.c.

Patch applied.
diff mbox

Patch

diff -U6 -p dash-0.5.8/src/mkbuiltins.dist dash-0.5.8/src/mkbuiltins
--- dash-0.5.8/src/mkbuiltins.dist	Sun Sep 28 17:19:32 2014
+++ dash-0.5.8/src/mkbuiltins	Mon Dec 22 14:36:43 2014
@@ -66,13 +66,13 @@  cat <<\!
  */
 
 #include "shell.h"
 #include "builtins.h"
 
 !
-< $builtins sed '/^#/d; /^$/d' > $temp
+< $builtins sed '/^#/d; /^ *$/d' > $temp
 awk '{	printf "int %s(int, char **);\n", $1}' $temp
 echo '
 const struct builtincmd builtincmd[] = {'
 awk '{	for (i = 2 ; i <= NF ; i++) {
 		line = $i "\t" $1
 		if ($i ~ /^-/)