Moving the Windows-specific includes into the Windows-specific header file

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1028 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
fayjf 2012-01-29 13:11:30 +00:00
parent fb4798198c
commit d526869dee
2 changed files with 22 additions and 17 deletions

View File

@ -88,23 +88,7 @@
/* -- PLATFORM-SPECIFIC INCLUDES ------------------------------------------- */ /* -- PLATFORM-SPECIFIC INCLUDES ------------------------------------------- */
/* All Win32 headers depend on the huge windows.h recursive include. #if TARGET_HOST_POSIX_X11
* Note: Lower-case header names are used, for best cross-platform
* compatibility.
*/
#if TARGET_HOST_MS_WINDOWS && !defined(_WIN32_WCE)
# include <windows.h>
# include <windowsx.h>
# include <mmsystem.h>
/* CYGWIN does not have tchar.h, but has TEXT(x), defined in winnt.h. */
# ifndef __CYGWIN__
# include <tchar.h>
# else
# define _TEXT(x) TEXT(x)
# define _T(x) TEXT(x)
# endif
#elif TARGET_HOST_POSIX_X11
# include <GL/glx.h> # include <GL/glx.h>
# include <X11/Xlib.h> # include <X11/Xlib.h>
# include <X11/Xatom.h> # include <X11/Xatom.h>

View File

@ -28,6 +28,27 @@
#ifndef FREEGLUT_INTERNAL_MSWIN_H #ifndef FREEGLUT_INTERNAL_MSWIN_H
#define FREEGLUT_INTERNAL_MSWIN_H #define FREEGLUT_INTERNAL_MSWIN_H
/* All Win32 headers depend on the huge windows.h recursive include.
* Note: Lower-case header names are used, for best cross-platform
* compatibility.
*/
#if !defined(_WIN32_WCE)
# include <windows.h>
# include <windowsx.h>
# include <mmsystem.h>
/* CYGWIN does not have tchar.h, but has TEXT(x), defined in winnt.h. */
# ifndef __CYGWIN__
# include <tchar.h>
# else
# define _TEXT(x) TEXT(x)
# define _T(x) TEXT(x)
# endif
#endif
typedef struct tagSFG_PlatformDisplay SFG_PlatformDisplay; typedef struct tagSFG_PlatformDisplay SFG_PlatformDisplay;
struct tagSFG_PlatformDisplay struct tagSFG_PlatformDisplay
{ {