The `void *_Placeholder` was added in struct _iobuf in stdio.h only.
But struct _iobuf is declared in other three headers also. Thoughts
attached.
From 12a57820b60b5e47ff347b9498a43b74d00d0c95 Mon Sep 17 00:00:00 2001
From: Biswapriyo Nath <nathbap...@gmail.com>
Date: Sat, 1 May 2021 11:07:37 +0530
Subject: [PATCH] headers: Follow struct _iobuf delcaration in other files.

The _UCRT condition in struct _iobuf was added in this
fe226dd9028f3f64bef4b4384edb1ef2c95c15f4 commit previously..

Signed-off-by: Biswapriyo Nath <nathbap...@gmail.com>
---
 mingw-w64-crt/include/internal.h | 4 ++++
 mingw-w64-headers/crt/mbstring.h | 4 ++++
 mingw-w64-headers/crt/wchar.h    | 4 ++++
 3 files changed, 12 insertions(+)

diff --git a/mingw-w64-crt/include/internal.h b/mingw-w64-crt/include/internal.h
index 8a7aeb1..078ded2 100644
--- a/mingw-w64-crt/include/internal.h
+++ b/mingw-w64-crt/include/internal.h
@@ -73,6 +73,9 @@ extern "C" {
 #ifndef _FILE_DEFINED
 #define _FILE_DEFINED
   struct _iobuf {
+#ifdef _UCRT
+    void *_Placeholder;
+#else
     char *_ptr;
     int _cnt;
     char *_base;
@@ -81,6 +84,7 @@ extern "C" {
     int _charbuf;
     int _bufsiz;
     char *_tmpfname;
+#endif
   };
   typedef struct _iobuf FILE;
 #endif
diff --git a/mingw-w64-headers/crt/mbstring.h b/mingw-w64-headers/crt/mbstring.h
index b6e48a8..a236c0e 100644
--- a/mingw-w64-headers/crt/mbstring.h
+++ b/mingw-w64-headers/crt/mbstring.h
@@ -16,6 +16,9 @@ extern "C" {
 
 #ifndef _FILE_DEFINED
   struct _iobuf {
+#ifdef _UCRT
+    void *_Placeholder;
+#else
     char *_ptr;
     int _cnt;
     char *_base;
@@ -24,6 +27,7 @@ extern "C" {
     int _charbuf;
     int _bufsiz;
     char *_tmpfname;
+#endif
   };
   typedef struct _iobuf FILE;
 #define _FILE_DEFINED
diff --git a/mingw-w64-headers/crt/wchar.h b/mingw-w64-headers/crt/wchar.h
index ddafe77..aedca07 100644
--- a/mingw-w64-headers/crt/wchar.h
+++ b/mingw-w64-headers/crt/wchar.h
@@ -40,6 +40,9 @@ extern "C" {
 
 #ifndef _FILE_DEFINED
   struct _iobuf {
+#ifdef _UCRT
+    void *_Placeholder;
+#else
     char *_ptr;
     int _cnt;
     char *_base;
@@ -48,6 +51,7 @@ extern "C" {
     int _charbuf;
     int _bufsiz;
     char *_tmpfname;
+#endif
   };
   typedef struct _iobuf FILE;
 #define _FILE_DEFINED
-- 
2.31.1

_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to