Enable use of atexit() on macOS and related platforms.

The atexit() man page indicates that this is expected to behave
in the expected way on unloading of shared libraries.
This commit is contained in:
Bruce Mitchener 2018-02-04 01:26:57 +07:00 committed by Behdad Esfahbod
parent a89573770b
commit e8859fca3e
1 changed files with 6 additions and 0 deletions

View File

@ -221,6 +221,12 @@ static int errno = 0; /* Use something better? */
* https://developer.android.com/tools/sdk/ndk/index.html
*/
# define HB_USE_ATEXIT 1
# elif defined(__APPLE__)
/* For macOS and related platforms, the atexit man page indicates
* that it will be invoked when the library is unloaded, not only
* at application exit.
*/
# define HB_USE_ATEXIT 1
# endif
#endif