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:
parent
369b6b5bfb
commit
a72ef35ce6
|
@ -15,7 +15,7 @@ while read name; do
|
||||||
hattr='__attribute((visibility("hidden")))'
|
hattr='__attribute((visibility("hidden")))'
|
||||||
echo "extern __typeof ($name) $alias $hattr;" >> $HEAD
|
echo "extern __typeof ($name) $alias $hattr;" >> $HEAD
|
||||||
echo "#define $name $alias" >> $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
|
echo "#undef $name" >> $TAIL
|
||||||
cattr='__attribute((alias("'$alias'"), visibility("default")))'
|
cattr='__attribute((alias("'$alias'"), visibility("default")))'
|
||||||
echo "extern __typeof ($name) $name $cattr;" >> $TAIL
|
echo "extern __typeof ($name) $name $cattr;" >> $TAIL
|
||||||
|
|
Loading…
Reference in New Issue