get rid of some gcc warnings with Windows build

This commit is contained in:
nhmall
2018-12-01 09:41:22 -05:00
parent 4c9603298a
commit a5a51814a1
+4 -2
View File
@@ -5,7 +5,7 @@
#ifndef NTCONF_H #ifndef NTCONF_H
#define NTCONF_H #define NTCONF_H
/* #define SHELL /* nt use of pcsys routines caused a hang */ /* #define SHELL */ /* nt use of pcsys routines caused a hang */
#define RANDOM /* have Berkeley random(3) */ #define RANDOM /* have Berkeley random(3) */
#define TEXTCOLOR /* Color text */ #define TEXTCOLOR /* Color text */
@@ -43,7 +43,7 @@
* The remaining code shouldn't need modification. * The remaining code shouldn't need modification.
* ----------------------------------------------------------------- * -----------------------------------------------------------------
*/ */
/* #define SHORT_FILENAMES /* All NT filesystems support long names now /* #define SHORT_FILENAMES */ /* All NT filesystems support long names now
*/ */
#ifdef MICRO #ifdef MICRO
@@ -143,12 +143,14 @@ extern void FDECL(interject, (int));
#define strncmpi(a, b, c) strnicmp(a, b, c) #define strncmpi(a, b, c) strnicmp(a, b, c)
#endif #endif
#ifdef _MSC_VER
/* Visual Studio defines this in their own headers, which we don't use */ /* Visual Studio defines this in their own headers, which we don't use */
#ifndef snprintf #ifndef snprintf
#define snprintf _snprintf #define snprintf _snprintf
#pragma warning( \ #pragma warning( \
disable : 4996) /* deprecation warning suggesting snprintf_s */ disable : 4996) /* deprecation warning suggesting snprintf_s */
#endif #endif
#endif
#include <sys/types.h> #include <sys/types.h>
#include <stdlib.h> #include <stdlib.h>