Commit Graph

124 Commits

Author SHA1 Message Date
Marcel Raad
a55c835e6b
curl_multibyte: add to curlx
This will also be needed in the tool and tests.

Ref: https://github.com/curl/curl/pull/3758#issuecomment-482197512
Closes https://github.com/curl/curl/pull/3784
2020-05-14 18:13:27 +02:00
Daniel Stenberg
9a8b3b3e13
copyright: fix out-of-date copyright ranges and missing headers
Reported by the new script 'scripts/copyright.pl'. The script has a
regex whitelist for the files that don't need copyright headers.

Removed three (mostly usesless) README files from docs/

Closes #5141
2020-03-24 15:05:59 +01:00
Jay Satiro
b0a9e3c28c winbuild: Document CURL_STATICLIB requirement for static libcurl
A static libcurl (ie winbuild mode=static) requires that the user define
CURL_STATICLIB when using it in their application. This is already
covered in the FAQ and INSTALL.md, but is a pretty important point so
now it's noted in the BUILD.WINDOWS.txt as well.

Assisted-by: Michael Vittiglio

Closes https://github.com/curl/curl/pull/4721
2019-12-15 17:31:23 -05:00
andrew_ishchuk
476a832094 winbuild: Define CARES_STATICLIB when WITH_CARES=static
When libcurl is built with MODE=static, c-ares is forced into static
linkage too. That doesn't happen when MODE=dll so linker would break
over undefined symbols.

closes https://github.com/curl/curl/pull/4688
2019-12-09 19:11:10 -05:00
Jay Satiro
9c1806ae46 build: Disable Visual Studio warning "conditional expression is constant"
- Disable warning C4127 "conditional expression is constant" globally
  in curl_setup.h for when building with Microsoft's compiler.

This mainly affects building with the Visual Studio project files found
in the projects dir.

Prior to this change the cmake and winbuild build systems already
disabled 4127 globally for when building with Microsoft's compiler.
Also, 4127 was already disabled for all build systems in the limited
circumstance of the WHILE_FALSE macro which disabled the warning
specifically for while(0). This commit removes the WHILE_FALSE macro and
all other cruft in favor of disabling globally in curl_setup.

Background:

We have various macros that cause 0 or 1 to be evaluated, which would
cause warning C4127 in Visual Studio. For example this causes it:

    #define Curl_resolver_asynch() 1

Full behavior is not clearly defined and inconsistent across versions.
However it is documented that since VS 2015 Update 3 Microsoft has
addressed this somewhat but not entirely, not warning on while(true) for
example.

Prior to this change some C4127 warnings occurred when I built with
Visual Studio using the generated projects in the projects dir.

Closes https://github.com/curl/curl/pull/4658
2019-12-01 19:01:02 -05:00
apique
1d7fe8390f
winbuild: add ENABLE_UNICODE option
Fixes https://github.com/curl/curl/issues/4308
Closes https://github.com/curl/curl/pull/4309
2019-10-04 11:29:08 +02:00
Joel Depooter
96a3ab7bc8
winbuild: Add manifest to curl.exe for proper OS version detection
This is a small fix to commit ebd213270a
in pull request #1221. That commit added the CURL_EMBED_MANIFEST flag to
CURL_RC_FLAGS. However, later in the file CURL_RC_FLAGS is
overwritten. The fix is to append values to CURL_RC_FLAGS instead of
overwriting

Closes #4399
2019-09-23 09:15:00 +02:00
Bernhard Walle
a765a30500
winbuild/MakefileBuild.vc: Add vssh
Without that modification, the Windows build using the makefiles doesn't
work.

Signed-off-by: Bernhard Walle <bernhard.walle@posteo.eu>

Fixes #4322
Closes #4323
2019-09-11 14:18:44 +02:00
Bernhard Walle
142d89edba winbuild/MakefileBuild.vc: Fix line endings
The file had mixed line endings.

Signed-off-by: Bernhard Walle <bernhard.walle@posteo.eu>
2019-09-11 12:56:22 +02:00
Daniel Stenberg
9736ac03ab winbuild: add vquic to list of build directories
This fixes the winbuild build method which broke several days ago
when experimental quic support was added in 3af0e76.

Reported-by: Michael Lee

Fixes https://github.com/curl/curl/issues/4158
2019-07-29 01:49:53 -04:00
Shankar Jadhavar
5feb58ca12 winbuild: Change Makefile to honor ENABLE_OPENSSL_AUTO_LOAD_CONFIG
- Made changes so that ENABLE_OPENSSL_AUTO_LOAD_CONFIG will be honored.

