*: use WIN32 instead of G_OS_WIN32

This commit is contained in:
Max Kellermann 2013-10-15 08:33:44 +02:00
parent 9508ea982b
commit e4e80ff0cb
7 changed files with 16 additions and 16 deletions

View File

@ -47,7 +47,7 @@ client_puts(Client *client, const char *s)
void void
client_vprintf(Client *client, const char *fmt, va_list args) client_vprintf(Client *client, const char *fmt, va_list args)
{ {
#ifndef G_OS_WIN32 #ifndef WIN32
va_list tmp; va_list tmp;
int length; int length;

View File

@ -54,7 +54,7 @@
#ifdef WIN32 #ifdef WIN32
#define CONFIG_FILE_LOCATION "\\mpd\\mpd.conf" #define CONFIG_FILE_LOCATION "\\mpd\\mpd.conf"
#else /* G_OS_WIN32 */ #else
#define USER_CONFIG_FILE_LOCATION1 ".mpdconf" #define USER_CONFIG_FILE_LOCATION1 ".mpdconf"
#define USER_CONFIG_FILE_LOCATION2 ".mpd/mpd.conf" #define USER_CONFIG_FILE_LOCATION2 ".mpd/mpd.conf"
#define USER_CONFIG_FILE_LOCATION_XDG "mpd/mpd.conf" #define USER_CONFIG_FILE_LOCATION_XDG "mpd/mpd.conf"
@ -219,7 +219,7 @@ parse_cmdline(int argc, char **argv, struct options *options,
if (!path.IsNull() && FileExists(path)) if (!path.IsNull() && FileExists(path))
return ReadConfigFile(path, error); return ReadConfigFile(path, error);
} }
#else /* G_OS_WIN32 */ #else
Path path = PathBuildChecked(Path::FromUTF8(g_get_user_config_dir()), Path path = PathBuildChecked(Path::FromUTF8(g_get_user_config_dir()),
USER_CONFIG_FILE_LOCATION_XDG); USER_CONFIG_FILE_LOCATION_XDG);
if (!path.IsNull() && FileExists(path)) if (!path.IsNull() && FileExists(path))

View File

@ -26,7 +26,7 @@
void void
time_print(Client *client, const char *name, time_t t) time_print(Client *client, const char *name, time_t t)
{ {
#ifdef G_OS_WIN32 #ifdef WIN32
const struct tm *tm2 = gmtime(&t); const struct tm *tm2 = gmtime(&t);
#else #else
struct tm tm; struct tm tm;
@ -37,7 +37,7 @@ time_print(Client *client, const char *name, time_t t)
char buffer[32]; char buffer[32];
strftime(buffer, sizeof(buffer), strftime(buffer, sizeof(buffer),
#ifdef G_OS_WIN32 #ifdef WIN32
"%Y-%m-%dT%H:%M:%SZ", "%Y-%m-%dT%H:%M:%SZ",
#else #else
"%FT%TZ", "%FT%TZ",

View File

@ -162,7 +162,7 @@ purge_deleted_from_directory(Directory *directory)
} }
} }
#ifndef G_OS_WIN32 #ifndef WIN32
static int static int
update_directory_stat(Directory *directory) update_directory_stat(Directory *directory)
{ {
@ -178,7 +178,7 @@ update_directory_stat(Directory *directory)
static int static int
find_inode_ancestor(Directory *parent, ino_t inode, dev_t device) find_inode_ancestor(Directory *parent, ino_t inode, dev_t device)
{ {
#ifndef G_OS_WIN32 #ifndef WIN32
while (parent) { while (parent) {
if (!parent->have_stat && update_directory_stat(parent) < 0) if (!parent->have_stat && update_directory_stat(parent) < 0)
return -1; return -1;

View File

@ -31,7 +31,7 @@
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
#ifdef G_OS_WIN32 #ifdef WIN32
#include <windows.h> // for GetACP() #include <windows.h> // for GetACP()
#include <stdio.h> // for sprintf() #include <stdio.h> // for sprintf()
#endif #endif
@ -158,13 +158,13 @@ void Path::GlobalInit()
charset = config_get_string(CONF_FS_CHARSET, NULL); charset = config_get_string(CONF_FS_CHARSET, NULL);
if (charset == NULL) { if (charset == NULL) {
#ifndef G_OS_WIN32 #ifndef WIN32
const gchar **encodings; const gchar **encodings;
g_get_filename_charsets(&encodings); g_get_filename_charsets(&encodings);
if (encodings[0] != NULL && *encodings[0] != '\0') if (encodings[0] != NULL && *encodings[0] != '\0')
charset = encodings[0]; charset = encodings[0];
#else /* G_OS_WIN32 */ #else
/* Glib claims that file system encoding is always utf-8 /* Glib claims that file system encoding is always utf-8
* on native Win32 (i.e. not Cygwin). * on native Win32 (i.e. not Cygwin).
* However this is true only if <gstdio.h> helpers are used. * However this is true only if <gstdio.h> helpers are used.

View File

@ -24,13 +24,13 @@
#include <glib.h> #include <glib.h>
#ifndef G_OS_WIN32 #ifndef WIN32
#include <sys/socket.h> #include <sys/socket.h>
#include <netdb.h> #include <netdb.h>
#else /* G_OS_WIN32 */ #else
#include <ws2tcpip.h> #include <ws2tcpip.h>
#include <winsock.h> #include <winsock.h>
#endif /* G_OS_WIN32 */ #endif
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>

View File

@ -26,12 +26,12 @@
#include <unistd.h> #include <unistd.h>
#ifndef G_OS_WIN32 #ifndef WIN32
#include <sys/socket.h> #include <sys/socket.h>
#else /* G_OS_WIN32 */ #else
#include <ws2tcpip.h> #include <ws2tcpip.h>
#include <winsock.h> #include <winsock.h>
#endif /* G_OS_WIN32 */ #endif
#ifdef HAVE_IPV6 #ifdef HAVE_IPV6
#include <string.h> #include <string.h>