Three supported win32 compilation environments: MSVC, Cygwin and MingW32
authorNigel Stewart <nigels.com@gmail.com>
Tue, 30 Dec 2003 02:28:13 +0000 (02:28 +0000)
committerNigel Stewart <nigels.com@gmail.com>
Tue, 30 Dec 2003 02:28:13 +0000 (02:28 +0000)
The windows mmsystem header need only be included internally to freeglut
strdup vs _strdup is specific to the MS compiler

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@430 7f0cb862-5218-0410-a997-914c9d46530a

src/freeglut_internal.h

index 7205e7f..cea8ad8 100644 (file)
 /*
  * Freeglut is meant to be available under all Unix/X11 and Win32 platforms.
  */
-#if !defined(_WIN32)
-#   define  TARGET_HOST_UNIX_X11    1
-#   define  TARGET_HOST_WIN32       0
-#else
+#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__)
 #   define  TARGET_HOST_UNIX_X11    0
 #   define  TARGET_HOST_WIN32       1
+#else
+#   define  TARGET_HOST_UNIX_X11    1
+#   define  TARGET_HOST_WIN32       0
 #endif
 
 #define  FREEGLUT_MAX_MENUS         3
 #if TARGET_HOST_WIN32
 #include <windows.h>
 #include <windowsx.h>
+#include <mmsystem.h>
+#endif
 
+#if defined(_MSC_VER)
 #define strdup   _strdup
 #endif