- Also removed some ^M chars from file.

Prior to this change while building on Windows platform even if we pass
the ENABLE_OPENSSL_AUTO_LOAD_CONFIG option with value as "no" it does
not set the CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG flag.

Closes https://github.com/curl/curl/pull/4086
2019-07-06 23:18:28 -04:00
Thomas Gamper
672ff597e5
winbuild: use WITH_PREFIX if given
Closes #4031
2019-06-17 13:39:51 +02:00
Steve Holme
2a32f5f457
winbuild: Use two space indentation
Closes #3930
2019-05-23 21:46:26 +01:00
Steve Holme
067c2c1c04 gen_resp_file.bat: Removed unnecessary @ from all but the first command
There is need to use @ on every command once echo has been turned off.

Closes #3854
2019-05-09 03:59:00 +01:00
Steve Holme
c23b8e827c winbuild: Add our standard copyright header to the winbuild batch files 2019-05-05 20:17:58 +01:00
Steve Holme
80637fc473 makedebug: Fix ERRORLEVEL detection after running where.exe
Closes #3838
2019-05-05 19:55:55 +01:00
Jan-E
79c4864a56 winbuild: Support MultiSSL builds
- Remove the lines in winbuild/Makefile.vc that generate an error with
  multiple SSL backends.

- Add /DCURL_WITH_MULTI_SSL in winbuild/MakefileBuild.vc if multiple SSL
  backends are set.

Closes https://github.com/curl/curl/pull/3772
2019-04-13 02:49:14 -04:00
Marcel Raad
07367e717a
winbuild: conditionally use /DZLIB_WINAPI
zlibwapi.lib (dynamic library) and zlibstat.lib (static library) have
the ZLIB_WINAPI define set by default. Using them requires that define
too.

Ref: https://zlib.net/DLL_FAQ.txt

Fixes https://github.com/curl/curl/issues/3133
Closes https://github.com/curl/curl/pull/3460
2019-01-14 10:14:06 +01:00
Rich Turner
becfe1233f
curl: enabled Windows VT Support and UTF-8 output
Enabled Console VT support (if running OS supports VT) in tool_main.c.

Fixes #3008
Closes #3011
2018-09-29 12:39:41 +02:00
Viktor Szakats
b801b453af whitespace fixes
- replace tabs with spaces where possible
- remove line ending spaces
- remove double/triple newlines at EOF
- fix a non-UTF-8 character
- cleanup a few indentations/line continuations
  in manual examples

Closes https://github.com/curl/curl/pull/3037
2018-09-23 22:24:02 +00:00
Viktor Szakats
f078361c0e URL and mailmap updates, remove an obsolete directory [ci skip]
Closes https://github.com/curl/curl/pull/3031
2018-09-22 07:58:32 +00:00
Philipp Waehnert
6684653b68
configure: add option to disable automatic OpenSSL config loading
Sometimes it may be considered a security risk to load an external
OpenSSL configuration automatically inside curl_global_init(). The
configuration option --disable-ssl-auto-load-config disables this
automatism. The Windows build scripts winbuild/Makefile.vs provide a
corresponding option ENABLE_SSL_AUTO_LOAD_CONFIG accepting a boolean
value.

Setting neither of these options corresponds to the previous behavior
loading the external OpenSSL configuration automatically.

Fixes #2724
Closes #2791
2018-09-07 09:38:33 +02:00
Viktor Szakats
ebd213270a curl.rc: embed manifest for correct Windows version detection
* enable it in `src/Makefile.m32`
* enable it in `winbuild/MakefileBuild.vc` if a custom manifest is
  _not_ enabled via the existing `EMBED_MANIFEST` option
* enable it for all Windows CMake builds (also disable the built-in
  minimal manifest, added by CMake by default.)

For other build systems, add the `-DCURL_EMBED_MANIFEST` option to
the list of RC (Resource Compiler) flags to enable the manifest
included in `src/curl.rc`. This may require to disable whatever
automatic or other means in which way another manifest is added to
`curl.exe`.

Notice that Borland C doesn't support this method due to a
long-pending resource compiler bug. Watcom C may also not handle
it correctly when the `-zm` `wrc` option is used (this option may
be unnecessary though) and regardless of options in certain earlier
revisions of the 2.0 beta version.

Closes https://github.com/curl/curl/pull/1221
Fixes https://github.com/curl/curl/issues/2591
2018-05-30 12:08:26 +00:00
richardthe3rd
75c51e05ac
winbuild: In MakefileBuild.vc fix typo DISTDIR->DIRDIST
Change requirement from $(DISTDIR) to $(DIRDIST)

