diff --git a/cf/check-symbols.sh b/cf/check-symbols.sh index f49718456..0aa2e3cc8 100644 --- a/cf/check-symbols.sh +++ b/cf/check-symbols.sh @@ -1,6 +1,10 @@ +#!/bin/sh # check library exported symbols # $Id$ +LANG=C +export LANG + esym= symbols= @@ -12,7 +16,8 @@ while test $# != 0 ;do esym="${esym} com_err error_message\$ error_table_name\$" esym="${esym} init_error_table\$ add_to_error_table\$" esym="${esym} reset_com_err_hook\$ set_com_err_hook\$ _et_list\$" - esym="${esym} initialize_[A-Za-z0-9]*_error_table" ;; + esym="${esym} et_[A-Za-z0-9]*_error_table" + esym="${esym} initialize_[A-Za-z0-9]*_error_table et_*_error_table" ;; -version) esym="${esym} print_version\$" ;; -asn1compile) @@ -28,6 +33,8 @@ for a in "$@" $esym; do symbols="\$3 !~ /^_?${a}/ ${symbols:+&&} ${symbols}" done +# F is filename + (nm .libs/lib${lib}.a || nm .libs/lib${lib}.so*) | awk "BEGIN { stat = 0 } NF == 3 && \$2 ~ /[A-EG-Z]/ && $symbols { printf \"%s should not be exported (type %s)\\n\", \$3, \$2; ++stat } END { exit stat }"