diff --git Source/cmMachO.h Source/cmMachO.h
index 0c44b55..06c39db 100644
|
|
|
7 | 7 | |
8 | 8 | #include <iosfwd> |
9 | 9 | #include <string> |
| 10 | #include <memory> |
10 | 11 | |
11 | 12 | #if !defined(CMAKE_USE_MACH_PARSER) |
12 | 13 | # error "This file may be included only if CMAKE_USE_MACH_PARSER is enabled." |
diff --git Utilities/cmlibuv/src/unix/core.c Utilities/cmlibuv/src/unix/core.c
index cf7dea0..b48ca73 100644
|
|
skip: |
525 | 525 | * will unwind the thread when it's in the cancel state. Work around that |
526 | 526 | * by making the system call directly. Musl libc is unaffected. |
527 | 527 | */ |
| 528 | |
| 529 | #if defined(__GNUC__) |
| 530 | #define GCC_VERSION \ |
| 531 | (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) |
| 532 | #endif |
| 533 | #if defined(__clang__) || (defined(GCC_VERSION) && (GCC_VERSION >= 40500)) |
| 534 | /* gcc diagnostic pragmas available */ |
| 535 | # define GCC_DIAGNOSTIC_AVAILABLE |
| 536 | #endif |
| 537 | |
528 | 538 | int uv__close_nocancel(int fd) { |
529 | | #if defined(__APPLE__) |
| 539 | #if defined(__APPLE__) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1050 |
| 540 | |
| 541 | #if defined(GCC_DIAGNOSTIC_AVAILABLE) |
530 | 542 | #pragma GCC diagnostic push |
531 | 543 | #pragma GCC diagnostic ignored "-Wdollar-in-identifier-extension" |
| 544 | #endif |
| 545 | |
532 | 546 | #if defined(__LP64__) |
533 | 547 | extern int close$NOCANCEL(int); |
534 | 548 | return close$NOCANCEL(fd); |
… |
… |
int uv__close_nocancel(int fd) { |
536 | 550 | extern int close$NOCANCEL$UNIX2003(int); |
537 | 551 | return close$NOCANCEL$UNIX2003(fd); |
538 | 552 | #endif |
| 553 | |
| 554 | #if defined(GCC_DIAGNOSTIC_AVAILABLE) |
539 | 555 | #pragma GCC diagnostic pop |
| 556 | #endif |
| 557 | |
540 | 558 | #elif defined(__linux__) |
541 | 559 | return syscall(SYS_close, fd); |
542 | 560 | #else |
… |
… |
int uv_os_unsetenv(const char* name) { |
1306 | 1324 | if (name == NULL) |
1307 | 1325 | return UV_EINVAL; |
1308 | 1326 | |
| 1327 | #if ( defined(__APPLE__) && MAC_OS_X_VERSION_MAX_ALLOWED < 1050) |
| 1328 | unsetenv(name); |
| 1329 | #else |
1309 | 1330 | if (unsetenv(name) != 0) |
1310 | 1331 | return UV__ERR(errno); |
| 1332 | #endif |
1311 | 1333 | |
1312 | 1334 | return 0; |
1313 | 1335 | } |
diff --git Utilities/cmlibuv/src/unix/fs.c Utilities/cmlibuv/src/unix/fs.c
index 5fb34f1..7453980 100644
|
|
static ssize_t uv__fs_sendfile(uv_fs_t* req) { |
743 | 743 | |
744 | 744 | return -1; |
745 | 745 | } |
746 | | #elif defined(__APPLE__) || \ |
| 746 | #elif defined(__APPLE__) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1050 || \ |
747 | 747 | defined(__DragonFly__) || \ |
748 | 748 | defined(__FreeBSD__) || \ |
749 | 749 | defined(__FreeBSD_kernel__) |
… |
… |
static void uv__to_stat(struct stat* src, uv_stat_t* dst) { |
1055 | 1055 | dst->st_blksize = src->st_blksize; |
1056 | 1056 | dst->st_blocks = src->st_blocks; |
1057 | 1057 | |
1058 | | #if defined(__APPLE__) |
| 1058 | #if defined(__APPLE__) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1050 |
1059 | 1059 | dst->st_atim.tv_sec = src->st_atimespec.tv_sec; |
1060 | 1060 | dst->st_atim.tv_nsec = src->st_atimespec.tv_nsec; |
1061 | 1061 | dst->st_mtim.tv_sec = src->st_mtimespec.tv_sec; |
diff --git Utilities/cmlibuv/src/unix/tty.c Utilities/cmlibuv/src/unix/tty.c
index db479d6..5a7a86b 100644
|
|
static int uv__tty_is_slave(const int fd) { |
44 | 44 | int dummy; |
45 | 45 | |
46 | 46 | result = ioctl(fd, TIOCGPTN, &dummy) != 0; |
47 | | #elif defined(__APPLE__) |
| 47 | #elif defined(__APPLE__) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1050 |
48 | 48 | char dummy[256]; |
49 | 49 | |
50 | 50 | result = ioctl(fd, TIOCPTYGNAME, &dummy) != 0; |