aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-10-12 03:17:52 -0400
committerGitHub <noreply@github.com>2022-10-12 03:17:52 -0400
commita3c9c154b4822f0f46c9f09df642fd0d40e24a89 (patch)
tree657e736c577bb6e03335af55b8bf6df93a79fc0a /src
parente6ebdcb82ed9fd226ef18670115b8b2617c0a392 (diff)
parentb020d83265b10544f4f1f4da1502dba0ebb445d6 (diff)
downloadzig-a3c9c154b4822f0f46c9f09df642fd0d40e24a89.tar.gz
zig-a3c9c154b4822f0f46c9f09df642fd0d40e24a89.zip
Merge pull request #13089 from ziglang/update-mingw
Diffstat (limited to 'src')
-rw-r--r--src/mingw.zig9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mingw.zig b/src/mingw.zig
index 23035fe72b..0d5d1fd0f7 100644
--- a/src/mingw.zig
+++ b/src/mingw.zig
@@ -91,6 +91,7 @@ pub fn buildCRTFile(comp: *Compilation, crt_file: CRTFile) !void {
"-D_CRTBLD",
"-D_WIN32_WINNT=0x0f00",
"-D__MSVCRT_VERSION__=0x700",
+ "-D__USE_MINGW_ANSI_STDIO=0",
});
c_source_files[i] = .{
.src_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{
@@ -105,7 +106,7 @@ pub fn buildCRTFile(comp: *Compilation, crt_file: CRTFile) !void {
.msvcrt_os_lib => {
const extra_flags = try arena.dupe([]const u8, &[_][]const u8{
"-DHAVE_CONFIG_H",
- "-D__LIBMSVCRT__",
+ "-D__LIBMSVCRT_OS__",
"-I",
try comp.zig_lib_directory.join(arena, &[_][]const u8{ "libc", "mingw", "include" }),
@@ -114,6 +115,7 @@ pub fn buildCRTFile(comp: *Compilation, crt_file: CRTFile) !void {
"-D_CRTBLD",
"-D_WIN32_WINNT=0x0f00",
"-D__MSVCRT_VERSION__=0x700",
+ "-D__USE_MINGW_ANSI_STDIO=0",
"-isystem",
try comp.zig_lib_directory.join(arena, &[_][]const u8{ "libc", "include", "any-windows-any" }),
@@ -162,6 +164,7 @@ pub fn buildCRTFile(comp: *Compilation, crt_file: CRTFile) !void {
"-D_CRTBLD",
"-D_WIN32_WINNT=0x0f00",
"-D__MSVCRT_VERSION__=0x700",
+ "-D__USE_MINGW_ANSI_STDIO=0",
"-isystem",
try comp.zig_lib_directory.join(arena, &[_][]const u8{ "libc", "include", "any-windows-any" }),
@@ -224,6 +227,7 @@ pub fn buildCRTFile(comp: *Compilation, crt_file: CRTFile) !void {
"-D_CRTBLD",
"-D_WIN32_WINNT=0x0f00",
"-D__MSVCRT_VERSION__=0x700",
+ "-D__USE_MINGW_ANSI_STDIO=0",
"-isystem",
try comp.zig_lib_directory.join(arena, &[_][]const u8{
@@ -269,6 +273,7 @@ fn add_cc_args(
"-D_CRTBLD",
"-D_WIN32_WINNT=0x0f00",
"-D__MSVCRT_VERSION__=0x700",
+ "-D__USE_MINGW_ANSI_STDIO=0",
});
}
@@ -677,7 +682,6 @@ const mingwex_generic_src = [_][]const u8{
"math" ++ path.sep_str ++ "cbrt.c",
"math" ++ path.sep_str ++ "cbrtf.c",
"math" ++ path.sep_str ++ "cbrtl.c",
- "math" ++ path.sep_str ++ "cephes_emath.c",
"math" ++ path.sep_str ++ "copysign.c",
"math" ++ path.sep_str ++ "copysignf.c",
"math" ++ path.sep_str ++ "coshf.c",
@@ -810,7 +814,6 @@ const mingwex_generic_src = [_][]const u8{
"misc" ++ path.sep_str ++ "strnlen.c",
"misc" ++ path.sep_str ++ "strsafe.c",
"misc" ++ path.sep_str ++ "strtoimax.c",
- "misc" ++ path.sep_str ++ "strtold.c",
"misc" ++ path.sep_str ++ "strtoumax.c",
"misc" ++ path.sep_str ++ "tdelete.c",
"misc" ++ path.sep_str ++ "tfind.c",