Replace makealias pattern with something supported by POSIX grep (bug 11083)

The suggested replacement in the bug was not supported by GNU grep, so I
created something that should be supported everywhere (famous last words).
This commit is contained in:
Keith Packard 2007-10-25 00:22:04 -07:00
parent 369b6b5bfb
commit a72ef35ce6
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ while read name; do
hattr='__attribute((visibility("hidden")))'
echo "extern __typeof ($name) $alias $hattr;" >> $HEAD
echo "#define $name $alias" >> $HEAD
grep -l '^'$name'\>' "$SRCDIR"/*.c | head -1 | sed -e 's/^.*\/\([^.]*\)\.c/#ifdef __\1__/' >> $TAIL
grep -l '^'$name'[ (]' "$SRCDIR"/*.c | head -1 | sed -e 's/^.*\/\([^.]*\)\.c/#ifdef __\1__/' >> $TAIL
echo "#undef $name" >> $TAIL
cattr='__attribute((alias("'$alias'"), visibility("default")))'
echo "extern __typeof ($name) $name $cattr;" >> $TAIL