Skip to content

Commit c205abc

Browse files
committed
small .h trick for faster win32 interp compiles, cl.exe in the prompt is
much faster eye. PERL_CORE only, since CPAN XS assumes the built-in out the box headers/tokens/structs/linker libs selected by p5p decades ago, will never change.
1 parent a0d5439 commit c205abc

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

win32/perllib.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
* [Frodo on p.73 of _The Lord of the Rings_, I/iii: "Three Is Company"]
77
*/
88
#define PERLIO_NOT_STDIO 0
9+
#define PERL_IN_WIN32_PERLLIB_C
910
#include "EXTERN.h"
1011
#include "perl.h"
1112

1213
#include "XSUB.h"
14+
#include <winuser.h>
1315

1416
#ifdef PERL_IMPLICIT_SYS
1517
#include "win32iop.h"

win32/win32.h

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,58 @@
110110
# define PERL_STATIC_FORCE_INLINE_NO_RET __declspec(noreturn) __forceinline static
111111
#endif
112112

113+
#ifdef PERL_CORE
114+
#define VC_EXTRALEAN
115+
#define NOCRYPT
116+
#define NOTAPE
117+
#define NOIMAGE
118+
#define NOPROXYSTUB
119+
#define NORPC
120+
#define NOGDICAPMASKS /* CC_*, LC_*, PC_*, CP_*, TC_*, RC_ */
121+
#define NOVIRTUALKEYCODES /* VK_ */
122+
#ifndef PERL_IN_WIN32_PERLLIB_C
123+
#define NOWINMESSAGES /* WM_*, EM_*, LB_*, CB_* */
124+
#endif
125+
#define NOWINSTYLES /* WS_*, CS_*, ES_*, LBS_*, SBS_*, CBS_* */
126+
#define NOSYSMETRICS /* SM_* */
127+
#define NOMENUS /* MF_* */
128+
#define NOICONS /* IDI_* */
129+
#define NOKEYSTATES /* MK_* */
130+
#define NOSYSCOMMANDS /* SC_* */
131+
#define NORASTEROPS /* Binary and Tertiary raster ops */
132+
#define NOSHOWWINDOW /* SW_* */
133+
#define OEMRESOURCE /* OEM Resource values */
134+
#define NOATOM /* Atom Manager routines */
135+
#define NOCLIPBOARD /* Clipboard routines */
136+
#define NOCOLOR /* Screen colors */
137+
#define NOCTLMGR /* Control and Dialog routines */
138+
#define NODRAWTEXT /* DrawText() and DT_* */
139+
#define NOGDI /* All GDI defines and routines */
140+
#define NOKERNEL /* All KERNEL defines and routines */
141+
#ifndef PERL_IN_WIN32_PERLLIB_C
142+
#define NOUSER /* All USER defines and routines */
143+
#endif
144+
//#define NONLS /* All NLS defines and routines */
145+
#define NOMB /* MB_* and MessageBox() */
146+
#define NOMEMMGR /* GMEM_*, LMEM_*, GHND, LHND, associated routines*/
147+
#define NOMETAFILE /* typedef METAFILEPICT */
148+
#define NOMINMAX /* Macros min(a,b) and max(a,b) */
149+
#define NOMSG /* typedef MSG and associated routines */
150+
#define NOOPENFILE /* OpenFile(), OemToAnsi, AnsiToOem, and OF_**/
151+
#define NOSCROLL /* SB_* and scrolling routines */
152+
#define NOSERVICE /* All Service Controller routines, SERVICE_ equates, etc. */
153+
#define NOSOUND /* Sound driver routines */
154+
#define NOTEXTMETRIC /* typedef TEXTMETRIC and associated routines */
155+
#define NOWH /* SetWindowsHook and WH_* */
156+
#define NOWINOFFSETS /* GWL_*, GCL_*, associated routines */
157+
#define NOCOMM /* COMM driver routines */
158+
#define NOKANJI /* Kanji support stuff. */
159+
#define NOHELP /* Help engine interface. */
160+
#define NOPROFILER /* Profiler interface. */
161+
#define NODEFERWINDOWPOS /* DeferWindowPos routines */
162+
#define NOMCX /* Modem Configuration Extensions */
163+
164+
#endif
113165
#define WIN32_LEAN_AND_MEAN
114166
#include <windows.h>
115167

0 commit comments

Comments
 (0)