mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-12-04 14:46:30 -05:00
Win32 fixes. Look how portable this was ;) Just header stuff and some defines.
Whee! svn path=/trunk/icecast/; revision=2195
This commit is contained in:
parent
71539aa447
commit
8f6c02365d
10
src/config.c
10
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;
|
||||
|
||||
|
@ -1,11 +1,17 @@
|
||||
#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
|
||||
{
|
||||
|
@ -1,9 +1,11 @@
|
||||
#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"
|
||||
|
Loading…
Reference in New Issue
Block a user