@@ -64,7 +64,7 @@ static const char *getArchStr()
6464#define DIRSEP " /"
6565#include < dirent.h>
6666
67- #elif defined (WINDOWS )
67+ #elif defined (_WIN32 )
6868#define DIRLIST_SEP_CHARS " ;"
6969#ifdef _WIN64
7070#define ARCHSTR " win64"
@@ -73,6 +73,7 @@ static const char *getArchStr()
7373#endif
7474#define DIRSEP " \\ "
7575
76+ #define NOMINMAX
7677#include " shlobj.h"
7778#include " tchar.h"
7879#endif
@@ -157,7 +158,7 @@ PluginHandle::~PluginHandle() {
157158}
158159
159160
160- #if defined (WINDOWS )
161+ #if defined (_WIN32 )
161162const TCHAR *getStdOFXPluginPath (const std::string &hostId = " Plugins" )
162163{
163164 static TCHAR buffer[MAX_PATH];
@@ -174,7 +175,7 @@ const TCHAR *getStdOFXPluginPath(const std::string &hostId = "Plugins")
174175static
175176std::string OFXGetEnv (const char * e)
176177{
177- #if defined(WINDOWS ) && !defined(__MINGW32__)
178+ #if defined(_WIN32 ) && !defined(__MINGW32__)
178179 size_t requiredSize;
179180 getenv_s (&requiredSize, 0 , 0 , e);
180181 std::vector<char > buffer (requiredSize);
@@ -239,8 +240,8 @@ PluginCache::PluginCache() : _hostSpec(0), _xmlCurrentBinary(0), _xmlCurrentPlug
239240
240241 _pluginPath.push_back (path);
241242 }
242-
243- #if defined(WINDOWS )
243+
244+ #if defined(_WIN32 )
244245 _pluginPath.push_back (getStdOFXPluginPath ());
245246 _pluginPath.push_back (" C:\\ Program Files\\ Common Files\\ OFX\\ Plugins" );
246247#endif
@@ -253,7 +254,7 @@ PluginCache::PluginCache() : _hostSpec(0), _xmlCurrentBinary(0), _xmlCurrentPlug
253254}
254255
255256void PluginCache::setPluginHostPath (const std::string &hostId) {
256- #if defined(WINDOWS )
257+ #if defined(_WIN32 )
257258 _pluginPath.push_back (getStdOFXPluginPath (hostId));
258259 _pluginPath.push_back (" C:\\ Program Files\\ Common Files\\ OFX\\ " + hostId);
259260#endif
@@ -270,8 +271,8 @@ void PluginCache::scanDirectory(std::set<std::string> &foundBinFiles, const std:
270271#ifdef CACHE_DEBUG
271272 printf (" looking in %s for plugins\n " , dir.c_str ());
272273#endif
273-
274- #if defined (WINDOWS )
274+
275+ #if defined (_WIN32 )
275276 WIN32_FIND_DATA findData;
276277 HANDLE findHandle;
277278#else
@@ -285,7 +286,7 @@ void PluginCache::scanDirectory(std::set<std::string> &foundBinFiles, const std:
285286
286287#if defined (UNIX)
287288 while (dirent *de = readdir (d))
288- #elif defined (WINDOWS )
289+ #elif defined (_WIN32 )
289290 findHandle = FindFirstFile ((dir + " \\ *" ).c_str (), &findData);
290291
291292 if (findHandle == INVALID_HANDLE_VALUE)
@@ -369,7 +370,7 @@ void PluginCache::scanDirectory(std::set<std::string> &foundBinFiles, const std:
369370 scanDirectory (foundBinFiles, dir + DIRSEP + name, recurse);
370371 }
371372 }
372- #if defined(WINDOWS )
373+ #if defined(_WIN32 )
373374 int rval = FindNextFile (findHandle, &findData);
374375
375376 if (rval == 0 ) {
0 commit comments