Remove unused header include
[xapian.git] / xapian-core / common / safewindows.h
blob71dba25d31e570784e2ae7f5f9a4d121bba4eae7
1 /** @file safewindows.h
2 * @brief #include <windows.h> without all the bloat and damage.
3 */
4 /* Copyright (C) 2005,2007,2013 Olly Betts
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 2 of the
9 * License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 * MA 02110-1301, USA
22 #ifndef XAPIAN_INCLUDED_SAFEWINDOWS_H
23 #define XAPIAN_INCLUDED_SAFEWINDOWS_H
25 #if !defined __CYGWIN__ && !defined __WIN32__
26 # error Including safewindows.h, but neither __CYGWIN__ nor __WIN32__ defined!
27 #endif
29 // Prevent windows.h from defining min and max macros.
30 #ifndef NOMINMAX
31 # define NOMINMAX
32 #endif
34 // Prevent windows.h from including lots of obscure win32 api headers
35 // which we don't care about and will just slow down compilation and
36 // increase the risk of symbol collisions.
37 #define WIN32_LEAN_AND_MEAN
38 #define NOGDI
39 #include <windows.h>
41 // FOF_NOERRORUI isn't defined by older versions of the mingw headers.
42 #ifndef FOF_NOERRORUI
43 # define FOF_NOERRORUI 1024
44 #endif
46 #endif // XAPIAN_INCLUDED_SAFEWINDOWS_H