[前][次][番号順一覧][スレッド一覧]

ruby-changes:70981

From: Yuta <ko1@a...>
Date: Wed, 19 Jan 2022 17:52:39 +0900 (JST)
Subject: [ruby-changes:70981] 528344b8de (master): include/ruby/win32.h: explicitly define HAVE_SHUTDOWN

https://git.ruby-lang.org/ruby.git/commit/?id=528344b8de

From 528344b8de6c89de7bcd0e77cb386f7881d85e03 Mon Sep 17 00:00:00 2001
From: Yuta Saito <kateinoigakukun@g...>
Date: Wed, 19 Jan 2022 16:40:06 +0900
Subject: include/ruby/win32.h: explicitly define HAVE_SHUTDOWN

Configuration for mingw32 can't detect 'shutdown' due to wrong -l
option even though it's available (this has been going on for a while,
and it needs to be fixed).
In this situation, include/ruby/missing.h declares a stub shutdown
function since 7ee786388a, and another shutdown decl is came from
system header. They are incompatible at stdcall attribute, so it
causes compilation failure.
This change defines a HAVE_SHUTDOWN to guard a newly introduced stub
decl in include/ruby/missing.h
---
 include/ruby/win32.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/ruby/win32.h b/include/ruby/win32.h
index 4f1266599ee..a3f466d627a 100644
--- a/include/ruby/win32.h
+++ b/include/ruby/win32.h
@@ -653,6 +653,8 @@ extern char *rb_w32_strerror(int); https://github.com/ruby/ruby/blob/trunk/include/ruby/win32.h#L653
 #undef setsockopt
 #define setsockopt(s, v, n, o, l) rb_w32_setsockopt(s, v, n, o, l)
 
+#undef HAVE_SHUTDOWN
+#define HAVE_SHUTDOWN 1
 #undef shutdown
 #define shutdown(s, h)		rb_w32_shutdown(s, h)
 
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]