Skip to content

Commit

Permalink
Fix #include <windows.h>
Browse files Browse the repository at this point in the history
Inclusion must take place in top-level scope.
  • Loading branch information
dg0yt authored and malaterre committed Jan 7, 2025
1 parent f0dc761 commit 26e3b35
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Source/Common/gdcmFilename.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
#include <cstdlib> // realpath
#include <cstring>

#if defined(_WIN32) && (defined(_MSC_VER) || defined(__WATCOMC__) || defined(__BORLANDC__) || defined(__MINGW32__))
#include <windows.h>
#endif

namespace gdcm
{

Expand Down Expand Up @@ -97,7 +101,6 @@ const char *Filename::ToUnixSlashes()
}

#if defined(_WIN32) && (defined(_MSC_VER) || defined(__WATCOMC__) || defined(__BORLANDC__) || defined(__MINGW32__))
#include <windows.h>

inline void Realpath(const char *path, std::string & resolved_path)
{
Expand Down

0 comments on commit 26e3b35

Please sign in to comment.