#define SUPPORTDLL
#ifdef WIN32
+# ifdef _WIN64
+# ifndef _WIN32_WINNT
+# define _WIN32_WINNT 0x0502
+# endif
+ // for SetDllDirectory
+# endif
# include <windows.h>
# include <mmsystem.h> // timeGetTime
# include <time.h> // localtime
{
Con_DPrintf (" \"%s\"", dllnames[i]);
#ifdef WIN32
+# ifdef _WIN64
+ SetDllDirectory("bin64");
+# endif
dllhandle = LoadLibrary (dllnames[i]);
+# ifdef _WIN64
+ SetDllDirectory(NULL);
+# endif
#else
dllhandle = dlopen (dllnames[i], RTLD_LAZY | RTLD_GLOBAL);
#endif
# define HAVE_GETTIMEOFDAY 1
#endif
-#ifdef FD_SET
-# define HAVE_SELECT 1
+#ifndef WIN32
+// on Win32, select() cannot be used with all three FD list args being NULL according to MSDN
+// (so much for POSIX...)
+# ifdef FD_SET
+# define HAVE_SELECT 1
+# endif
#endif
#ifndef WIN32