*: use WIN32 instead of G_OS_WIN32
This commit is contained in:
parent
9508ea982b
commit
e4e80ff0cb
@ -47,7 +47,7 @@ client_puts(Client *client, const char *s)
|
||||
void
|
||||
client_vprintf(Client *client, const char *fmt, va_list args)
|
||||
{
|
||||
#ifndef G_OS_WIN32
|
||||
#ifndef WIN32
|
||||
va_list tmp;
|
||||
int length;
|
||||
|
||||
|
@ -54,7 +54,7 @@
|
||||
|
||||
#ifdef WIN32
|
||||
#define CONFIG_FILE_LOCATION "\\mpd\\mpd.conf"
|
||||
#else /* G_OS_WIN32 */
|
||||
#else
|
||||
#define USER_CONFIG_FILE_LOCATION1 ".mpdconf"
|
||||
#define USER_CONFIG_FILE_LOCATION2 ".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))
|
||||
return ReadConfigFile(path, error);
|
||||
}
|
||||
#else /* G_OS_WIN32 */
|
||||
#else
|
||||
Path path = PathBuildChecked(Path::FromUTF8(g_get_user_config_dir()),
|
||||
USER_CONFIG_FILE_LOCATION_XDG);
|
||||
if (!path.IsNull() && FileExists(path))
|
||||
|
@ -26,7 +26,7 @@
|
||||
void
|
||||
time_print(Client *client, const char *name, time_t t)
|
||||
{
|
||||
#ifdef G_OS_WIN32
|
||||
#ifdef WIN32
|
||||
const struct tm *tm2 = gmtime(&t);
|
||||
#else
|
||||
struct tm tm;
|
||||
@ -37,7 +37,7 @@ time_print(Client *client, const char *name, time_t t)
|
||||
|
||||
char buffer[32];
|
||||
strftime(buffer, sizeof(buffer),
|
||||
#ifdef G_OS_WIN32
|
||||
#ifdef WIN32
|
||||
"%Y-%m-%dT%H:%M:%SZ",
|
||||
#else
|
||||
"%FT%TZ",
|
||||
|
@ -162,7 +162,7 @@ purge_deleted_from_directory(Directory *directory)
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef G_OS_WIN32
|
||||
#ifndef WIN32
|
||||
static int
|
||||
update_directory_stat(Directory *directory)
|
||||
{
|
||||
@ -178,7 +178,7 @@ update_directory_stat(Directory *directory)
|
||||
static int
|
||||
find_inode_ancestor(Directory *parent, ino_t inode, dev_t device)
|
||||
{
|
||||
#ifndef G_OS_WIN32
|
||||
#ifndef WIN32
|
||||
while (parent) {
|
||||
if (!parent->have_stat && update_directory_stat(parent) < 0)
|
||||
return -1;
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#ifdef WIN32
|
||||
#include <windows.h> // for GetACP()
|
||||
#include <stdio.h> // for sprintf()
|
||||
#endif
|
||||
@ -158,13 +158,13 @@ void Path::GlobalInit()
|
||||
|
||||
charset = config_get_string(CONF_FS_CHARSET, NULL);
|
||||
if (charset == NULL) {
|
||||
#ifndef G_OS_WIN32
|
||||
#ifndef WIN32
|
||||
const gchar **encodings;
|
||||
g_get_filename_charsets(&encodings);
|
||||
|
||||
if (encodings[0] != NULL && *encodings[0] != '\0')
|
||||
charset = encodings[0];
|
||||
#else /* G_OS_WIN32 */
|
||||
#else
|
||||
/* Glib claims that file system encoding is always utf-8
|
||||
* on native Win32 (i.e. not Cygwin).
|
||||
* However this is true only if <gstdio.h> helpers are used.
|
||||
|
@ -24,13 +24,13 @@
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#ifndef G_OS_WIN32
|
||||
#ifndef WIN32
|
||||
#include <sys/socket.h>
|
||||
#include <netdb.h>
|
||||
#else /* G_OS_WIN32 */
|
||||
#else
|
||||
#include <ws2tcpip.h>
|
||||
#include <winsock.h>
|
||||
#endif /* G_OS_WIN32 */
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
@ -26,12 +26,12 @@
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#ifndef G_OS_WIN32
|
||||
#ifndef WIN32
|
||||
#include <sys/socket.h>
|
||||
#else /* G_OS_WIN32 */
|
||||
#else
|
||||
#include <ws2tcpip.h>
|
||||
#include <winsock.h>
|
||||
#endif /* G_OS_WIN32 */
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_IPV6
|
||||
#include <string.h>
|
||||
|
Loading…
Reference in New Issue
Block a user