Skip to content

Commit 4207933

Browse files
authored
Merge pull request #1361 from liushuyu/fix-glib-sys-h
glib-sys: Add missing includes in `manual.h`
2 parents cbf3de7 + 7bca6fb commit 4207933

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

glib/sys/tests/manual.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,23 @@
33
#include <glib.h>
44
#include <glib-object.h>
55

6+
#ifndef G_PLATFORM_WIN32
7+
// glib-unix.h is not included automatically
8+
#include <glib-unix.h>
9+
// polyfill the WIN32 constants on non-Win32 platforms
10+
typedef enum
11+
{
12+
G_WIN32_OS_ANY,
13+
G_WIN32_OS_WORKSTATION,
14+
G_WIN32_OS_SERVER,
15+
} GWin32OSType;
16+
#endif
17+
18+
// polyfill when the platform doesn't define tracing macros
19+
#ifndef G_TRACE_CURRENT_TIME
20+
#define G_TRACE_CURRENT_TIME 0
21+
#endif
22+
623
// included in Gir on all platforms even though it is only present on windows
724
#ifndef G_WIN32_MSG_HANDLE
825
#define G_WIN32_MSG_HANDLE 19981206

0 commit comments

Comments
 (0)