Merge branch 'win32-cleanup' into 'main'

Win32 cleanup: do not define STRICT

See merge request GNOME/glib!4339
This commit is contained in:
Philip Withnall 2024-10-09 16:01:57 +00:00
commit 26d8553af5
9 changed files with 8 additions and 22 deletions

View File

@ -57,12 +57,9 @@
#include <string.h> #include <string.h>
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
# define STRICT /* Strict typing, please */ #include <windows.h>
# define _WIN32_WINDOWS 0x0401 /* to get IsDebuggerPresent */
# include <windows.h>
# undef STRICT
#else #else
# include <fcntl.h> #include <fcntl.h>
#endif #endif
#include "gbacktrace.h" #include "gbacktrace.h"

View File

@ -32,13 +32,8 @@
#include <stdlib.h> #include <stdlib.h>
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
#include "win_iconv.c"
#endif
#ifdef G_PLATFORM_WIN32
#define STRICT
#include <windows.h> #include <windows.h>
#undef STRICT #include "win_iconv.c"
#endif #endif
#include "gconvert.h" #include "gconvert.h"

View File

@ -96,9 +96,8 @@
#endif /* HAVE_PIDFD */ #endif /* HAVE_PIDFD */
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
#define STRICT
#include <windows.h> #include <windows.h>
#endif /* G_OS_WIN32 */ #endif
#ifdef HAVE_MACH_MACH_TIME_H #ifdef HAVE_MACH_MACH_TIME_H
#include <mach/mach_time.h> #include <mach/mach_time.h>

View File

@ -72,7 +72,6 @@
#include <errno.h> #include <errno.h>
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
#define STRICT
#include <windows.h> #include <windows.h>
#include <process.h> #include <process.h>
#endif /* G_OS_WIN32 */ #endif /* G_OS_WIN32 */

View File

@ -46,8 +46,6 @@
#endif #endif
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
#define STRICT
#include <windows.h> #include <windows.h>
#include <wchar.h> #include <wchar.h>
#endif #endif

View File

@ -30,9 +30,7 @@
#ifdef G_PLATFORM_WIN32 #ifdef G_PLATFORM_WIN32
#include <stdio.h> #include <stdio.h>
#define STRICT
#include <windows.h> #include <windows.h>
#undef STRICT
#endif #endif
#include "gconvert.h" #include "gconvert.h"

View File

@ -41,10 +41,8 @@
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>
#define STRICT /* Strict typing, please */
#include <winsock2.h> #include <winsock2.h>
#include <windows.h> #include <windows.h>
#undef STRICT
#ifndef G_WITH_CYGWIN #ifndef G_WITH_CYGWIN
#include <direct.h> #include <direct.h>
#endif #endif

View File

@ -36,7 +36,6 @@
#include <io.h> #include <io.h>
#include <fcntl.h> #include <fcntl.h>
#include <process.h> #include <process.h>
#define STRICT
#include <windows.h> #include <windows.h>
#define pipe(fds) _pipe(fds, 4096, _O_BINARY) #define pipe(fds) _pipe(fds, 4096, _O_BINARY)
#endif #endif

View File

@ -24,7 +24,10 @@
# define WINVER 0x0500 # define WINVER 0x0500
#endif #endif
#define STRICT #ifndef STRICT
# define STRICT
#endif
#include <windows.h> #include <windows.h>
#include <errno.h> #include <errno.h>
#include <string.h> #include <string.h>