Source-Changes-HG archive

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

[src/trunk]: src/sys/rump/include/rump Explicitly avoid MAXNAMELEN. I'm not ...



details:   https://anonhg.NetBSD.org/src/rev/aac381c4528f
branches:  trunk
changeset: 789340:aac381c4528f
user:      pooka <pooka%NetBSD.org@localhost>
date:      Thu Aug 15 21:47:46 2013 +0000

description:
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.

diffstat:

 sys/rump/include/rump/makerumpdefs.sh |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r 2232bfef433d -r aac381c4528f sys/rump/include/rump/makerumpdefs.sh
--- a/sys/rump/include/rump/makerumpdefs.sh     Thu Aug 15 21:41:08 2013 +0000
+++ b/sys/rump/include/rump/makerumpdefs.sh     Thu Aug 15 21:47:46 2013 +0000
@@ -8,7 +8,7 @@
 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 @@
 }
 
 # 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 @@
                n
                s/^}.*;$/};/p
                t
-               /#define/!p
+               /^#/!{/MAXNAMLEN/!p}
                b loop
        }' < $1
 }



Home | Main Index | Thread Index | Old Index