closes #2603
2018-05-27 23:26:16 +02:00
richardthe3rd
8ff7555891
winbuild: only delete OUTFILE if it exists
This removes the slightly annoying "Could not file LIBCURL_OBJS.inc" and
"Could not find CURL_OBJS.inc.inc" message when building into a clean
folder.

closes #2602
2018-05-27 23:24:53 +02:00
Dan McNulty
8996300211 schannel: add support for CURLOPT_CAINFO
- Move verify_certificate functionality in schannel.c into a new
  file called schannel_verify.c. Additionally, some structure defintions
  from schannel.c have been moved to schannel.h to allow them to be
  used in schannel_verify.c.

- Make verify_certificate functionality for Schannel available on
  all versions of Windows instead of just Windows CE. verify_certificate
  will be invoked on Windows CE or when the user specifies
  CURLOPT_CAINFO and CURLOPT_SSL_VERIFYPEER.

- In verify_certificate, create a custom certificate chain engine that
  exclusively trusts the certificate store backed by the CURLOPT_CAINFO
  file.

- doc updates of --cacert/CAINFO support for schannel

- Use CERT_NAME_SEARCH_ALL_NAMES_FLAG when invoking CertGetNameString
  when available. This implements a TODO in schannel.c to improve
  handling of multiple SANs in a certificate. In particular, all SANs
  will now be searched instead of just the first name.

- Update tool_operate.c to not search for the curl-ca-bundle.crt file
  when using Schannel to maintain backward compatibility. Previously,
  any curl-ca-bundle.crt file found in that search would have been
  ignored by Schannel. But, with CAINFO support, the file found by
  that search would have been used as the certificate store and
  could cause issues for any users that have curl-ca-bundle.crt in
  the search path.

- Update url.c to not set the build time CURL_CA_BUNDLE if the selected
  SSL backend is Schannel. We allow setting CA location for schannel
  only when explicitly specified by the user via CURLOPT_CAINFO /
  --cacert.

- Add new test cases 3000 and 3001. These test cases check that the first
  and last SAN, respectively, matches the connection hostname. New test
  certificates have been added for these cases. For 3000, the certificate
  prefix is Server-localhost-firstSAN and for 3001, the certificate
  prefix is Server-localhost-secondSAN.

- Remove TODO 15.2 (Add support for custom server certificate
  validation), this commit addresses it.

Closes https://github.com/curl/curl/pull/1325
2018-04-18 03:59:47 -04:00
kdekker
7921659450 winbuild: Support custom devel paths for each dependency
- Support custom devel paths for c-ares, mbedTLS, nghttp2, libSSH2,
  OpenSSL and zlib. Respectively: CARES_PATH, MBEDTLS_PATH,
  NGHTTP2_PATH, SSH2_PATH, SSL_PATH and ZLIB_PATH.

- Use lib.exe for making the static library instead of link.exe /lib.
  The latter is undocumented and could cause problems as noted in the
  comments.

- Remove a dangling URL that no longer worked. (I was not able to find
  the IDN download at MSDN/microsoft.com, so it seems to be removed.)

- Remove custom override for release-ssh2-ssl-dll-zlib configuration.
  Nobody knows why it was there and as far as we can see is unnecessary.

Closes https://github.com/curl/curl/pull/2474
2018-04-17 03:13:50 -04:00
kdekker
75f517f968
winbuild: fix URL
Follow up on https://github.com/curl/curl/pull/2472.
Now using en-us instead of nl-nl as language code in the URL.

Closes https://github.com/curl/curl/pull/2475
2018-04-09 15:19:00 +02:00
kdekker
73070e8242
winbuild: updated the documentation
The setenv command no longer exists and visual studio build prompts got
changed. Used Visual Studio 2015/2017 as reference.

Closes #2472
2018-04-09 10:42:14 +02:00
kdekker
8585026524
winbuild: make the clean target work without build-type
Due to the check in Makefile.vc and MakefileBuild.vc, no make call can
be invoked unless a build-type was specified. However, a clean target
only existed when a build type was specified. As a result, the clean
target was unreachable. Made clean target unconditional.

Closes #2455
2018-04-06 14:43:33 +02:00
richardthe3rd
cc1d4c505e
winbuild: prefer documented zlib library names
Check for existence of import and static libraries with documented names
and use them if they do. Fallback to previous names.

According to
https://github.com/madler/zlib/blob/master/win32/README-WIN32.txt on
Windows, the names of the import library is "zdll.lib" and static
library is "zlib.lib".

