Skip to content

Commit e010a10

Browse files
dg0ytmalaterre
authored andcommitted
Fix #include <windows.h>
Inclusion must take place in top-level scope.
1 parent b0a3664 commit e010a10

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Source/Common/gdcmFilename.cxx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
#include <cstdlib> // realpath
1818
#include <cstring>
1919

20+
#if defined(_WIN32) && (defined(_MSC_VER) || defined(__WATCOMC__) || defined(__BORLANDC__) || defined(__MINGW32__))
21+
#include <windows.h>
22+
#endif
23+
2024
namespace gdcm
2125
{
2226

@@ -97,7 +101,6 @@ const char *Filename::ToUnixSlashes()
97101
}
98102

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

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

0 commit comments

Comments
 (0)