summaryrefslogtreecommitdiff
path: root/lib/fontconfig/src/makealias
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2006-11-25 18:42:53 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2006-11-25 18:42:53 +0000
commit585da679584ca068252199ad4fec7ee44cde2543 (patch)
tree07b22cf8e06f61ad42abec6e2cd4e3bc1916a7a5 /lib/fontconfig/src/makealias
parent36af073de3f5895bef731e0a54857f779889848b (diff)
Import fontconfig 2.4.1
Diffstat (limited to 'lib/fontconfig/src/makealias')
-rw-r--r--lib/fontconfig/src/makealias26
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/fontconfig/src/makealias b/lib/fontconfig/src/makealias
new file mode 100644
index 000000000..02167b25b
--- /dev/null
+++ b/lib/fontconfig/src/makealias
@@ -0,0 +1,26 @@
+#!/bin/sh
+SRCDIR=$1
+shift
+HEAD=fcalias.h
+TAIL=fcaliastail.h
+rm -f $HEAD $TAIL
+echo "#if HAVE_GNUC_ATTRIBUTE" >> $TAIL
+cat "$@" | grep '^Fc[^ ]* *(' | sed -e 's/ *(.*$//' |
+while read name; do
+ case $name in
+ FcCacheDir|FcCacheSubdir)
+ ;;
+ *)
+ alias="IA__$name"
+ hattr='__attribute((visibility("hidden")))'
+ echo "extern __typeof ($name) $alias $hattr;" >> $HEAD
+ echo "#define $name $alias" >> $HEAD
+ grep -l -w '^'$name "$SRCDIR"/*.c | sed -e 's/^.*\/\([^.]*\)\.c/#ifdef __\1__/' >> $TAIL
+ echo "#undef $name" >> $TAIL
+ cattr='__attribute((alias("'$alias'"), visibility("default")))'
+ echo "extern __typeof ($name) $name $cattr;" >> $TAIL
+ echo "#endif" >> $TAIL
+ ;;
+ esac
+done
+echo "#endif" >> $TAIL