From: malaterre Date: Tue, 18 Jan 2005 16:19:57 +0000 (+0000) Subject: COMP: Fix compilation on Mingw X-Git-Tag: Version1.0.bp~262 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=1d6b53d6cc3487013b10aa9b604ae948585dbfb7;p=gdcm.git COMP: Fix compilation on Mingw --- diff --git a/src/gdcmUtil.cxx b/src/gdcmUtil.cxx index 03cd640e..9d121654 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/18 15:46:49 $ - Version: $Revision: 1.111 $ + Date: $Date: 2005/01/18 16:19:57 $ + Version: $Revision: 1.112 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -28,7 +28,7 @@ #include //only included in implementation file #include //only included in implementation file -#if defined(_MSC_VER) +#if defined(_MSC_VER) || defined(__MINGW32__) #include // for gethostname & gethostbyname #undef GetCurrentTime #else @@ -669,7 +669,7 @@ std::string Util::GetIPAddress() # define HOST_NAME_MAX 255 // In this case we should maybe check the string was not truncated. // But I don't known how to check that... -#if defined(_MSC_VER) || defined(__BORLANDC__) +#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__MINGW32__) // with WinSock DLL we need to initialise the WinSock before using gethostname WORD wVersionRequested = MAKEWORD(1,0); WSADATA WSAData; @@ -705,7 +705,7 @@ std::string Util::GetIPAddress() } // str now contains one local IP address -#if defined(_MSC_VER) || defined(__BORLANDC__) +#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__MINGW32__) WSACleanup(); #endif