Skip to content

Commit 8162464

Browse files
committed
windows: Define WIN32_LEAN_AND_MEAN to make compilation faster.
windows.h includes a lot of other headers, slowing down compilation significantly. WIN32_LEAN_AND_MEAN reduces that a bit. It'd be better to remove the include of windows.h (as well as indirect inclusions of it) from such a central place, but until then... Discussion: https://postgr.es/m/20210921193035.pqzay43vpyv7in43@alap3.anarazel.de
1 parent de744e9 commit 8162464

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/include/port/win32_port.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@
4343
#define _WINSOCKAPI_
4444
#endif
4545

46+
/*
47+
* windows.h includes a lot of other headers, slowing down compilation
48+
* significantly. WIN32_LEAN_AND_MEAN reduces that a bit. It'd be better to
49+
* remove the include of windows.h (as well as indirect inclusions of it) from
50+
* such a central place, but until then...
51+
*/
52+
#define WIN32_LEAN_AND_MEAN
53+
4654
#include <winsock2.h>
4755
#include <ws2tcpip.h>
4856
#include <windows.h>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy