diff options
author | Simon Howard | 2007-10-18 23:44:56 +0000 |
---|---|---|
committer | Simon Howard | 2007-10-18 23:44:56 +0000 |
commit | 7c2cc3e01f5c5384427773fc824fdd5eee1c0b23 (patch) | |
tree | 8a8b14b072352d6de81cb28afe6e8efdb5dff7f6 | |
parent | 75ce08abd69708b2219bbf92d10425ca6d50c711 (diff) | |
download | chocolate-doom-7c2cc3e01f5c5384427773fc824fdd5eee1c0b23.tar.gz chocolate-doom-7c2cc3e01f5c5384427773fc824fdd5eee1c0b23.tar.bz2 chocolate-doom-7c2cc3e01f5c5384427773fc824fdd5eee1c0b23.zip |
#define snprintf, vsnprintf to _snprintf, _vsnprintf in MSVC.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 977
-rw-r--r-- | src/doomdef.h | 6 | ||||
-rw-r--r-- | src/net_loop.c | 1 | ||||
-rw-r--r-- | src/net_sdl.c | 1 |
3 files changed, 6 insertions, 2 deletions
diff --git a/src/doomdef.h b/src/doomdef.h index 08d06422..fb944445 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -31,11 +31,13 @@ #include <stdio.h> #include <string.h> -// Portable header to provide the strcasecmp/strncasecmp functions. -// On Windows, stricmp/strnicmp is used as a replacement. +// #define macros to provide functions missing in Windows. +// Outside Windows, we use strings.h for str[n]casecmp. #ifdef _WIN32 +#define snprintf _snprintf +#define vsnprintf _vsnprintf #define strcasecmp stricmp #define strncasecmp strnicmp diff --git a/src/net_loop.c b/src/net_loop.c index d3d517d1..890dcbf2 100644 --- a/src/net_loop.c +++ b/src/net_loop.c @@ -26,6 +26,7 @@ #include <stdio.h> #include <stdlib.h> +#include "doomdef.h" #include "i_system.h" #include "net_defs.h" #include "net_loop.h" diff --git a/src/net_sdl.c b/src/net_sdl.c index 3d737d15..92606fac 100644 --- a/src/net_sdl.c +++ b/src/net_sdl.c @@ -27,6 +27,7 @@ #include <string.h> #include <stdio.h> +#include "doomdef.h" #include "i_system.h" #include "m_argv.h" #include "net_defs.h" |