diff --git a/src/hb.hh b/src/hb.hh index 4ba46eaa0..7c72179fc 100644 --- a/src/hb.hh +++ b/src/hb.hh @@ -449,7 +449,8 @@ static int HB_UNUSED _hb_errno = 0; # ifdef HAVE_ATEXIT # define hb_atexit atexit # else -# error "atexit not found." + template struct hb_atexit_t { ~hb_atexit_t () { function (); } }; +# define hb_atexit(f) static hb_atexit_t _hb_atexit_##__LINE__; # endif #endif