From: malaterre Date: Fri, 21 Jan 2005 20:49:37 +0000 (+0000) Subject: BUG: On Win32 64bits integer are a pain to use X-Git-Tag: Version1.0.bp~218 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=e3ff5566e3c4a29af5d9ce5872449360fc3e6615;p=gdcm.git BUG: On Win32 64bits integer are a pain to use --- diff --git a/src/gdcmCommon.h b/src/gdcmCommon.h index d32319f0..ddd95eb7 100644 --- a/src/gdcmCommon.h +++ b/src/gdcmCommon.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmCommon.h,v $ Language: C++ - Date: $Date: 2005/01/21 19:51:12 $ - Version: $Revision: 1.53 $ + Date: $Date: 2005/01/21 20:49:37 $ + Version: $Revision: 1.54 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -51,10 +51,10 @@ #if defined(_MSC_VER) || defined(__BORLANDC__) typedef signed char int8_t; #endif -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned int uint32_t; -typedef unsigned long uint64_t; +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned int uint32_t; +typedef unsigned __int64 uint64_t; #define UINT32_MAX (4294967295U) #endif diff --git a/src/gdcmUtil.cxx b/src/gdcmUtil.cxx index cbaa71b6..90359b57 100644 --- a/src/gdcmUtil.cxx +++ b/src/gdcmUtil.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmUtil.cxx,v $ Language: C++ - Date: $Date: 2005/01/21 20:02:46 $ - Version: $Revision: 1.116 $ + Date: $Date: 2005/01/21 20:49:37 $ + Version: $Revision: 1.117 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -367,8 +367,6 @@ bool Util::DicomStringEqual(const std::string &s1, const char *s2) return s1_even == s2_even; } - - /** * \brief tells us if the processor we are working with is BigEndian or not */ @@ -686,7 +684,11 @@ std::string Util::GetMACAddress() if (stat == 0) { // fill with zero to fit on 15 bytes. +#if defined(_MSC_VER) || defined(__BORLANDC__) + return Format("%015I64u", d.n); +#else return Format("%015llu", d.n); +#endif } else {