mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2025-01-03 14:56:34 -05:00
Prevent various redefined definitions in win32-specific code
From: Erik van Pienbroek <epienbro@fedoraproject.org> Date: Mon, 22 Dec 2014 18:02:09 +0100
This commit is contained in:
parent
0dbabcc44c
commit
0b1af34f0e
@ -32,9 +32,6 @@
|
||||
#include <netinet/in.h>
|
||||
#else
|
||||
#include <winsock2.h>
|
||||
#define snprintf _snprintf
|
||||
#define strcasecmp stricmp
|
||||
#define strncasecmp strnicmp
|
||||
#endif
|
||||
|
||||
#include "compat.h"
|
||||
|
@ -47,12 +47,6 @@
|
||||
#include "stats.h"
|
||||
#define CATMODULE "format"
|
||||
|
||||
#ifdef WIN32
|
||||
#define strcasecmp stricmp
|
||||
#define strncasecmp strnicmp
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
static int format_prepare_headers (source_t *source, client_t *client);
|
||||
|
||||
|
||||
|
@ -41,12 +41,6 @@
|
||||
|
||||
#include "format_mp3.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#define strcasecmp stricmp
|
||||
#define strncasecmp strnicmp
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
#define CATMODULE "format-mp3"
|
||||
|
||||
/* Note that this seems to be 8192 in shoutcast - perhaps we want to be the
|
||||
|
@ -35,11 +35,8 @@
|
||||
#else
|
||||
#include <winsock2.h>
|
||||
#include <windows.h>
|
||||
#define fseeko fseek
|
||||
#define SCN_OFF_T "ld"
|
||||
#define PRI_OFF_T "ld"
|
||||
#define snprintf _snprintf
|
||||
#define strncasecmp _strnicmp
|
||||
#ifndef S_ISREG
|
||||
#define S_ISREG(mode) ((mode) & _S_IFREG)
|
||||
#endif
|
||||
|
@ -21,8 +21,14 @@
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef HAVE_CURL
|
||||
#include <curl/curl.h>
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
#ifndef _WIN32_WINNT
|
||||
#define _WIN32_WINNT 0x0400
|
||||
#endif
|
||||
/* For getpid() */
|
||||
#include <process.h>
|
||||
#include <windows.h>
|
||||
@ -33,9 +39,6 @@
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#ifdef HAVE_CURL
|
||||
#include <curl/curl.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNAME
|
||||
#include <sys/utsname.h>
|
||||
|
@ -174,7 +174,7 @@ void MD5Final(unsigned char digest[HASH_LEN], struct MD5Context *ctx)
|
||||
MD5Transform(ctx->buf, (uint32_t *) ctx->in);
|
||||
byteReverse((unsigned char *) ctx->buf, 4);
|
||||
memcpy(digest, ctx->buf, HASH_LEN);
|
||||
memset(ctx, 0, sizeof(ctx));
|
||||
memset(ctx, 0, sizeof(*ctx));
|
||||
/* In case it's sensitive */
|
||||
}
|
||||
|
||||
|
@ -32,9 +32,6 @@
|
||||
#include <netinet/in.h>
|
||||
#else
|
||||
#include <winsock2.h>
|
||||
#define snprintf _snprintf
|
||||
#define strcasecmp stricmp
|
||||
#define strncasecmp strnicmp
|
||||
#endif
|
||||
|
||||
#include "compat.h"
|
||||
|
@ -31,9 +31,6 @@
|
||||
#include <winsock2.h>
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
#define snprintf _snprintf
|
||||
#define strcasecmp stricmp
|
||||
#define strncasecmp strnicmp
|
||||
#endif
|
||||
|
||||
#include "common/net/sock.h"
|
||||
|
Loading…
Reference in New Issue
Block a user