Commit 8f6c0236 authored by Jack Moffitt's avatar Jack Moffitt

Win32 fixes. Look how portable this was ;) Just header stuff and some defines.

Whee!

svn path=/trunk/icecast/; revision=2195
parent 71539aa4
......@@ -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;
......
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>
#include <time.h>
#include <sys/types.h>
#ifndef _WIN32
#include <sys/time.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <time.h>
#else
#define snprintf _snprintf
#define strcasecmp stricmp
#endif
#include "os.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;
......
......@@ -6,6 +6,7 @@
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "connection.h"
#include "refbuf.h"
......
......@@ -11,6 +11,10 @@
#include "logging.h"
#ifdef _WIN32
#define snprintf _snprintf
#endif
/* the global log descriptors */
int errorlog;
int accesslog;
......
......@@ -20,6 +20,9 @@
#include "stats.h"
#include "logging.h"
#ifdef _WIN32
#define snprintf _snprintf
#undef CATMODULE
#define CATMODULE "main"
......
......@@ -3,9 +3,14 @@
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <ogg/ogg.h>
#ifndef _WIN32
#include <sys/time.h>
#include <sys/socket.h>
#include <ogg/ogg.h>
#else
#include <window.h>
#endif
#include "thread.h"
#include "avl.h"
......
......@@ -19,7 +19,7 @@
#include "client.h"
#include "stats.h"
#define vsnprintf _vsnprintf
typedef struct _event_listener_tag
{
......
#include <sys/time.h>
#include <sys/types.h>
#include <sys/socket.h>
#ifndef _WIN32
#include <sys/time.h>
#include <sys/socket.h>
#include <unistd.h>
#else
#include <windows.h>
#endif
#include "sock.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment