ruby-changes:66039
From: Benoit <ko1@a...>
Date: Tue, 4 May 2021 21:57:12 +0900 (JST)
Subject: [ruby-changes:66039] 229cbeba8c (master): Fix -Wundef warnings in coroutine/*/Context.h
https://git.ruby-lang.org/ruby.git/commit/?id=229cbeba8c From 229cbeba8c928dc6ee5eb21951e00c43a6e5225c Mon Sep 17 00:00:00 2001 From: Benoit Daloze <eregontp@g...> Date: Thu, 29 Apr 2021 14:29:57 +0200 Subject: Fix -Wundef warnings in coroutine/*/Context.h * See [Feature #17752] Co-authored-by: xtkoba (Tee KOBAYASHI) <xtkoba+ruby@g...> --- coroutine/copy/Context.h | 3 +++ coroutine/ucontext/Context.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/coroutine/copy/Context.h b/coroutine/copy/Context.h index db13604..2cb2bc1 100644 --- a/coroutine/copy/Context.h +++ b/coroutine/copy/Context.h @@ -23,9 +23,12 @@ https://github.com/ruby/ruby/blob/trunk/coroutine/copy/Context.h#L23 #define COROUTINE __attribute__((noreturn)) void +#ifdef HAVE_STDINT_H +#include <stdint.h> #if INTPTR_MAX <= INT32_MAX #define COROUTINE_LIMITED_ADDRESS_SPACE #endif +#endif // This stack copying implementation which uses a private stack for each coroutine, including the main one. #define COROUTINE_PRIVATE_STACK diff --git a/coroutine/ucontext/Context.h b/coroutine/ucontext/Context.h index 7971086..39d7ca7 100644 --- a/coroutine/ucontext/Context.h +++ b/coroutine/ucontext/Context.h @@ -16,9 +16,12 @@ https://github.com/ruby/ruby/blob/trunk/coroutine/ucontext/Context.h#L16 #define COROUTINE __attribute__((noreturn)) void +#ifdef HAVE_STDINT_H +#include <stdint.h> #if INTPTR_MAX <= INT32_MAX #define COROUTINE_LIMITED_ADDRESS_SPACE #endif +#endif struct coroutine_context { -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/