blob: a58bf3f4577890fdef25ae1264698c56982f9f6f [file] [log] [blame]
function except() {
case $1 in
selinux_file_context_cmp) # ignore
;;
*)
echo "
%exception $1 {
\$action
if (result < 0) {
PyErr_SetFromErrno(PyExc_OSError);
return NULL;
}
}
"
;;
esac
}
${CC:-gcc} -x c -c -I../include - -aux-info temp.aux < ../include/selinux/selinux.h
for i in `awk '/<stdin>.*extern int/ { print $6 }' temp.aux`; do except $i ; done
rm -f -- temp.aux -.o