mirror of
https://github.com/janet-lang/janet
synced 2024-11-25 01:37:19 +00:00
Refactor __MACH__ to JANET_APPLE
This commit is contained in:
parent
c815185574
commit
f270739f9f
@ -68,7 +68,7 @@ extern char **environ;
|
||||
#endif
|
||||
|
||||
/* For macos */
|
||||
#ifdef __MACH__
|
||||
#ifdef JANET_APPLE
|
||||
#include <mach/clock.h>
|
||||
#include <mach/mach.h>
|
||||
#endif
|
||||
|
@ -790,7 +790,7 @@ int32_t janet_sorted_keys(const JanetKV *dict, int32_t cap, int32_t *index_buffe
|
||||
/* Clock shims for various platforms */
|
||||
#ifdef JANET_GETTIME
|
||||
/* For macos */
|
||||
#ifdef __MACH__
|
||||
#ifdef JANET_APPLE
|
||||
#include <mach/clock.h>
|
||||
#include <mach/mach.h>
|
||||
#endif
|
||||
@ -806,7 +806,7 @@ int janet_gettime(struct timespec *spec) {
|
||||
spec->tv_nsec = wintime % 10000000LL * 100;
|
||||
return 0;
|
||||
}
|
||||
#elif defined(__MACH__)
|
||||
#elif defined(JANET_APPLE)
|
||||
int janet_gettime(struct timespec *spec) {
|
||||
clock_serv_t cclock;
|
||||
mach_timespec_t mts;
|
||||
|
@ -57,8 +57,8 @@ extern "C" {
|
||||
#define JANET_BSD 1
|
||||
#endif
|
||||
|
||||
/* Check for Mac */
|
||||
#ifdef __APPLE__
|
||||
/* Check for macOS or OS X */
|
||||
#if defined(__APPLE__) && defined(__MACH__)
|
||||
#define JANET_APPLE 1
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user