From e8a22c13f20739d68e51cd4560f1addbcc9f792c Mon Sep 17 00:00:00 2001 From: Aoran Zeng Date: Wed, 18 Jun 2025 19:47:20 +0800 Subject: [PATCH] Use `C11` --- README.md | 4 ++-- src/chsrc-main.c | 6 +++--- src/framework/core.c | 10 +++++++++- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 34eec7e..e03a6b5 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ ! Contributors : Nul None ! | ! Created On : <2023-12-28> - ! Last Modified : <2025-06-16> + ! Last Modified : <2025-06-18> ! ---------------------------------------------------------- -->
@@ -16,7 +16,7 @@ 全平台通用换源工具与框架 `chsrc`,**目标支持 Linux, Windows (MSYS2, Cygwin), macOS, BSD 等尽可能多的操作系统环境,龙芯、飞腾、RISC-V 等尽可能多的 CPU**。 -我们使用 **C99** 来完成上述目标。我们并不使用 Python 或 JS 等解释语言,因为一个简单的换源工具,不应该强行塞给用户一个庞大的解释器和数十、数百 MB 其他文件。 +我们使用 **C11** 来完成上述目标。我们并不使用 Python 或 JS 等解释语言,因为一个简单的换源工具,不应该强行塞给用户一个庞大的解释器和数十、数百 MB 其他文件。 本软件为**自由软件**,SDPX 软件许可证为 `GPL-3.0-or-later and MIT` diff --git a/src/chsrc-main.c b/src/chsrc-main.c index 56f21d9..12021af 100644 --- a/src/chsrc-main.c +++ b/src/chsrc-main.c @@ -29,13 +29,13 @@ * | Mikachu2333 * | * Created On : <2023-08-28> - * Last Modified : <2025-06-17> + * Last Modified : <2025-06-18> * * chsrc: Change Source —— 全平台通用命令行换源工具 * ------------------------------------------------------------*/ -#define Chsrc_Version "0.2.1.2-dev1" -#define Chsrc_Release_Date "2025/06/16" +#define Chsrc_Version "0.2.1.2-dev2" +#define Chsrc_Release_Date "2025/06/18" #define Chsrc_Maintain_URL "https://github.com/RubyMetric/chsrc" #define Chsrc_Maintain_URL2 "https://gitee.com/RubyMetric/chsrc" diff --git a/src/framework/core.c b/src/framework/core.c index 12f1fba..2f90a1e 100644 --- a/src/framework/core.c +++ b/src/framework/core.c @@ -9,11 +9,19 @@ * | Yangmoooo * | * Created On : <2023-08-29> - * Last Modified : <2025-03-06> + * Last Modified : <2025-06-18> * * chsrc framework * ------------------------------------------------------------*/ +#if defined(__STDC__) && __STDC_VERSION__ < 201112L +# error "chsrc requires C11 or later, please use a new compiler which at least supports C11" +#endif + +#if defined(__STDC__) && __STDC_VERSION__ < 201710L +# warning "chsrc recommends a C17 or later compiler" +#endif + #include "xy.h" #include "struct.h" #include "mirror.c"