]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
fixed compilation with Visual in C++ mode
authorinikep <inikep@gmail.com>
Wed, 10 Aug 2016 12:28:47 +0000 (14:28 +0200)
committerinikep <inikep@gmail.com>
Wed, 10 Aug 2016 12:28:47 +0000 (14:28 +0200)
programs/datagen.c
zlibWrapper/zstd_zlibwrapper.c

index 6cb5111ff12d1c92419146497b62b0f8035b0dd7..d1fb858a3563bba422359448cc775816b519f51b 100644 (file)
 /* *************************************
 *  Compiler Options
 ***************************************/
-#define _CRT_SECURE_NO_WARNINGS  /* removes Visual warning on strerror() */
-
+#if defined(_MSC_VER)
+#  define _CRT_SECURE_NO_WARNINGS    /* removes Visual warning on strerror() */
+#  define _CRT_SECURE_NO_DEPRECATE   /* removes VS2005 warning on strerror() */
+#endif
 
 /*-************************************
 *  Dependencies
index 06667b61088dc1cb053369930f2895c592b88f3a..34de73a6df9ada41aa01ac5ed4b42be0eed19c5c 100644 (file)
     - zstd source repository : https://github.com/Cyan4973/zstd
 */
 
-#include <stdarg.h>            /* va_list, for z_gzprintf */
+#include <stdio.h>                 /* vsprintf */
+#include <stdarg.h>                /* va_list, for z_gzprintf */
 #include <zlib.h>
 #include "zstd_zlibwrapper.h"
 #define ZSTD_STATIC_LINKING_ONLY   /* ZSTD_MAGICNUMBER */
 #include "zstd.h"
 #define ZBUFF_STATIC_LINKING_ONLY  /* ZBUFF_createCCtx_advanced */
 #include "zbuff.h"
-#include "zstd_internal.h"     /* defaultCustomMem */
+#include "zstd_internal.h"         /* defaultCustomMem */
 
 
 #define Z_INFLATE_SYNC              8