[win] Consolidate windows.h include tips and tricks

This commit is contained in:
Behdad Esfahbod 2014-07-19 16:32:04 -04:00
parent f26d59d468
commit db30828048
5 changed files with 12 additions and 11 deletions

View File

@ -44,10 +44,6 @@
#elif !defined(HB_NO_MT) && (defined(_WIN32) || defined(__CYGWIN__))
#define WIN32_LEAN_AND_MEAN
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0600
#endif
#include <windows.h>
/* MinGW has a convoluted history of supporting MemoryBarrier

View File

@ -44,7 +44,6 @@
#elif !defined(HB_NO_MT) && (defined(_WIN32) || defined(__CYGWIN__))
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
typedef CRITICAL_SECTION hb_mutex_impl_t;
#define HB_MUTEX_IMPL_INIT { NULL, 0, 0, NULL, NULL, 0 }

View File

@ -116,6 +116,18 @@
#define HB_FUNC __func__
#endif
#ifdef _WIN32
/* We need Windows Vista for both Uniscribe backend and for
* MemoryBarrier. We don't support compiling on Windows XP,
* though we run on it fine. */
# if defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0600
# undef _WIN32_WINNT
# endif
# ifndef _WIN32_WINNT
# define _WIN32_WINNT 0x0600
# endif
# define WIN32_LEAN_AND_MEAN
#endif
/* Basics */

View File

@ -24,9 +24,6 @@
* Google Author(s): Behdad Esfahbod
*/
#define _WIN32_WINNT 0x0600
#define WIN32_LEAN_AND_MEAN
#define HB_SHAPER uniscribe
#include "hb-shaper-impl-private.hh"

View File

@ -29,9 +29,6 @@
#include "hb.h"
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0600
#endif
#include <windows.h>
HB_BEGIN_DECLS