Commit 2e0acc8d authored by Ben Boeckel's avatar Ben Boeckel Committed by Kitware Robot

Merge topic 'msvc2015-support'

15ca5221 vtkWin32OpenGLRenderWindow: static_cast to BYTE
5367d9cc vtkWin32OpenGLRenderWindow: fix some whitespace
d16dca59 vtkFreeTypeTools: use vtkIdType for cache ids
033b8498 msvc2015: fix narrowing warnings
a4cf06de hdf5: fix long long format detection
71894112 hdf5: detect %I64d specifier
385e0e76 vtkEnSightReader: refactor a call
f2f35036 vtkhdf5: don't expect timezone with VS2015
...
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !446
parents 562c644e 15ca5221
......@@ -122,7 +122,7 @@ int TestQuaternionSetGet() //use of vtkQuaternionf for this test
}
//To and from float[4]
float setArray[4] = {1.0, -38.0, 42.0, 0.0001};
float setArray[4] = {1.0f, -38.0f, 42.0f, 0.0001f};
qf.Set(setArray);
if (!qf.Compare( vtkQuaternionf(1.0, -38.0, 42.0, 0.0001), 0.0001))
{
......
......@@ -141,7 +141,7 @@ int TestPeriodicTable(int , char * [])
}
float rgb[3];
float expectedRgb[3] = { 1, 0.05, 0.05 };
float expectedRgb[3] = { 1, 0.05f, 0.05f };
pTab->GetDefaultRGBTuple(8, rgb);
if (rgb[0] != expectedRgb[0] || rgb[1] != expectedRgb[1] ||
rgb[2] != expectedRgb[2])
......
......@@ -1572,11 +1572,12 @@ int vtkEnSightReader::ReadVariableFiles(vtkMultiBlockDataSet *output)
fileNum = 1;
for (j = 1; j < numStepsList->GetNumberOfIds(); j++)
{
numSteps += numStepsList->GetId(j);
int curNumSteps = numStepsList->GetId(j);
numSteps += curNumSteps;
if (timeStep > numSteps)
{
fileNum++;
timeStepInFile -= numStepsList->GetId(j);
timeStepInFile -= curNumSteps;
}
}
}
......@@ -1716,11 +1717,12 @@ int vtkEnSightReader::ReadVariableFiles(vtkMultiBlockDataSet *output)
fileNum = 1;
for (j = 1; j < numStepsList->GetNumberOfIds(); j++)
{
numSteps += numStepsList->GetId(j);
int curNumSteps = numStepsList->GetId(j);
numSteps += curNumSteps;
if (timeStep > numSteps)
{
fileNum++;
timeStepInFile -= numStepsList->GetId(j);
timeStepInFile -= curNumSteps;
}
}
}
......
......@@ -39,11 +39,11 @@ vtkStandardNewMacro(vtk3DSImporter);
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif
static vtk3DSColour Black = {0.0, 0.0, 0.0};
static vtk3DSColour Black = {0.0f, 0.0f, 0.0f};
static char obj_name[80] = "";
static vtk3DSColour fog_colour = {0.0, 0.0, 0.0};
static vtk3DSColour col = {0.0, 0.0, 0.0};
static vtk3DSColour global_amb = {0.1, 0.1, 0.1};
static vtk3DSColour fog_colour = {0.0f, 0.0f, 0.0f};
static vtk3DSColour col = {0.0f, 0.0f, 0.0f};
static vtk3DSColour global_amb = {0.1f, 0.1f, 0.1f};
static vtk3DSVector pos = {0.0, 0.0, 0.0};
static vtk3DSVector target = {0.0, 0.0, 0.0};
static float hotspot = -1;
......
......@@ -548,7 +548,7 @@ int vtkXMLUnstructuredDataReader::ReadCellArray(vtkIdType numberOfCells,
// connectivity array ahead of time to calculate the real fraction.
float progressRange[2] = {0,0};
this->GetProgressRange(progressRange);
float fractions[3] = {0, 0.2, 1};
float fractions[3] = {0, 0.2f, 1};
// Set range of progress for offsets array.
this->SetProgressRange(progressRange, 0, fractions);
......@@ -726,7 +726,7 @@ int vtkXMLUnstructuredDataReader::ReadFaceArray(vtkIdType numberOfCells,
// to calculate the real fraction.
float progressRange[2] = {0,0};
this->GetProgressRange(progressRange);
float fractions[3] = {0, 0.2, 1};
float fractions[3] = {0, 0.2f, 1};
// Set range of progress for offsets array.
this->SetProgressRange(progressRange, 0, fractions);
......
......@@ -172,8 +172,9 @@ struct TextPropertyKey
// Transform a text property into an unsigned long
static unsigned int GetIdFromTextProperty(vtkTextProperty* textProperty)
{
unsigned long id;
vtkIdType id;
vtkFreeTypeTools::GetInstance()->MapTextPropertyToId(textProperty, &id);
// Truncation on 64-bit machines! The id is a pointer.
return static_cast<unsigned int>(id);
}
......
......@@ -172,8 +172,9 @@ struct TextPropertyKey
// Transform a text property into an unsigned long
static unsigned int GetIdFromTextProperty(vtkTextProperty* textProperty)
{
unsigned long id;
vtkIdType id;
vtkFreeTypeTools::GetInstance()->MapTextPropertyToId(textProperty, &id);
// Truncation on 64-bit machines! The id is a pointer.
return static_cast<unsigned int>(id);
}
......
......@@ -29,28 +29,28 @@
int RGrid( int argc, char *argv[] )
{
int i;
static float x[47]={-1.22396, -1.17188, -1.11979, -1.06771, -1.01562, -0.963542,
-0.911458, -0.859375, -0.807292, -0.755208, -0.703125, -0.651042,
-0.598958, -0.546875, -0.494792, -0.442708, -0.390625, -0.338542,
-0.286458, -0.234375, -0.182292, -0.130209, -0.078125, -0.026042,
0.0260415, 0.078125, 0.130208, 0.182291, 0.234375, 0.286458,
0.338542, 0.390625, 0.442708, 0.494792, 0.546875, 0.598958,
0.651042, 0.703125, 0.755208, 0.807292, 0.859375, 0.911458,
0.963542, 1.01562, 1.06771, 1.11979, 1.17188};
static float y[33]={-1.25, -1.17188, -1.09375, -1.01562, -0.9375, -0.859375,
-0.78125, -0.703125, -0.625, -0.546875, -0.46875, -0.390625,
-0.3125, -0.234375, -0.15625, -0.078125, 0, 0.078125,
0.15625, 0.234375, 0.3125, 0.390625, 0.46875, 0.546875,
0.625, 0.703125, 0.78125, 0.859375, 0.9375, 1.01562,
1.09375, 1.17188, 1.25};
static float z[44]={0, 0.1, 0.2, 0.3, 0.4, 0.5,
0.6, 0.7, 0.75, 0.8, 0.9, 1,
1.1, 1.2, 1.3, 1.4, 1.5, 1.6,
1.7, 1.75, 1.8, 1.9, 2, 2.1,
2.2, 2.3, 2.4, 2.5, 2.6, 2.7,
2.75, 2.8, 2.9, 3, 3.1, 3.2,
3.3, 3.4, 3.5, 3.6, 3.7, 3.75,
3.8, 3.9};
static float x[47]={-1.22396f, -1.17188f, -1.11979f, -1.06771f, -1.01562f, -0.963542f,
-0.911458f, -0.859375f, -0.807292f, -0.755208f, -0.703125f, -0.651042f,
-0.598958f, -0.546875f, -0.494792f, -0.442708f, -0.390625f, -0.338542f,
-0.286458f, -0.234375f, -0.182292f, -0.130209f, -0.078125f, -0.026042f,
0.0260415f, 0.078125f, 0.130208f, 0.182291f, 0.234375f, 0.286458f,
0.338542f, 0.390625f, 0.442708f, 0.494792f, 0.546875f, 0.598958f,
0.651042f, 0.703125f, 0.755208f, 0.807292f, 0.859375f, 0.911458f,
0.963542f, 1.01562f, 1.06771f, 1.11979f, 1.17188f};
static float y[33]={-1.25f, -1.17188f, -1.09375f, -1.01562f, -0.9375f, -0.859375f,
-0.78125f, -0.703125f, -0.625f, -0.546875f, -0.46875f, -0.390625f,
-0.3125f, -0.234375f, -0.15625f, -0.078125f, 0.0f, 0.078125f,
0.15625f, 0.234375f, 0.3125f, 0.390625f, 0.46875f, 0.546875f,
0.625f, 0.703125f, 0.78125f, 0.859375f, 0.9375f, 1.01562f,
1.09375f, 1.17188f, 1.25f};
static float z[44]={0.0f, 0.1f, 0.2f, 0.3f, 0.4f, 0.5f,
0.6f, 0.7f, 0.75f, 0.8f, 0.9f, 1.0f,
1.1f, 1.2f, 1.3f, 1.4f, 1.5f, 1.6f,
1.7f, 1.75f, 1.8f, 1.9f, 2.0f, 2.1f,
2.2f, 2.3f, 2.4f, 2.5f, 2.6f, 2.7f,
2.75f, 2.8f, 2.9f, 3.0f, 3.1f, 3.2f,
3.3f, 3.4f, 3.5f, 3.6f, 3.7f, 3.75f,
3.8f, 3.9f};
vtkRenderer *renderer = vtkRenderer::New();
vtkRenderWindow *renWin = vtkRenderWindow::New();
......
......@@ -64,10 +64,10 @@ void rotateVector2i(vtkVector2i &vec, float sinTheta, float cosTheta)
} // end anon namespace
class vtkTextPropertyLookup
: public std::map<unsigned long, vtkSmartPointer<vtkTextProperty> >
: public std::map<vtkIdType, vtkSmartPointer<vtkTextProperty> >
{
public:
bool contains(const unsigned long id) {return this->find(id) != this->end();}
bool contains(const vtkIdType id) {return this->find(id) != this->end();}
};
class vtkFreeTypeTools::MetaData
......@@ -75,8 +75,8 @@ class vtkFreeTypeTools::MetaData
public:
// Set by PrepareMetaData
vtkTextProperty *textProperty;
unsigned long textPropertyCacheId;
unsigned long unrotatedTextPropertyCacheId;
vtkIdType textPropertyCacheId;
vtkIdType unrotatedTextPropertyCacheId;
FTC_ScalerRec scaler;
FTC_ScalerRec unrotatedScaler;
FT_Face face;
......@@ -602,7 +602,7 @@ vtkTypeUInt16 vtkFreeTypeTools::HashString(const char *str)
//----------------------------------------------------------------------------
void vtkFreeTypeTools::MapTextPropertyToId(vtkTextProperty *tprop,
unsigned long *id)
vtkIdType *id)
{
if (!tprop || !id)
{
......@@ -624,11 +624,11 @@ void vtkFreeTypeTools::MapTextPropertyToId(vtkTextProperty *tprop,
bits += 16;
// Bold is in 1 bit (= 18 bits so far)
unsigned long bold = (tprop->GetBold() ? 1 : 0) << bits;
vtkIdType bold = (tprop->GetBold() ? 1 : 0) << bits;
++bits;
// Italic is in 1 bit (= 19 bits so far)
unsigned long italic = (tprop->GetItalic() ? 1 : 0) << bits;
vtkIdType italic = (tprop->GetItalic() ? 1 : 0) << bits;
++bits;
// Orientation (in degrees)
......@@ -642,7 +642,7 @@ void vtkFreeTypeTools::MapTextPropertyToId(vtkTextProperty *tprop,
angle <<= bits;
// We really should not use more than 32 bits
unsigned long merged = (bold | italic | angle);
vtkIdType merged = (bold | italic | angle);
assert(merged <= std::numeric_limits<vtkTypeUInt32>::max());
// Now final id
......@@ -654,7 +654,7 @@ void vtkFreeTypeTools::MapTextPropertyToId(vtkTextProperty *tprop,
}
//----------------------------------------------------------------------------
void vtkFreeTypeTools::MapIdToTextProperty(unsigned long id,
void vtkFreeTypeTools::MapIdToTextProperty(vtkIdType id,
vtkTextProperty *tprop)
{
if (!tprop)
......@@ -676,7 +676,7 @@ void vtkFreeTypeTools::MapIdToTextProperty(unsigned long id,
}
//----------------------------------------------------------------------------
bool vtkFreeTypeTools::GetSize(unsigned long tprop_cache_id,
bool vtkFreeTypeTools::GetSize(vtkIdType tprop_cache_id,
int font_size,
FT_Size *size)
{
......@@ -738,14 +738,14 @@ bool vtkFreeTypeTools::GetSize(vtkTextProperty *tprop,
}
// Map the text property to a unique id that will be used as face id
unsigned long tprop_cache_id;
vtkIdType tprop_cache_id;
this->MapTextPropertyToId(tprop, &tprop_cache_id);
return this->GetSize(tprop_cache_id, tprop->GetFontSize(), size);
}
//----------------------------------------------------------------------------
bool vtkFreeTypeTools::GetFace(unsigned long tprop_cache_id,
bool vtkFreeTypeTools::GetFace(vtkIdType tprop_cache_id,
FT_Face *face)
{
#if VTK_FTFC_DEBUG_CD
......@@ -788,14 +788,14 @@ bool vtkFreeTypeTools::GetFace(vtkTextProperty *tprop,
}
// Map the text property to a unique id that will be used as face id
unsigned long tprop_cache_id;
vtkIdType tprop_cache_id;
this->MapTextPropertyToId(tprop, &tprop_cache_id);
return this->GetFace(tprop_cache_id, face);
}
//----------------------------------------------------------------------------
bool vtkFreeTypeTools::GetGlyphIndex(unsigned long tprop_cache_id,
bool vtkFreeTypeTools::GetGlyphIndex(vtkIdType tprop_cache_id,
FT_UInt32 c,
FT_UInt *gindex)
{
......@@ -837,14 +837,14 @@ bool vtkFreeTypeTools::GetGlyphIndex(vtkTextProperty *tprop,
}
// Map the text property to a unique id that will be used as face id
unsigned long tprop_cache_id;
vtkIdType tprop_cache_id;
this->MapTextPropertyToId(tprop, &tprop_cache_id);
return this->GetGlyphIndex(tprop_cache_id, c, gindex);
}
//----------------------------------------------------------------------------
bool vtkFreeTypeTools::GetGlyph(unsigned long tprop_cache_id,
bool vtkFreeTypeTools::GetGlyph(vtkIdType tprop_cache_id,
int font_size,
FT_UInt gindex,
FT_Glyph *glyph,
......@@ -1066,7 +1066,7 @@ bool vtkFreeTypeTools::GetGlyph(vtkTextProperty *tprop,
}
// Map the text property to a unique id that will be used as face id
unsigned long tprop_cache_id;
vtkIdType tprop_cache_id;
this->MapTextPropertyToId(tprop, &tprop_cache_id);
// Get the character/glyph index
......@@ -2291,7 +2291,7 @@ int vtkFreeTypeTools::FitStringToBBox(const T &str, MetaData &metaData,
//----------------------------------------------------------------------------
inline bool vtkFreeTypeTools::GetFace(vtkTextProperty *prop,
unsigned long &prop_cache_id,
vtkIdType &prop_cache_id,
FT_Face &face, bool &face_has_kerning)
{
this->MapTextPropertyToId(prop, &prop_cache_id);
......@@ -2306,7 +2306,7 @@ inline bool vtkFreeTypeTools::GetFace(vtkTextProperty *prop,
//----------------------------------------------------------------------------
inline FT_Bitmap* vtkFreeTypeTools::GetBitmap(FT_UInt32 c,
unsigned long prop_cache_id,
vtkIdType prop_cache_id,
int prop_font_size,
FT_UInt &gindex,
FT_BitmapGlyph &bitmap_glyph)
......@@ -2345,7 +2345,7 @@ FT_Bitmap *vtkFreeTypeTools::GetBitmap(FT_UInt32 c, FTC_Scaler scaler,
FT_BitmapGlyph &bitmap_glyph)
{
// Get the glyph index
if (!this->GetGlyphIndex(reinterpret_cast<unsigned long>(scaler->face_id), c,
if (!this->GetGlyphIndex(reinterpret_cast<vtkIdType>(scaler->face_id), c,
&gindex))
{
return 0;
......@@ -2373,7 +2373,7 @@ FT_Bitmap *vtkFreeTypeTools::GetBitmap(FT_UInt32 c, FTC_Scaler scaler,
//----------------------------------------------------------------------------
inline FT_Outline *vtkFreeTypeTools::GetOutline(FT_UInt32 c,
unsigned long prop_cache_id,
vtkIdType prop_cache_id,
int prop_font_size,
FT_UInt &gindex,
FT_OutlineGlyph &outline_glyph)
......@@ -2407,7 +2407,7 @@ FT_Outline *vtkFreeTypeTools::GetOutline(FT_UInt32 c, FTC_Scaler scaler,
FT_OutlineGlyph &outline_glyph)
{
// Get the glyph index
if (!this->GetGlyphIndex(reinterpret_cast<unsigned long>(scaler->face_id), c,
if (!this->GetGlyphIndex(reinterpret_cast<vtkIdType>(scaler->face_id), c,
&gindex))
{
return 0;
......
......@@ -160,8 +160,8 @@ public:
// binary mask concatenating the attributes of the text property that are
// relevant to our cache (Color, Opacity, Justification setting are not
// stored).
void MapTextPropertyToId(vtkTextProperty *tprop, unsigned long *tprop_cache_id);
void MapIdToTextProperty(unsigned long tprop_cache_id, vtkTextProperty *tprop);
void MapTextPropertyToId(vtkTextProperty *tprop, vtkIdType *tprop_cache_id);
void MapIdToTextProperty(vtkIdType tprop_cache_id, vtkTextProperty *tprop);
// Description:
// Set whether the image produced should be scaled up to the nearest power of
......@@ -252,12 +252,12 @@ protected:
FT_UInt32 c,
FT_Glyph *glyph,
int request = GLYPH_REQUEST_DEFAULT);
bool GetSize(unsigned long tprop_cache_id, int font_size, FT_Size *size);
bool GetSize(vtkIdType tprop_cache_id, int font_size, FT_Size *size);
bool GetSize(FTC_Scaler scaler, FT_Size *size);
bool GetFace(unsigned long tprop_cache_id, FT_Face *face);
bool GetGlyphIndex(unsigned long tprop_cache_id, FT_UInt32 c,
bool GetFace(vtkIdType tprop_cache_id, FT_Face *face);
bool GetGlyphIndex(vtkIdType tprop_cache_id, FT_UInt32 c,
FT_UInt *gindex);
bool GetGlyph(unsigned long tprop_cache_id,
bool GetGlyph(vtkIdType tprop_cache_id,
int font_size,
FT_UInt gindex,
FT_Glyph *glyph,
......@@ -276,12 +276,12 @@ protected:
// Description:
// Attempt to get the typeface of the specified font.
bool GetFace(vtkTextProperty *prop, unsigned long &prop_cache_id,
bool GetFace(vtkTextProperty *prop, vtkIdType &prop_cache_id,
FT_Face &face, bool &face_has_kerning);
// Description:
// Now attempt to get the bitmap for the specified character.
FT_Bitmap* GetBitmap(FT_UInt32 c, unsigned long prop_cache_id,
FT_Bitmap* GetBitmap(FT_UInt32 c, vtkIdType prop_cache_id,
int prop_font_size, FT_UInt &gindex,
FT_BitmapGlyph &bitmap_glyph);
FT_Bitmap* GetBitmap(FT_UInt32 c, FTC_Scaler scaler, FT_UInt &gindex,
......@@ -289,7 +289,7 @@ protected:
// Description:
// Attempt to get the outline for the specified character.
FT_Outline* GetOutline(FT_UInt32 c, unsigned long prop_cache_id,
FT_Outline* GetOutline(FT_UInt32 c, vtkIdType prop_cache_id,
int prop_font_size, FT_UInt &gindex,
FT_OutlineGlyph &outline_glyph);
FT_Outline* GetOutline(FT_UInt32 c, FTC_Scaler scaler, FT_UInt &gindex,
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -662,19 +662,21 @@ void vtkWin32OpenGLRenderWindow::SetupPixelFormatPaletteAndContext(
return;
}
BYTE bpp_byte = static_cast<BYTE>(bpp);
BYTE zbpp_byte = static_cast<BYTE>(zbpp);
PIXELFORMATDESCRIPTOR pfd2 = {
sizeof(PIXELFORMATDESCRIPTOR), /* size */
1, /* version */
dwFlags , /* support double-buffering */
dwFlags, /* support double-buffering */
PFD_TYPE_RGBA, /* color type */
bpp, /* preferred color depth */
bpp_byte, /* preferred color depth */
0, 0, 0, 0, 0, 0, /* color bits (ignored) */
this->AlphaBitPlanes ? bpp/4 : 0, /* no alpha buffer */
static_cast<BYTE>(this->AlphaBitPlanes ? bpp/4 : 0), /* no alpha buffer */
0, /* alpha bits (ignored) */
0, /* no accumulation buffer */
0, 0, 0, 0, /* accum bits (ignored) */
zbpp, /* depth buffer */
this->StencilCapable, /* stencil buffer */
zbpp_byte, /* depth buffer */
static_cast<BYTE>(this->StencilCapable), /* stencil buffer */
0, /* no auxiliary buffers */
PFD_MAIN_PLANE, /* main layer */
0, /* reserved */
......
......@@ -183,7 +183,9 @@ if (WINDOWS)
endif (NOT UNIX AND NOT CYGWIN AND NOT MINGW)
set (H5_HAVE_FUNCTION 1)
set (H5_GETTIMEOFDAY_GIVES_TZ 1)
set (H5_HAVE_TIMEZONE 1)
if (NOT MSVC14)
set (H5_HAVE_TIMEZONE 1)
endif ()
set (H5_HAVE_GETTIMEOFDAY 1)
set (H5_LONE_COLON 0)
if (MINGW)
......@@ -903,35 +905,34 @@ endif (INLINE_TEST___inline__)
if (NOT H5_PRINTF_LL_WIDTH OR H5_PRINTF_LL_WIDTH MATCHES "unknown")
set (PRINT_LL_FOUND 0)
message (STATUS "HDF5: Checking for appropriate format for 64 bit long:")
foreach (HDF5_PRINTF_LL l64 l L q I64 ll)
set (CURRENT_TEST_DEFINITIONS "-DPRINTF_LL_WIDTH=${HDF5_PRINTF_LL}")
if (H5_SIZEOF_LONG_LONG)
set (CURRENT_TEST_DEFINITIONS "${CURRENT_TEST_DEFINITIONS} -DHAVE_LONG_LONG")
endif (H5_SIZEOF_LONG_LONG)
TRY_RUN (HDF5_PRINTF_LL_TEST_RUN HDF5_PRINTF_LL_TEST_COMPILE
${HDF5_BINARY_DIR}/CMake
${HDF5_RESOURCES_DIR}/HDF5Tests.c
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${CURRENT_TEST_DEFINITIONS}
OUTPUT_VARIABLE OUTPUT
set (CURRENT_TEST_DEFINITIONS "-DPRINTF_LL_WIDTH")
if (H5_SIZEOF_LONG_LONG)
set (CURRENT_TEST_DEFINITIONS "${CURRENT_TEST_DEFINITIONS} -DHAVE_LONG_LONG")
endif (H5_SIZEOF_LONG_LONG)
TRY_RUN (HDF5_PRINTF_LL_TEST_RUN HDF5_PRINTF_LL_TEST_COMPILE
${HDF5_BINARY_DIR}/CMake
${HDF5_RESOURCES_DIR}/HDF5Tests.c
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${CURRENT_TEST_DEFINITIONS}
OUTPUT_VARIABLE OUTPUT
)
if (HDF5_PRINTF_LL_TEST_COMPILE)
if (HDF5_PRINTF_LL_TEST_RUN MATCHES 0)
string(REGEX REPLACE ".*PRINTF_LL_WIDTH=\\[(.*)\\].*" "\\1" HDF5_PRINTF_LL "${OUTPUT}")
set (H5_PRINTF_LL_WIDTH "\"${HDF5_PRINTF_LL}\"" CACHE INTERNAL "Width for printf for type `long long' or `__int64', us. `ll")
set (PRINT_LL_FOUND 1)
else (HDF5_PRINTF_LL_TEST_RUN MATCHES 0)
message ("HDF5: Width test failed with result: ${HDF5_PRINTF_LL_TEST_RUN}")
endif (HDF5_PRINTF_LL_TEST_RUN MATCHES 0)
else (HDF5_PRINTF_LL_TEST_COMPILE)
file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
"Test H5_PRINTF_LL_WIDTH failed with the following output:\n ${OUTPUT}\n"
)
if (HDF5_PRINTF_LL_TEST_COMPILE)
if (HDF5_PRINTF_LL_TEST_RUN MATCHES 0)
set (H5_PRINTF_LL_WIDTH "\"${HDF5_PRINTF_LL}\"" CACHE INTERNAL "Width for printf for type `long long' or `__int64', us. `ll")
set (PRINT_LL_FOUND 1)
else (HDF5_PRINTF_LL_TEST_RUN MATCHES 0)
message ("HDF5: Width with ${HDF5_PRINTF_LL} failed with result: ${HDF5_PRINTF_LL_TEST_RUN}")
endif (HDF5_PRINTF_LL_TEST_RUN MATCHES 0)
else (HDF5_PRINTF_LL_TEST_COMPILE)
file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
"Test H5_PRINTF_LL_WIDTH for ${HDF5_PRINTF_LL} failed with the following output:\n ${OUTPUT}\n"
)
endif (HDF5_PRINTF_LL_TEST_COMPILE)
endforeach (HDF5_PRINTF_LL)
endif (HDF5_PRINTF_LL_TEST_COMPILE)
if (PRINT_LL_FOUND)
message (STATUS "HDF5: Checking for apropriate format for 64 bit long: found ${H5_PRINTF_LL_WIDTH}")
message (STATUS "HDF5: Checking for appropriate format for 64 bit long: found ${H5_PRINTF_LL_WIDTH}")
else (PRINT_LL_FOUND)
message (STATUS "HDF5: Checking for apropriate format for 64 bit long: not found")
message (STATUS "HDF5: Checking for appropriate format for 64 bit long: not found")
set (H5_PRINTF_LL_WIDTH "\"unknown\"" CACHE INTERNAL
"Width for printf for type `long long' or `__int64', us. `ll"
)
......
......@@ -245,7 +245,7 @@ int DebugReport(int reportType, char* message, int* returnValue)
int main(void)
{
char *llwidthArgs[] = { "l64", "l", "L", "q", "ll", NULL };
char *llwidthArgs[] = { "I64", "l64", "l", "L", "q", "ll", NULL };
char *s = malloc(128);
char **currentArg = NULL;
LL_TYPE x = (LL_TYPE)1048576 * (LL_TYPE)1048576;
......
......@@ -250,7 +250,7 @@
#cmakedefine _WINSOCKAPI_
/* Win32 Std C name mangling work-around */
#if defined(_MSC_VER)
#if defined(_MSC_VER) && !defined(HAVE_SNPRINTF)
# define snprintf _snprintf
#endif
......@@ -258,6 +258,6 @@
/* #undef ss_family */
/* Win32 Std C name mangling work-around */
#if defined(_MSC_VER) && (_MSC_VER < 1500)
#if defined(_MSC_VER) && (_MSC_VER < 1500) && !defined(HAVE_VSNPRINTF)
# define vsnprintf _vsnprintf
#endif
......@@ -66,6 +66,7 @@ CHECK_INCLUDE_FILES("inttypes.h" HAVE_INTTYPES_H)
CHECK_INCLUDE_FILES("limits.h" HAVE_LIMITS_H)
CHECK_INCLUDE_FILES("malloc.h" HAVE_MALLOC_H)
CHECK_INCLUDE_FILES("memory.h" HAVE_MEMORY_H)
CHECK_INCLUDE_FILES("search.h" HAVE_SEARCH_H)
CHECK_INCLUDE_FILES("stdint.h" HAVE_STDINT_H)
CHECK_INCLUDE_FILES("stdlib.h" HAVE_STDLIB_H)
CHECK_INCLUDE_FILES("string.h" HAVE_STRING_H)
......
......@@ -70,6 +70,9 @@
/* Define if you have POSIX threads libraries and header files. */
#cmakedefine HAVE_PTHREAD
/* Define to 1 if you have the <search.h> header file. */
#cmakedefine HAVE_SEARCH_H @HAVE_SEARCH_H@
/* Define to 1 if you have the `sqrt' function. */
#cmakedefine HAVE_SQRT @HAVE_SQRT@
......
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