From 05c8e0a31a0d4192c590e833b24393208e1c751f Mon Sep 17 00:00:00 2001 From: tanaka takashi Date: Tue, 30 Jun 2026 19:03:25 +0900 Subject: fix: MCPCをvendored fork化しMCP準拠と接続安定性を改善 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Git submoduleを廃止してMCPCを直接管理 - Windowsで254リクエスト付近に発生する切断を修正 - JSON-RPC 2.0エラー応答を標準化 - tool schemaとruntimeの必須・任意引数を一致 - 1000回連続呼び出しの回帰テストを追加 --- third_party/mcpc/mk/ccdefs-mingw.mk | 89 +++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 third_party/mcpc/mk/ccdefs-mingw.mk (limited to 'third_party/mcpc/mk/ccdefs-mingw.mk') diff --git a/third_party/mcpc/mk/ccdefs-mingw.mk b/third_party/mcpc/mk/ccdefs-mingw.mk new file mode 100644 index 0000000..4b36d0b --- /dev/null +++ b/third_party/mcpc/mk/ccdefs-mingw.mk @@ -0,0 +1,89 @@ +ifneq (,$(and $(isnot_done_ccdefs),$(is_mingw))) + is_unix = xxx + CFLAGS += -Dis_mingw + CFLAGS += -Dis_win # winapi? + + wherecl = $(shell where cl) + ifneq (,$(wherecl)) + found_cl = xxx + endif + + # Use cl whenever possible + ifneq (,$(and $(found_cl),$(is_indirsh))) + CC = cl + is_cllike = xxx + is_winlib = xxx + else + # To find any other cc + + # gh win2019 patch, intentionally to use gcc + ifneq (,$(is_win2019)) + CC = gcc + endif + # GH win2022 patch, intentionally to use gcc + ifneq (,$(is_win2022)) + CC = gcc + endif + + cc_ver = $(shell $(CC) --version) + ifneq (,$(findstring Free Software Foundation,$(cc_ver))) + found_gcc = xxx + endif + ifneq (,$(found_gcc)) + is_gcc = xxx + is_gcclike = xxx + is_unixar = xxx + is_winld = xxx + gcc_ver = $(shell $(CC) --version) + is_gcc8 = $(findstring 8.,$(gcc_ver)) + is_gcc12 = $(findstring 12.,$(gcc_ver)) + is_gcc13 = $(findstring 13.,$(gcc_ver)) + is_gcc14 = $(findstring 14.,$(gcc_ver)) + endif + ifneq (,$(found_clang)) + is_clang = xxx + is_gcclike = xxx + is_unixar = xxx + is_winld = xxx + clang_ver = $(shell $(CC) --version) + is_clang18 = $(findstring 18.,$(clang_ver)) + is_clang19 = $(findstring 19.,$(clang_ver)) + endif + endif + + ifeq (1,2) + else ifneq (,$(is_cllike)) + CFLAGS += /Dis_win + CFLAGS += /Dis_wincl + CFLAGS += /nologo + CFLAGS += /std:c17 + CFLAGS += /DMCPC_C23PTCH_KW1 + CFLAGS += /DMCPC_C23PTCH_CKD1 + CFLAGS += /DMCPC_C23PTCH_UCHAR1 + CFLAGS += /DMCPC_C23GIVUP_FIXENUM + LDFLAGS += /nologo + is_cllike = xxx + is_winlib = xxx + is_cl = xxx + isnot_done_ccdefs = + else ifneq (,$(and $(is_gcc8))) + CFLAGS += -std=c11 + CFLAGS += -DMCPC_C23PTCH_KW1 + CFLAGS += -DMCPC_C23PTCH_CKD1 + CFLAGS += -DMCPC_C23PTCH_UCHAR1 + CFLAGS += -DMCPC_C23GIVUP_FIXENUM + isnot_done_ccdefs = + else ifneq (,$(and $(is_gcc12))) + CFLAGS += -std=c17 + CFLAGS += -DMCPC_C23PTCH_KW1 + CFLAGS += -DMCPC_C23PTCH_CKD1 + CFLAGS += -DMCPC_C23PTCH_UCHAR1 + CFLAGS += -DMCPC_C23GIVUP_FIXENUM + isnot_done_ccdefs = + else ifneq (,$(and $(is_gcc14))) + # fc41 + CFLAGS += -std=c23 + CFLAGS += -DMCPC_C23PTCH_UCHAR2 + isnot_done_ccdefs = + endif +endif -- cgit v1.2.3