Skip to contentSkip to conversation

include/qemu/osdep.h: Move the __USE_MINGW_ANSI_STDIO define up to avoid confliction.

PATCH Superseded driver1998 2 participants 2 messages Apr 29, 2019 – Apr 30, 2019

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

driver1998

author
#0 lore raw

PATCH 4/4 include/qemu/osdep.h: Move the __USE_MINGW_ANSI_STDIO define up to avoid confliction.

---
 include/qemu/osdep.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
include/qemu/osdep.h +5 -5
index 303d315c5d..af2b91f0b8 100644
@@ -85,17 +85,17 @@ extern int daemon(int, int);
 #endif
 #endif
 
+/* enable C99/POSIX format strings (needs mingw32-runtime 3.15 or later) */
+#ifdef __MINGW32__
+#define __USE_MINGW_ANSI_STDIO 1
+#endif
+
 #include <stdarg.h>
 #include <stddef.h>
 #include <stdbool.h>
 #include <stdint.h>
 #include <sys/types.h>
 #include <stdlib.h>
-
-/* enable C99/POSIX format strings (needs mingw32-runtime 3.15 or later) */
-#ifdef __MINGW32__
-#define __USE_MINGW_ANSI_STDIO 1
-#endif
 #include <stdio.h>
 
 #include <string.h>
Signature · 1 line
2.17.1
#1 lore raw

Hi,

Quoted 1 line · On 4/29/19 2:33 AM, driver1998 wrote:

Is driver1998 your real name? :)

include/qemu/osdep.h extern int daemon(int, int); · line 88

Quoted 13 lines
---
 include/qemu/osdep.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
include/qemu/osdep.h +1 -0
index 303d315c5d..af2b91f0b8 100644
@@ -85,17 +85,17 @@ extern int daemon(int, int);
 #endif
 #endif
 
+/* enable C99/POSIX format strings (needs mingw32-runtime 3.15 or later) */

As the comment says, this definition is used by <stdio.h>. I suppose you encountered an issue with one of the following headers including it earlier, which is odd...
Can you paste the error you are trying to fix?

Thanks,

Phil.

Quoted 19 lines
include/qemu/osdep.h +4 -5
+#ifdef __MINGW32__
+#define __USE_MINGW_ANSI_STDIO 1
+#endif
+
 #include <stdarg.h>
 #include <stddef.h>
 #include <stdbool.h>
 #include <stdint.h>
 #include <sys/types.h>
 #include <stdlib.h>
-
-/* enable C99/POSIX format strings (needs mingw32-runtime 3.15 or later) */
-#ifdef __MINGW32__
-#define __USE_MINGW_ANSI_STDIO 1
-#endif
 #include <stdio.h>
 
 #include <string.h>