From 8e80150f00e617978ecd4ea30fe083df7d0f2c84 Mon Sep 17 00:00:00 2001 From: Davis King Date: Wed, 4 Dec 2013 18:34:45 -0500 Subject: [PATCH] Minor changes to avoid conflicts and warnings in visual studio. --- dlib/external/libjpeg/jmorecfg.h | 14 +++++++++++++- dlib/external/libpng/pngconf.h | 9 +++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/dlib/external/libjpeg/jmorecfg.h b/dlib/external/libjpeg/jmorecfg.h index d4d2aa7e7..f553009c0 100644 --- a/dlib/external/libjpeg/jmorecfg.h +++ b/dlib/external/libjpeg/jmorecfg.h @@ -49,6 +49,16 @@ * arrays is very slow on your hardware, you might want to change these. */ + +#ifdef _MSC_VER +// Disable the following warnings for Visual Studio +// This is a warning you get from visual studio 2005 about things in the standard C++ +// library being "deprecated." I checked the C++ standard and it doesn't say jack +// about any of them (I checked the searchable PDF). So this warning is total Bunk. +#pragma warning(disable : 4996) +#endif + + #if BITS_IN_JSAMPLE == 8 /* JSAMPLE should be the smallest type that will hold the values 0..255. * You can use a signed char by having GETJSAMPLE mask it with 0xFF. @@ -187,7 +197,9 @@ typedef unsigned int JDIMENSION; #ifdef NEED_FAR_POINTERS #define FAR far #else -#define FAR +#ifndef FAR + #define FAR +#endif #endif diff --git a/dlib/external/libpng/pngconf.h b/dlib/external/libpng/pngconf.h index 8064194c0..8c5347224 100644 --- a/dlib/external/libpng/pngconf.h +++ b/dlib/external/libpng/pngconf.h @@ -19,6 +19,15 @@ * and png_info. */ +#ifdef _MSC_VER +// Disable the following warnings for Visual Studio +// This is a warning you get from visual studio 2005 about things in the standard C++ +// library being "deprecated." I checked the C++ standard and it doesn't say jack +// about any of them (I checked the searchable PDF). So this warning is total Bunk. +#pragma warning(disable : 4996) +#endif + + #ifndef PNGCONF_H #define PNGCONF_H