2 # check library exported symbols
8 exit 0 #disable test on release branch
13 # AIX has different default output format
15 if [ "`uname`" = AIX
]; then
19 while test $# != 0 ;do
21 -lib) lib
="$2" ; shift;;
23 esym
="${esym} com_right\$ free_error_table\$ initialize_error_table_r\$"
24 esym
="${esym} com_err error_message\$ error_table_name\$"
25 esym
="${esym} init_error_table\$ add_to_error_table\$"
26 esym
="${esym} reset_com_err_hook\$ set_com_err_hook\$ _et_list\$"
27 esym
="${esym} et_[A-Za-z0-9]*_error_table"
28 esym
="${esym} initialize_[A-Za-z0-9]*_error_table et_*_error_table" ;;
30 esym
="${esym} print_version\$" ;;
32 esym
="${esym} copy_ free_ length_ decode_ encode_ length_ "
33 esym
="${esym} *.2int\$ int2 asn1_[A-Za-z0-9]*_units\$" ;;
34 -*) echo "unknown option $1" ; exit 1 ;;
40 for a
in "$@" $esym; do
41 symbols
="\$3 !~ /^_?${a}/ ${symbols:+&&} ${symbols}"
44 # F filename, N debugsymbols, W weak symbols, U undefined
46 (nm
$nmargs .libs
/lib
${lib}.a || nm
$nmargs .libs
/lib
${lib}.so
*) |
47 awk "BEGIN { stat = 0 }
48 NF == 3 && \$2 ~ /[A-EG-MO-TVX-Z]/ && $symbols { printf \"%s should not be exported (type %s)\\n\", \$3, \$2; ++stat } END { exit stat }"