Module Name:    src
Committed By:   pooka
Date:           Thu Aug 15 21:47:46 UTC 2013

Modified Files:
        src/sys/rump/include/rump: makerumpdefs.sh

Log Message:
Explicitly avoid MAXNAMELEN.  I'm not claiming it's pretty, but most
likely it's more bang for the buck than adding cpp support to the
sed script.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/rump/include/rump/makerumpdefs.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/include/rump/makerumpdefs.sh
diff -u src/sys/rump/include/rump/makerumpdefs.sh:1.19 src/sys/rump/include/rump/makerumpdefs.sh:1.20
--- src/sys/rump/include/rump/makerumpdefs.sh:1.19	Thu Aug 15 20:45:12 2013
+++ src/sys/rump/include/rump/makerumpdefs.sh	Thu Aug 15 21:47:46 2013
@@ -8,7 +8,7 @@ echo Generating rumpdefs.h
 rm -f rumpdefs.h
 exec > rumpdefs.h
 
-printf '/*	$NetBSD: makerumpdefs.sh,v 1.19 2013/08/15 20:45:12 pooka Exp $	*/\n\n'
+printf '/*	$NetBSD: makerumpdefs.sh,v 1.20 2013/08/15 21:47:46 pooka Exp $	*/\n\n'
 printf '/*\n *\tAUTOMATICALLY GENERATED.  DO NOT EDIT.\n */\n\n'
 printf '#ifndef _RUMP_RUMPDEFS_H_\n'
 printf '#define _RUMP_RUMPDEFS_H_\n\n'
@@ -20,6 +20,7 @@ fromvers () {
 }
 
 # not perfect, but works well enough for the cases so far
+# (also has one struct-specific hack for MAXNAMLEN)
 getstruct () {
 	sed -n '/struct[ 	]*'"$2"'[ 	]*{/{
 		a\
@@ -28,7 +29,7 @@ struct rump_'"$2"' {
 		n
 		s/^}.*;$/};/p
 		t
-		/#define/!p
+		/^#/!{/MAXNAMLEN/!p}
 		b loop
 	}' < $1
 }

Reply via email to