Commit 39fd26d8 authored by Sean McBride's avatar Sean McBride Committed by Kitware Robot

Merge topic 'snprint-hoist'

33a743d2 Hoist _snprintf hack up to vtkConfigure.h
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Reviewed-by: Robert Maynard's avatarRobert Maynard <robert.maynard@kitware.com>
Merge-request: !1665
parents c196c80b 33a743d2
Pipeline #19060 running with stage
......@@ -174,4 +174,12 @@
# define VTK_HAS_STD_UNIQUE_PTR
#endif
/* MS Visual Studio 2015 finally supports C99/C++11's snprintf but
* for older versions, use _snprintf instead. Annoyingly, its semantics
* are slightly different, but still better than using sprintf.
*/
#if defined(_MSC_VER) && (_MSC_VER < 1900)
# define snprintf _snprintf
#endif
#endif // vtkConfigure_h
......@@ -20,10 +20,6 @@
#include <string>
#if defined(_MSC_VER) && (_MSC_VER < 1900)
#define snprintf _snprintf
#endif
static const char *vtkDebugLeaksIgnoreClasses[] = {
0
};
......
......@@ -69,10 +69,6 @@
# include <malloc.h>
#endif /* EXODUSII_HAVE_MALLOC_H */
#if defined(_MSC_VER) && (_MSC_VER < 1900)
#define snprintf _snprintf
#endif
/// Define this to get printouts summarizing array glomming process
#undef VTK_DBG_GLOM
......
......@@ -42,10 +42,6 @@
#include <sstream>
#if defined(_MSC_VER) && (_MSC_VER < 1900)
#define snprintf _snprintf
#endif
vtkStandardNewMacro(vtkRIBExporter);
typedef double RtColor[3];
......
......@@ -25,10 +25,6 @@
#include <sstream>
#if defined(_MSC_VER) && (_MSC_VER < 1900)
#define snprintf _snprintf
#endif
vtkStandardNewMacro(vtkGeoJSONWriter);
#define VTK_GJWRITER_MAXPOINTS 32000
......
......@@ -27,10 +27,6 @@ extern "C" {
#include <setjmp.h>
}
#if defined(_MSC_VER) && (_MSC_VER < 1900)
#define snprintf _snprintf
#endif
vtkStandardNewMacro(vtkJPEGWriter);
vtkCxxSetObjectMacro(vtkJPEGWriter,Result,vtkUnsignedCharArray);
......
......@@ -24,10 +24,6 @@
#include <vector>
#if defined(_MSC_VER) && (_MSC_VER < 1900)
#define snprintf _snprintf
#endif
class vtkPNGWriter::vtkInternals
{
public:
......
......@@ -21,10 +21,6 @@
#include "vtkStreamingDemandDrivenPipeline.h"
#include "vtk_tiff.h"
#if defined(_MSC_VER) && (_MSC_VER < 1900)
#define snprintf _snprintf
#endif
vtkStandardNewMacro(vtkTIFFWriter);
//----------------------------------------------------------------------------
......
......@@ -71,10 +71,6 @@ POSSIBILITY OF SUCH DAMAGES.
#include <map>
#include <sstream>
#if defined(_MSC_VER) && (_MSC_VER < 1900)
#define snprintf _snprintf
#endif
//-------------------------------------------------------------------------
// A container for mapping attribute names to arrays
class vtkMINCImageAttributeMap
......
......@@ -87,10 +87,6 @@ POSSIBILITY OF SUCH DAMAGES.
#include <vector>
#include <map>
#if defined(_MSC_VER) && (_MSC_VER < 1900)
#define snprintf _snprintf
#endif
#define VTK_MINC_MAX_DIMS 8
//--------------------------------------------------------------------------
......
......@@ -48,10 +48,6 @@
#include <cstdio> // for snprintf
#if defined(_MSC_VER) && (_MSC_VER < 1900)
#define snprintf _snprintf
#endif
#undef VTK_DBG_LAYOUT
vtkStandardNewMacro(vtkScalarBarActor);
......
......@@ -40,10 +40,6 @@ PURPOSE. See the above copyright notice for more information.
#include "vtkTrivialProducer.h"
#include "vtkViewport.h"
#if defined(_MSC_VER) && (_MSC_VER < 1900)
#define snprintf _snprintf
#endif
struct _xmlNode;
#define VTK_MAX_PLOTS 50
......
......@@ -49,10 +49,6 @@
#include <fstream>
using std::ofstream;
#if defined(_MSC_VER) && (_MSC_VER < 1900)
#define snprintf _snprintf
#endif
vtkStandardNewMacro(vtkDynamic2DLabelMapper);
//----------------------------------------------------------------------------
......
......@@ -46,10 +46,6 @@ vtkStandardNewMacro(vtkLabeledDataMapper);
vtkCxxSetObjectMacro(vtkLabeledDataMapper,Transform,vtkTransform);
#if defined(_MSC_VER) && (_MSC_VER < 1900)
#define snprintf _snprintf
#endif
// ----------------------------------------------------------------------
template<typename T>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment