diff --git a/src/config.c b/src/config.c index 5f2b2bb8..a39e7233 100644 --- a/src/config.c +++ b/src/config.c @@ -16,11 +16,17 @@ #define CONFIG_DEFAULT_TOUCH_FREQ 5 #define CONFIG_DEFAULT_HOSTNAME "localhost" #define CONFIG_DEFAULT_PORT 8888 -#define CONFIG_DEFAULT_BASE_DIR "/usr/local/icecast" -#define CONFIG_DEFAULT_LOG_DIR "/usr/local/icecast/logs" #define CONFIG_DEFAULT_ACCESS_LOG "access.log" #define CONFIG_DEFAULT_ERROR_LOG "error.log" +#ifndef _WIN32 +#define CONFIG_DEFAULT_BASE_DIR "/usr/local/icecast" +#define CONFIG_DEFAULT_LOG_DIR "/usr/local/icecast/logs" +#else +#define CONFIG_DEFAULT_BASE_DIR ".\\" +#define CONFIG_DEFAULT_LOG_DIR ".\\logs" +#endif + ice_config_t _configuration; char *_config_filename; diff --git a/src/connection.c b/src/connection.c index 84dca72f..df77bde6 100644 --- a/src/connection.c +++ b/src/connection.c @@ -1,11 +1,17 @@ #include #include #include -#include +#include #include + +#ifndef _WIN32 +#include #include #include -#include +#else +#define snprintf _snprintf +#define strcasecmp stricmp +#endif #include "os.h" diff --git a/src/connection.h b/src/connection.h index c39e9d0a..9d7b1605 100644 --- a/src/connection.h +++ b/src/connection.h @@ -6,7 +6,7 @@ typedef struct connection_tag unsigned long id; time_t con_time; - long long sent_bytes; + uint64_t sent_bytes; int sock; int error; diff --git a/src/format.c b/src/format.c index 159d7aa1..c507daab 100644 --- a/src/format.c +++ b/src/format.c @@ -6,6 +6,7 @@ #include #include +#include #include "connection.h" #include "refbuf.h" diff --git a/src/logging.c b/src/logging.c index c9596af1..ee7a7d94 100644 --- a/src/logging.c +++ b/src/logging.c @@ -11,6 +11,10 @@ #include "logging.h" +#ifdef _WIN32 +#define snprintf _snprintf +#endif + /* the global log descriptors */ int errorlog; int accesslog; diff --git a/src/main.c b/src/main.c index 632c1f6f..ef3ce73c 100644 --- a/src/main.c +++ b/src/main.c @@ -20,6 +20,9 @@ #include "stats.h" #include "logging.h" +#ifdef _WIN32 +#define snprintf _snprintf + #undef CATMODULE #define CATMODULE "main" diff --git a/src/source.c b/src/source.c index 1b310825..c631da73 100644 --- a/src/source.c +++ b/src/source.c @@ -3,9 +3,14 @@ #include #include #include +#include + +#ifndef _WIN32 #include #include -#include +#else +#include +#endif #include "thread.h" #include "avl.h" diff --git a/src/stats.c b/src/stats.c index 4bb2ef22..86f20a61 100644 --- a/src/stats.c +++ b/src/stats.c @@ -19,7 +19,7 @@ #include "client.h" #include "stats.h" - +#define vsnprintf _vsnprintf typedef struct _event_listener_tag { diff --git a/src/util.c b/src/util.c index cc72bf24..49356d38 100644 --- a/src/util.c +++ b/src/util.c @@ -1,9 +1,11 @@ -#include #include -#include #ifndef _WIN32 +#include +#include #include +#else +#include #endif #include "sock.h"