Commit Graph

145 Commits

Author SHA1 Message Date
Li Xinwei 30e491e5c9
cmake: fix support for UnixSockets feature on Win32
Move the definition of sockaddr_un struct from config-win32.h to
curl_setup.h, so that it could be shared by all build systems.

Add ADDRESS_FAMILY typedef for old mingw, now old mingw can also use
unix sockets.

Also fix the build of tests/server/sws.c on Win32 when USE_UNIX_SOCKETS
is defined.

Closes #7034
2021-06-21 14:52:27 +02:00
Gergely Nagy 6f5ff0ee04
configure/cmake: remove checks for unused gethostbyaddr and gethostbyaddr_r
Closes #7276
2021-06-18 13:52:21 +02:00
Gergely Nagy e92603289a
configure/cmake: remove unused define HAVE_PERROR
Closes #7276
2021-06-18 13:52:16 +02:00
Gergely Nagy a407a82d0b
configure/cmake: remove checks for unused sgtty.h
Closes #7276
2021-06-18 13:52:02 +02:00
Gergely Nagy baae00f66b
configure/cmake: remove remaining checks for err.h
Closes #7276
2021-06-18 13:51:57 +02:00
Gergely Nagy 376d2380d2
configure/cmake: remove remaining checks for crypto.h
Closes #7276
2021-06-18 13:51:54 +02:00
Marc Aldorasi f6b325a509
config: remove now-unused macros
Closes #7094
2021-05-19 00:36:01 +02:00
Michael Forney 812fce9dcf
configure: remove use of RETSIGTYPE
This was previously defined by the obsolete AC_TYPE_SIGNAL macro,
which was removed in 2682e5f5. The deprecation text says

> Your code may safely assume C89 semantics that RETSIGTYPE is void.

So, remove it and just use void instead.

Closes #6861
2021-04-07 16:01:05 +02:00
Viktor Szakats fb98a436a7
mingw: enable using strcasecmp()
This makes the 'Features:' list sorted case-insensitively,
bringing output in-line with *nix builds.

Reviewed-by: Jay Satiro
Closes #6644
2021-02-23 12:06:55 +00:00
Viktor Szakats 95014b0a4d
build: delete unused feature guards
- `HAVE_STRNCASECMP`
- `HAVE_TCGETATTR`
- `HAVE_TCSETATTR`

Reviewed-by: Jay Satiro
Reviewed-by: Daniel Stenberg
Closes #6645
2021-02-23 12:04:29 +00:00
Viktor Szakats 6b0f217c65
time: enable 64-bit time_t in supported mingw environments
(Unless 32-bit `time_t` is selected manually via the `_USE_32BIT_TIME_T`
mingw macro.)

Previously, 64-bit `time_t` was enabled on VS2005 and newer only, and
32-bit `time_t` was used on all other Windows builds.

Assisted-by: Jay Satiro
Closes #6636
2021-02-21 02:00:36 +00:00
Daniel Stenberg 4d2f800677
curl.se: new home
Closes #6172
2020-11-04 23:59:47 +01:00
Viktor Szakats 8297978c21
windows: disable Unix Sockets for old mingw
Classic mingw and 10y+ old versions of mingw-w64 don't ship with
Windows headers having the typedef necessary for Unix Sockets
support, so try detecting these environments to disable this
feature.

Ref: cf6afc5717/

Reviewed-by: Daniel Stenberg

Fixes #5674
Closes #5758
2020-08-03 14:31:49 +00:00
Daniel Stenberg 8df455479f
source cleanup: remove all custom typedef structs
- Stick to a single unified way to use structs
 - Make checksrc complain on 'typedef struct {'
 - Allow them in tests, public headers and examples

 - Let MD4_CTX, MD5_CTX, and SHA256_CTX typedefs remain as they actually
   typedef different types/structs depending on build conditions.

Closes #5338
2020-05-15 08:54:42 +02:00
Viktor Szakats 23a870f2fd
windows: enable UnixSockets with all build toolchains
Extend existing unix socket support in Windows builds to be
enabled for all toolchain vendors or versions. (Previously
it was only supported with certain MSVC versions + more recent
Windows 10 SDKs)

Ref: https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/
Ref: https://github.com/curl/curl/issues/5162
Closes: https://github.com/curl/curl/pull/5170
2020-04-04 17:53:15 +00:00
Marc Hoersken 2f4c36357b
config-win32: Windows does not have ftruncate 2020-03-07 10:58:42 +01:00
Steve Holme 150f45e8d1
win32: USE_WIN32_CRYPTO to enable Win32 based MD4, MD5 and SHA256 functions
Whilst lib\md4.c used this pre-processor, lib\md5.c and
src\tool_metalink.c did not and simply relied on the WIN32
pre-processor directive.

Reviewed-by: Marcel Raad
Closes #4955
2020-02-20 15:27:32 +00:00
Melissa Mears c6b70de246
config-win32: cpu-machine-OS for Windows on ARM
Define the OS macro properly for Windows on ARM builds.  Also, we might
as well add the GCC-style IA-64 macro.

