]> granicus.if.org Git - curl/commitdiff
winbuild: fix boringssl build
authorHenrik S. Gaßmann <henrik@gassmann.onl>
Sat, 24 Jun 2017 09:55:21 +0000 (11:55 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 24 Jun 2017 20:13:21 +0000 (22:13 +0200)
Compile with `WIN32_LEAN_AND_MEAN` which prevents `windows.h` from
including too much clutter including `wincrypt.h` which in turn contains
some preprocessor macros that clash with boringssl symbols.

Detect boringssl by checking the existance of `is_boringssl.h` and set
the corresponding `HAVE_BORINGSSL` for compilation which is used in
`ldap.c` to undefine the evil macros.

Closes #1610

winbuild/MakefileBuild.vc

index 83f92374e36b118a4ee4b4c1aebacede0297584f..eb28efefdb9e3ddd05508615ae74b5306a73f149 100644 (file)
@@ -60,7 +60,7 @@ CFLAGS     = /I. /I../lib /I../include /nologo /W3 /GX /DWIN32 /YX /FD /c /DBUIL
 !ELSE\r
 CC_NODEBUG  = $(CC) /O2 /DNDEBUG\r
 CC_DEBUG    = $(CC) /Od /D_DEBUG /RTC1 /Z7 /LDd /W3\r
-CFLAGS      = /I. /I ../lib /I../include /nologo /W3 /EHsc /DWIN32 /FD /c /DBUILDING_LIBCURL\r
+CFLAGS      = /I. /I ../lib /I../include /nologo /W3 /EHsc /DWIN32 /FD /c /DBUILDING_LIBCURL /DWIN32_LEAN_AND_MEAN\r
 !ENDIF\r
 \r
 LFLAGS     = /nologo /machine:$(MACHINE)\r
@@ -133,6 +133,9 @@ SSL          = static
 \r
 !IFDEF USE_SSL\r
 SSL_CFLAGS   = /DUSE_OPENSSL /I"$(DEVEL_INCLUDE)/openssl"\r
+!IF EXISTS("$(DEVEL_INCLUDE)\openssl\is_boringssl.h")\r
+SSL_CFLAGS   = $(SSL_CFLAGS) /DHAVE_BORINGSSL\r
+!ENDIF\r
 !ENDIF\r
 \r
 !IF "$(WITH_NGHTTP2)"=="dll"\r