Mercurial > vim
comparison src/os_unix.c @ 12716:351cf7c67bbe v8.0.1236
patch 8.0.1236: Mac features are confusing
commit https://github.com/vim/vim/commit/d057301b1f28736f094affa17b190244ad56e8d9
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Oct 28 21:11:06 2017 +0200
patch 8.0.1236: Mac features are confusing
Problem: Mac features are confusing.
Solution: Make feature names more consistent, add "osxdarwin". Rename
feature flags, cleanup Mac code. (Kazunobu Kuriyama, closes #2178)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 28 Oct 2017 21:15:35 +0200 |
parents | d177c142d086 |
children | 14f287552218 |
comparison
equal
deleted
inserted
replaced
12715:279ec0abb4ac | 12716:351cf7c67bbe |
---|---|
854 * This helps when we run out of stack space, which causes a SIGSEGV. The | 854 * This helps when we run out of stack space, which causes a SIGSEGV. The |
855 * signal handler then must run on another stack, since the normal stack is | 855 * signal handler then must run on another stack, since the normal stack is |
856 * completely full. | 856 * completely full. |
857 */ | 857 */ |
858 | 858 |
859 #if defined(HAVE_AVAILABILITYMACROS_H) | |
860 # include <AvailabilityMacros.h> | |
861 #endif | |
862 | |
863 #ifndef SIGSTKSZ | 859 #ifndef SIGSTKSZ |
864 # define SIGSTKSZ 8000 /* just a guess of how much stack is needed... */ | 860 # define SIGSTKSZ 8000 /* just a guess of how much stack is needed... */ |
865 #endif | 861 #endif |
866 | 862 |
867 # ifdef HAVE_SIGALTSTACK | 863 # ifdef HAVE_SIGALTSTACK |
877 init_signal_stack(void) | 873 init_signal_stack(void) |
878 { | 874 { |
879 if (signal_stack != NULL) | 875 if (signal_stack != NULL) |
880 { | 876 { |
881 # ifdef HAVE_SIGALTSTACK | 877 # ifdef HAVE_SIGALTSTACK |
882 # if defined(__APPLE__) && (!defined(MAC_OS_X_VERSION_MAX_ALLOWED) \ | |
883 || MAC_OS_X_VERSION_MAX_ALLOWED <= 1040) | |
884 /* missing prototype. Adding it to osdef?.h.in doesn't work, because | |
885 * "struct sigaltstack" needs to be declared. */ | |
886 extern int sigaltstack(const struct sigaltstack *ss, struct sigaltstack *oss); | |
887 # endif | |
888 | |
889 # ifdef HAVE_SS_BASE | 878 # ifdef HAVE_SS_BASE |
890 sigstk.ss_base = signal_stack; | 879 sigstk.ss_base = signal_stack; |
891 # else | 880 # else |
892 sigstk.ss_sp = signal_stack; | 881 sigstk.ss_sp = signal_stack; |
893 # endif | 882 # endif |