Closes #4590
2019-11-14 23:27:06 +01:00
Steve Holme 09eef8af18
url: Load if_nametoindex() dynamically from iphlpapi.dll on Windows
This fixes the static dependency on iphlpapi.lib and allows curl to
build for targets prior to Windows Vista.

This partially reverts 170bd047.

Fixes #3960
Closes #3958
2019-05-29 07:19:20 +01:00
Steve Holme 28526e9c80
curl-win32.h: Enable Unix Domain Sockets based on the Windows SDK version
Microsoft added support for Unix Domain Sockets in Windows 10 1803
(RS4). Rather than expect the user to enable Unix Domain Sockets by
uncommenting the #define that was added in 0fd6221f we use the RS4
pre-processor variable that is present in newer versions of the
Windows SDK.

Closes #3939
2019-05-28 07:36:06 +01:00
Zenju 170bd047f5
config-win32: add support for if_nametoindex and getsockname
Closes https://github.com/curl/curl/pull/3923
2019-05-23 11:10:28 +02:00
Daniel Stenberg e91e481612
libcurl: #ifdef away more code for disabled features/protocols 2019-05-17 23:24:34 +02:00
Marcel Raad abebb2b893
config_win32: enable LDAPS
As done in the autotools and CMake builds by default.

Closes https://github.com/curl/curl/pull/3137
2018-10-19 09:23:14 +02:00
Steve Holme 0fd6221f8c curl_addrinfo.c: Allow Unix Domain Sockets to compile under Windows
Windows 10.0.17061 SDK introduces support for Unix Domain Sockets.
Added the necessary include file to curl_addrinfo.c.

Note: The SDK (which is considered beta) has to be installed, VS 2017
project file has to be re-targeted for Windows 10.0.17061 and #define
enabled in config-win32.h.
2018-02-07 21:33:57 +00:00
Jay Satiro 908a9a6742 build: remove HAVE_LIMITS_H check
.. because limits.h presence isn't optional, it's required by C89.

Ref: http://port70.net/~nsz/c/c89/c89-draft.html#2.2.4.2

Closes https://github.com/curl/curl/pull/2215
2018-01-05 23:34:30 -05:00
Viktor Szakats 24bba40456 lib/config-win32.h: let SMB/SMBS be enabled with OpenSSL/NSS
The source code is now prepared to handle the case when both
Win32 Crypto and OpenSSL/NSS crypto backends are enabled
at the same time, making it now possible to enable `USE_WIN32_CRYPTO`
whenever the targeted Windows version supports it. Since this
matches the minimum Windows version supported by curl
(Windows 2000), enable it unconditionally for the Win32 platform.

This in turn enables SMB (and SMBS) protocol support whenever
Win32 Crypto is available, regardless of what other crypto backends
are enabled.

Ref: https://github.com/curl/curl/pull/1840#issuecomment-325682052

Closes https://github.com/curl/curl/pull/1943
2017-10-06 07:37:42 +00:00
Viktor Szakats ebf46317ee config-win32: define SIZEOF_LONG
Recent changes that replaced CURL_SIZEOF_LONG in the source with
SIZEOF_LONG broke builds that use the premade configuration files and
don't have SIZEOF_LONG defined.

Closes https://github.com/curl/curl/pull/1814
2017-08-22 02:24:09 -04:00
Daniel Stenberg ae41dd85ed
config-win32: define SIZEOF_CURL_OFF_T 2017-08-17 10:26:59 +02:00
klemens f7df67cff0 spelling fixes
Closes #1356
2017-03-26 23:56:23 +02:00
Steve Holme 4ff2fbd1d5 config-w32.h: Fixed compilation warning when /Wall enabled
warning C4668: 'USE_IPV6' is not defined as a preprocessor macro,
               replacing with '0' for '#if/#elif'
2016-03-19 11:05:06 +00:00
David Benjamin 39c803cba2 openssl: remove most BoringSSL #ifdefs.
As of https://boringssl-review.googlesource.com/#/c/6980/, almost all of
BoringSSL #ifdefs in cURL should be unnecessary:

- BoringSSL provides no-op stubs for compatibility which replaces most
  #ifdefs.

- DES_set_odd_parity has been in BoringSSL for nearly a year now. Remove
  the compatibility codepath.

- With a small tweak to an extend_key_56_to_64 call, the NTLM code
  builds fine.

- Switch OCSP-related #ifdefs to the more generally useful
  OPENSSL_NO_OCSP.

The only #ifdefs which remain are Curl_ossl_version and the #undefs to
work around OpenSSL and wincrypt.h name conflicts. (BoringSSL leaves
that to the consumer. The in-header workaround makes things sensitive to
include order.)