closes #2354
2018-03-04 23:02:51 +01:00
Rod Widdowson
5fb70ea170 winbuild: Use macros for the names of some build utilities
- Add macros to the top of the makefile for rc and mt utilities so that
  it is easier to change their locations.

Bug: https://curl.haxx.se/mail/lib-2018-02/0075.html
Reported-by: Stefan Kanthak

Closes https://github.com/curl/curl/issues/2329
2018-02-23 15:20:58 -05:00
Rod Widdowson
4fff37b91f winbuild: Use CALL to run batch scripts
Co-authored-by: Stefan Kanthak

Closes https://github.com/curl/curl/issues/2330
Closes https://github.com/curl/curl/pull/2331
2018-02-22 14:56:00 -05:00
Jay Satiro
2b50e56343 build: fix windows build methods for curl_ctype.c
- Fix winbuild and the VS project generator to treat curl_ctype.{c,h} as
  curlx files since they are required by both src and lib.

Follow-up to 4272a0b which added curl_ctype.
2018-01-30 19:14:00 -05:00
Adam Marcionek
a406e86ecb
winbuild: make linker generate proper PDB
Link.exe requires /DEBUG to properly generate a full pdb file on release
builds.

Closes #2274
2018-01-30 08:12:18 +01:00
Steve Holme
a9b774a773 Makefile.vc: Added our standard copyright header 2017-12-22 18:49:37 +00:00
Steve Holme
22fddb85ac winbuild: Added support for VC15 2017-12-22 18:44:35 +00:00
Daniel Stenberg
f64c05278e
winbuild/BUILD.WINDOWS.txt: mention WITH_NGHTTP2 2017-10-12 13:54:00 +02:00
theantigod
09fc61e436 winbuild: fix embedded manifest option
Embedded manifest option didn't work due to incorrect path.

Fixes https://github.com/curl/curl/issues/1832
2017-08-26 02:33:01 -04:00
Daniel Stenberg
6f6cfc90be
BUILD.WINDOWS: mention buildconf.bat for builds off git 2017-08-03 13:50:44 +02:00
Marcel Raad
a4bef6a91b
winbuild: re-enable warning C4127 for curl tool
Disabled in cda19a345f. It only needs to
be disabled for libcurl.
2017-07-14 08:52:14 +02:00
Marcel Raad
cda19a345f
winbuild: build with warning level 4
This is consistent with 7bc64561a2, which
changed the warning level from 3 to 4 for the Visual Studio project
files. But disable the level 4 warning C4127 "conditional expression is
constant", as that one is issued by older versions of the Windows SDK
as well as curl itself under some circumstances.

Closes https://github.com/curl/curl/pull/1667
2017-07-13 22:30:33 +02:00
Marcel Raad
beb08481d0
curl_setup: always define WIN32_LEAN_AND_MEAN on Windows
Make sure to always define WIN32_LEAN_AND_MEAN before including any
Windows headers to avoid pulling in unnecessary headers. This avoids
unnecessary macro clashes and compiler warnings.

Ref: https://github.com/curl/curl/issues/1562
Closes https://github.com/curl/curl/pull/1672
2017-07-11 11:57:00 +02:00
Henrik S. Gaßmann
cd34ffa614 winbuild: fix boringssl build
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
2017-06-24 22:13:21 +02:00
Daniel Stenberg
73a2fcea0b includes: remove curl/curlbuild.h and curl/curlrules.h
Rely entirely on curl/system.h now.

Introduced in Aug 2008 with commit 14240e9e10. Now gone.

Fixes #1456
2017-06-14 11:07:33 +02:00
Anatol Belski
df45f2c33e winbuild: fix the nghttp2 build
Closes #1321
2017-05-24 08:27:12 +02:00
Anatol Belski
db87bcfcf2 winbuild: add basic support for OpenSSL 1.1.x
- Auto-detect OpenSSL 1.1 libs

Closes https://github.com/curl/curl/pull/1322
2017-03-13 16:05:33 -04:00
Simon Warta
3cc30e8207 winbuild: add note on auto-detection of MACHINE in Makefile.vc
Closes #1265
2017-02-16 17:56:33 +01:00
Daniel Stenberg
8611d985ee VC: remove the makefile.vc6 build infra
The winbuild/ build files is now the single MSVC makefile build choice.

Closes #1215
2017-01-23 14:27:32 +01:00
Jan-E
65894c9846 winbuild: add config option ENABLE_NGHTTP2
Closes #1141
2016-11-25 09:00:54 +01:00