From b45c9f60a39406863119d0ee622748683cdbc40d Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 19 Oct 2014 17:34:09 +0000 Subject: signal.c: adjust indent of preprocessing directives git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- signal.c | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'signal.c') diff --git a/signal.c b/signal.c index 487afad0e1..bbe36ffe93 100644 --- a/signal.c +++ b/signal.c @@ -731,13 +731,13 @@ rb_get_next_signal(void) #if defined(USE_SIGALTSTACK) || defined(_WIN32) NORETURN(void ruby_thread_stack_overflow(rb_thread_t *th)); -#if !(defined(HAVE_UCONTEXT_H) && (defined __i386__ || defined __x86_64__)) -#elif defined __linux__ -# define USE_UCONTEXT_REG 1 -#elif defined __APPLE__ -# define USE_UCONTEXT_REG 1 -#endif -#ifdef USE_UCONTEXT_REG +# if !(defined(HAVE_UCONTEXT_H) && (defined __i386__ || defined __x86_64__)) +# elif defined __linux__ +# define USE_UCONTEXT_REG 1 +# elif defined __APPLE__ +# define USE_UCONTEXT_REG 1 +# endif +# ifdef USE_UCONTEXT_REG static void check_stack_overflow(const uintptr_t addr, const ucontext_t *ctx) { @@ -773,7 +773,7 @@ check_stack_overflow(const uintptr_t addr, const ucontext_t *ctx) ruby_thread_stack_overflow(th); } } -#else +# else static void check_stack_overflow(const void *addr) { @@ -783,23 +783,23 @@ check_stack_overflow(const void *addr) ruby_thread_stack_overflow(th); } } -#endif -#ifdef _WIN32 -#define CHECK_STACK_OVERFLOW() check_stack_overflow(0) -#else -#define FAULT_ADDRESS info->si_addr -# ifdef USE_UCONTEXT_REG -# define CHECK_STACK_OVERFLOW() check_stack_overflow((uintptr_t)FAULT_ADDRESS, ctx) -#else -# define CHECK_STACK_OVERFLOW() check_stack_overflow(FAULT_ADDRESS) -#endif -#define MESSAGE_FAULT_ADDRESS " at %p", FAULT_ADDRESS -#endif +# endif +# ifdef _WIN32 +# define CHECK_STACK_OVERFLOW() check_stack_overflow(0) +# else +# define FAULT_ADDRESS info->si_addr +# ifdef USE_UCONTEXT_REG +# define CHECK_STACK_OVERFLOW() check_stack_overflow((uintptr_t)FAULT_ADDRESS, ctx) +# else +# define CHECK_STACK_OVERFLOW() check_stack_overflow(FAULT_ADDRESS) +# endif +# define MESSAGE_FAULT_ADDRESS " at %p", FAULT_ADDRESS +# endif #else -#define CHECK_STACK_OVERFLOW() (void)0 +# define CHECK_STACK_OVERFLOW() (void)0 #endif #ifndef MESSAGE_FAULT_ADDRESS -#define MESSAGE_FAULT_ADDRESS +# define MESSAGE_FAULT_ADDRESS #endif #if defined SIGSEGV || defined SIGBUS || defined SIGILL || defined SIGFPE -- cgit v1.2.3