This change errs on the side of removing conditionals despite many of
the restored codepaths being no-ops. (BoringSSL generally adds no-op
compatibility stubs when possible. OPENSSL_VERSION_NUMBER #ifdefs are
bad enough!)

Closes #640
2016-02-09 08:46:36 +01:00
Daniel Stenberg 4af40b3646 URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
Gisle Vanem 6c2a10e963 config-win32: Fix warning HAVE_WINSOCK2_H undefined 2015-12-07 19:07:51 -05:00
Thorsten Schöning 8fd190c04f win32: make recent Borland compilers use long long 2015-09-30 00:03:35 +02:00
Steve Holme 415f0370ea win32: Use DES_set_odd_parity() from OpenSSL/BoringSSL by default
Set HAVE_DES_SET_ODD_PARITY when using OpenSSL/BoringSSL as native
Windows builds don't use the autoconf tools.
2015-08-30 22:06:10 +01:00
Daniel Stenberg 709cf76f6b openssl: remove all uses of USE_SSLEAY
SSLeay was the name of the library that was subsequently turned into
OpenSSL many moons ago (1999). curl does not work with the old SSLeay
library since years. This is now reflected by only using USE_OPENSSL in
code that depends on OpenSSL.
2015-03-05 10:57:52 +01:00
Steve Holme 2cc571f9e3 ldap: Renamed the CURL_LDAP_WIN definition to USE_WIN32_LDAP
For consistency with other USE_WIN32_ defines as well as the
USE_OPENLDAP define.
2015-01-18 20:52:43 +00:00
Steve Holme 68cc1e0c77 config-win32.h: Fixed line length > 79 columns 2014-12-24 16:33:28 +00:00
Steve Holme bd2231104b config-win32.h: Don't enable Windows Crypt API if using OpenSSL
As the OpenSSL and NSS Crypto engines are prefered by the core NTLM
routines, to the Windows Crypt API, don't define USE_WIN32_CRYPT
automatically when either OpenSSL or NSS are in use - doing so would
disable NTLM2Session responses in NTLM type-3 messages.
2014-12-12 19:57:00 +00:00
Bill Nagel eb88d778e7 ntlm: Use Windows Crypt API
Allow the use of the Windows Crypt API for NTLMv1 functions.
2014-12-07 18:32:59 +00:00
Steve Holme 6cc79dc79d config-win32: Fixed build targets for the VS2012+ Windows XP toolset
Even though commit 23e70e1cc6 mentioned the v110_xp toolset, I had
forgotten to include the relevant pre-processor definitions.
2014-11-17 23:49:05 +00:00
Steve Holme 23e70e1cc6 config-win32: Introduce build targets for VS2012+
Visual Studio 2012 introduced support for Windows Store apps as well as
supporting Windows Phone 8. Introduced build targets that allow more
modern APIs to be used as certain legacy ones are not available on these
new platforms.
2014-11-16 17:24:48 +00:00
Steve Holme 65467cf9cb config-win32.h: Updated for VC12
Bug: http://curl.haxx.se/bug/view.cgi?id=1378
Reported and Patched-by: Marcel Raad
2014-06-05 22:44:46 +01:00
Steve Holme 6ebc0d3bd8 config-win32.h: Fixed HAVE_LONGLONG for Visual Studio .NET 2003 and up
Fixed the HAVE_LONGLONG declaration as long long is supported in Visual
Studio .NET 2003 (VC7.1) onwards.
2014-05-04 19:05:06 +01:00
Daniel Stenberg d5f687ed8f win32: fix Visual Studio 2010 build with WINVER >= 0x600
If no WINVER and/or _WIN32_IWNNT define was set, the Windows platform
SDK often defaults to high value, e.g. 0x601 (whoch may probably depend
on the Windows version being used, in my case Windows 7).

If WINVER >= 0x600 then winsock2.h includes some defines for WSAPoll(),
e.g. POLLIN, POLLPRI, POLLOUT etc. These defines clash with cURL's
lib/select.h.

Make sure HAVE_STRUCT_POLLFD is defined then.

Bug: http://curl.haxx.se/bug/view.cgi?id=1282
Reported-by: "kdekker"
Patch-by: Marcel Raad
2013-09-28 23:18:19 +02:00
Guenter Knauf 96ffe645fd Enabled MinGW sync resolver builds. 2013-04-11 14:05:08 +02:00
Guenter Knauf 658ec97055 Fixed ares-enabled builds with static makefiles. 2013-04-09 17:44:51 +02:00
Guenter Knauf dee7a08f64 Changed Windows 64bit OS define to x86_64.
Also added check for __x86_64__ define since MinGW64 seems to define
the _M_X64 macro through a header not available for config-win32.h.
2011-09-20 12:32:04 +02:00
Yang Tse 91ad42412f config-win32.h: comments adjustments 2011-08-06 19:18:43 +02:00
Yang Tse f6272dd9b8 BSD-style lwIP TCP/IP stack support - followup 2011-08-05 15:53:00 +02:00