]> granicus.if.org Git - curl/commitdiff
winbuild: add ENABLE_UNICODE option
authorapique <apique@PC42.isdom.isoft.fr>
Mon, 9 Sep 2019 15:06:15 +0000 (17:06 +0200)
committerMarcel Raad <Marcel.Raad@teamviewer.com>
Fri, 4 Oct 2019 09:29:08 +0000 (11:29 +0200)
Fixes https://github.com/curl/curl/issues/4308
Closes https://github.com/curl/curl/pull/4309

winbuild/Makefile.vc
winbuild/MakefileBuild.vc

index 9b3b35513d956fee1ef6a01e6495af0bd2369bf6..7ad49f09f62e3db1b0d7817f14c84198860f3108 100644 (file)
@@ -59,6 +59,7 @@ CFGSET=true
 !MESSAGE   ENABLE_WINSSL=<yes or no>      - Enable native Windows SSL support, defaults to yes
 !MESSAGE   ENABLE_OPENSSL_AUTO_LOAD_CONFIG=<yes or no>
 !MESSAGE                                  - Whether the OpenSSL configuration will be loaded automatically, defaults to yes
+!MESSAGE   ENABLE_UNICODE=<yes or no>     - Enable UNICODE support, defaults to no
 !MESSAGE   GEN_PDB=<yes or no>            - Generate Program Database (debug symbols for release build)
 !MESSAGE   DEBUG=<yes or no>              - Debug builds
 !MESSAGE   MACHINE=<x86 or x64>           - Target architecture (default x64 on AMD64, x86 on others)
@@ -146,6 +147,14 @@ ENABLE_OPENSSL_AUTO_LOAD_CONFIG = true
 ENABLE_OPENSSL_AUTO_LOAD_CONFIG = false
 !ENDIF
 
+!IFNDEF ENABLE_UNICODE
+USE_UNICODE = false
+!ELSEIF "$(ENABLE_UNICODE)"=="yes"
+USE_UNICODE = true
+!ELSEIF "$(ENABLE_UNICODE)"=="no"
+USE_UNICODE = false
+!ENDIF
+
 CONFIG_NAME_LIB = libcurl
 
 !IF "$(WITH_SSL)"=="dll"
@@ -277,6 +286,7 @@ $(MODE):
        @SET USE_IPV6=$(USE_IPV6)
        @SET USE_SSPI=$(USE_SSPI)
        @SET USE_WINSSL=$(USE_WINSSL)
+       @SET USE_UNICODE=$(USE_UNICODE)
 # compatibility bit
        @SET WITH_NGHTTP2=$(WITH_NGHTTP2)
 
index 5cc16501b6ddba85b34cdd1ca6606cd43c28b02c..8267250c24a44f4725a9acb01f44714c6b1712ed 100644 (file)
@@ -485,6 +485,10 @@ LFLAGS = $(LFLAGS) $(LFLAGS_PDB)
 CFLAGS = $(CFLAGS) /DCURL_WITH_MULTI_SSL\r
 !ENDIF\r
 \r
+!IF "$(USE_UNICODE)"=="true"\r
+CFLAGS = $(CFLAGS) /DUNICODE /D_UNICODE\r
+!ENDIF\r
+\r
 LIB_DIROBJ = ..\builds\$(CONFIG_NAME_LIB)-obj-lib\r
 CURL_DIROBJ = ..\builds\$(CONFIG_NAME_LIB)-obj-curl\r
 \r