1function except() { 2echo " 3%exception $1 { 4 \$action 5 if (result < 0) { 6 PyErr_SetFromErrno(PyExc_OSError); 7 SWIG_fail; 8 } 9}" 10} 11if ! ${CC:-gcc} -x c -c -I../include -o temp.o - -aux-info temp.aux < ../include/semanage/semanage.h 12then 13 # clang does not support -aux-info so fall back to gcc 14 gcc -x c -c -I../include -o temp.o - -aux-info temp.aux < ../include/semanage/semanage.h 15fi 16for i in `awk '/extern int/ { print $6 }' temp.aux`; do except $i ; done 17rm -f -- temp.aux temp.o 18