Mercurial > hg > orthanc
diff Core/DicomNetworking/DicomUserConnection.cpp @ 3828:3d1bb2193832
fix build on os x
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 10 Apr 2020 16:35:41 +0200 |
parents | 7f083dfae62b |
children | 4fde7933e504 |
line wrap: on
line diff
--- a/Core/DicomNetworking/DicomUserConnection.cpp Fri Apr 10 16:12:10 2020 +0200 +++ b/Core/DicomNetworking/DicomUserConnection.cpp Fri Apr 10 16:35:41 2020 +0200 @@ -92,6 +92,7 @@ #include "../OrthancException.h" #include "../DicomParsing/FromDcmtkBridge.h" #include "../DicomParsing/ToDcmtkBridge.h" +#include "NetworkingCompatibility.h" #include <dcmtk/dcmdata/dcdeftag.h> #include <dcmtk/dcmdata/dcfilefo.h> @@ -103,30 +104,6 @@ #include <set> -#ifdef _WIN32 -/** - * "The maximum length, in bytes, of the string returned in the buffer - * pointed to by the name parameter is dependent on the namespace provider, - * but this string must be 256 bytes or less. - * http://msdn.microsoft.com/en-us/library/windows/desktop/ms738527(v=vs.85).aspx - **/ -# define HOST_NAME_MAX 256 -# include <winsock.h> -#endif - - -#if !defined(HOST_NAME_MAX) && defined(_POSIX_HOST_NAME_MAX) -/** - * TO IMPROVE: "_POSIX_HOST_NAME_MAX is only the minimum value that - * HOST_NAME_MAX can ever have [...] Therefore you cannot allocate an - * array of size _POSIX_HOST_NAME_MAX, invoke gethostname() and expect - * that the result will fit." - * http://lists.gnu.org/archive/html/bug-gnulib/2009-08/msg00128.html - **/ -#define HOST_NAME_MAX _POSIX_HOST_NAME_MAX -#endif - - static const char* DEFAULT_PREFERRED_TRANSFER_SYNTAX = UID_LittleEndianImplicitTransferSyntax; /**