libsysprof-capture: Use _WIN32 rather than G_OS_WIN32

They should be equivalent.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #40
This commit is contained in:
Philip Withnall
2020-07-02 12:30:43 +01:00
parent 214ec21ce8
commit 0d68b1afb5

View File

@ -61,7 +61,7 @@
#include <glib.h> #include <glib.h>
#include <unistd.h> #include <unistd.h>
#ifdef G_OS_WIN32 #ifdef _WIN32
# include <process.h> # include <process.h>
# define WIN32_LEAN_AND_MEAN # define WIN32_LEAN_AND_MEAN
# include <windows.h> # include <windows.h>
@ -70,7 +70,7 @@
#include "sysprof-capture-util-private.h" #include "sysprof-capture-util-private.h"
#include "sysprof-macros.h" #include "sysprof-macros.h"
#ifdef G_OS_WIN32 #ifdef _WIN32
static G_LOCK_DEFINE (_sysprof_io_sync); static G_LOCK_DEFINE (_sysprof_io_sync);
#endif #endif
@ -81,7 +81,7 @@ size_t
if SYSPROF_UNLIKELY (pgsz == 0) if SYSPROF_UNLIKELY (pgsz == 0)
{ {
#ifdef G_OS_WIN32 #ifdef _WIN32
SYSTEM_INFO system_info; SYSTEM_INFO system_info;
GetSystemInfo (&system_info); GetSystemInfo (&system_info);
pgsz = system_info.dwPageSize; pgsz = system_info.dwPageSize;
@ -99,7 +99,7 @@ ssize_t
size_t count, size_t count,
off_t offset) off_t offset)
{ {
#ifdef G_OS_WIN32 #ifdef _WIN32
ssize_t ret = -1; ssize_t ret = -1;
G_LOCK (_sysprof_io_sync); G_LOCK (_sysprof_io_sync);
@ -121,7 +121,7 @@ ssize_t
size_t count, size_t count,
off_t offset) off_t offset)
{ {
#ifdef G_OS_WIN32 #ifdef _WIN32
ssize_t ret = -1; ssize_t ret = -1;
G_LOCK (_sysprof_io_sync); G_LOCK (_sysprof_io_sync);
@ -142,7 +142,7 @@ ssize_t
const void *buf, const void *buf,
size_t count) size_t count)
{ {
#ifdef G_OS_WIN32 #ifdef _WIN32
ssize_t ret = -1; ssize_t ret = -1;
G_LOCK (_sysprof_io_sync); G_LOCK (_sysprof_io_sync);
@ -160,7 +160,7 @@ ssize_t
int32_t int32_t
(_sysprof_getpid) (void) (_sysprof_getpid) (void)
{ {
#ifdef G_OS_WIN32 #ifdef _WIN32
return _getpid (); return _getpid ();
#else #else
return getpid (); return getpid ();