Extract an avoid errno compile flag
This commit is contained in:
parent
8a16d6f1c1
commit
412d6cac3a
|
@ -48,7 +48,6 @@
|
||||||
#endif /* HAVE_SYS_MMAN_H */
|
#endif /* HAVE_SYS_MMAN_H */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <errno.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,7 @@
|
||||||
#define HB_NO_BITMAP
|
#define HB_NO_BITMAP
|
||||||
#define HB_NO_CFF
|
#define HB_NO_CFF
|
||||||
#define HB_NO_COLOR
|
#define HB_NO_COLOR
|
||||||
|
#define HB_NO_ERRNO
|
||||||
#define HB_NO_FACE_COLLECT_UNICODES
|
#define HB_NO_FACE_COLLECT_UNICODES
|
||||||
#define HB_NO_GETENV
|
#define HB_NO_GETENV
|
||||||
#define HB_NO_HINTING
|
#define HB_NO_HINTING
|
||||||
|
|
|
@ -180,7 +180,6 @@
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <errno.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
@ -355,7 +354,7 @@ extern "C" void hb_free_impl(void *ptr);
|
||||||
# endif
|
# endif
|
||||||
# if _WIN32_WCE < 0x800
|
# if _WIN32_WCE < 0x800
|
||||||
# define HB_NO_SETLOCALE
|
# define HB_NO_SETLOCALE
|
||||||
static int errno = 0; /* Use something better? */
|
# define HB_NO_ERRNO
|
||||||
# endif
|
# endif
|
||||||
# elif defined(WINAPI_FAMILY) && (WINAPI_FAMILY==WINAPI_FAMILY_PC_APP || WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP)
|
# elif defined(WINAPI_FAMILY) && (WINAPI_FAMILY==WINAPI_FAMILY_PC_APP || WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP)
|
||||||
# ifndef HB_NO_GETENV
|
# ifndef HB_NO_GETENV
|
||||||
|
@ -371,6 +370,12 @@ static int errno = 0; /* Use something better? */
|
||||||
#define getenv(Name) nullptr
|
#define getenv(Name) nullptr
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HB_NO_ERRNO
|
||||||
|
static int errno = 0; /* Use something better? */
|
||||||
|
#else
|
||||||
|
#include <errno.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(HAVE_ATEXIT) && !defined(HB_USE_ATEXIT)
|
#if defined(HAVE_ATEXIT) && !defined(HB_USE_ATEXIT)
|
||||||
/* atexit() is only safe to be called from shared libraries on certain
|
/* atexit() is only safe to be called from shared libraries on certain
|
||||||
* platforms. Whitelist.
|
* platforms. Whitelist.
|
||||||
|
|
Loading…
Reference in New Issue