X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmUtil.cxx;h=443abb45e88445858ee6d2c23713b9b1045e8bb3;hb=d72e3cb0326093093f99863964f8f4df382c83e1;hp=98e4e107646a40e3191c4dfdf195b0c737626e4e;hpb=8dfa11947f568ef86508fb5c63c81ee1172fdf49;p=gdcm.git diff --git a/src/gdcmUtil.cxx b/src/gdcmUtil.cxx index 98e4e107..443abb45 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/10 22:54:34 $ - Version: $Revision: 1.88 $ + Date: $Date: 2005/01/11 00:24:44 $ + Version: $Revision: 1.89 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -347,14 +347,11 @@ bool Util::DicomStringEqual(const std::string &s1, const char *s2) */ bool Util::IsCurrentProcessorBigEndian() { - uint16_t intVal = 1; - uint8_t bigEndianRepr[4] = { 0x00, 0x00, 0x00, 0x01 }; - int res = memcmp(reinterpret_cast(&intVal), - reinterpret_cast(bigEndianRepr), 4); - if (res == 0) - return true; - else - return false; +#ifdef GDCM_WORDS_BIGENDIAN + return true; +#else + return false; +#endif }