Commit Graph

22118 Commits

Author SHA1 Message Date
Ryan Winograd 793e831bbf make: fix docs build on OpenBSD
Ref: #1591
2017-07-10 13:54:02 +02:00
Marcel Raad b54e0babd7
ldap: fix MinGW compiler warning
ldap_bind_s is marked as deprecated in w32api's winldap.h shipping with
the latest original MinGW, resulting in compiler warnings since commit
f0fe66f13c. Fix this for the non-SSPI
case by using ldap_simple_bind_s again instead of ldap_bind_s with
LDAP_AUTH_SIMPLE.

Closes https://github.com/curl/curl/pull/1664
2017-07-10 10:22:34 +02:00
Marcel Raad deadb2348f
curl-compilers.m4: disable warning spam with Cygwin's clang
When building with Cygwin or MinGW, libtool uses a wrapper executable
instead of a wrapper script [1], which is written in C and throws
missing-variable-declarations warnings. Don't enable these warnings on
Cygwin and MinGW in order to avoid warnings for every executable built,
which spams the test suite output when using Cygwin's clang.

[1] https://www.gnu.org/software/libtool/manual/html_node/Wrapper-executables.html

Closes https://github.com/curl/curl/pull/1665
2017-07-10 10:16:29 +02:00
Jay Satiro af0216251b curl_setup_once: Remove ERRNO/SET_ERRNO macros
Prior to this change (SET_)ERRNO mapped to GetLastError/SetLastError
for Win32 and regular errno otherwise.

I reviewed the code and found no justifiable reason for conflating errno
on WIN32 with GetLastError/SetLastError. All Win32 CRTs support errno,
and any Win32 multithreaded CRT supports thread-local errno.

Fixes https://github.com/curl/curl/issues/895
Closes https://github.com/curl/curl/pull/1589
2017-07-10 02:09:27 -04:00
Jay Satiro 17da675002 tool_getparam: fix potentially uninitialized err 2017-07-09 12:04:42 -04:00
Marcel Raad 59a0fb2439
smb: rename variable to fix shadowing warning
GCC 4.6.3 on travis complains:
smb.c: In function ‘get_posix_time’:
smb.c:725:13: error: declaration of ‘time’ shadows a global declaration
[-Werror=shadow]

Fix this by renaming the variable.
2017-07-09 14:42:13 +02:00
Marcel Raad f601f42787
tool_cb_wrt: fix variable shadowing warning
GCC 4.4 complains:
tool_cb_wrt.c:81: error: declaration of ‘isatty’ shadows a global
declaration
/usr/include/unistd.h:782: error: shadowed declaration is here

Fix this by renaming the variable.

Closes https://github.com/curl/curl/pull/1661
2017-07-09 14:38:10 +02:00
Daniel Stenberg a548183546 RELEASE-NOTES: synced with be2c999b8 2017-07-08 00:15:17 +02:00
Daniel Stenberg ca3545d17f travis: install stunnel 2017-07-07 17:25:43 +02:00
Daniel Stenberg be2c999b80 valgrind.supp: supress OpenSSL false positive seen on travis 2017-07-07 16:58:08 +02:00
Daniel Stenberg 8b78f7c23d travis: detect and use valgrind for normal builds
Closes #1653
2017-07-07 16:58:08 +02:00
Daniel Stenberg 7bcaa1aa27 travis: add SMB, DICT, TELNET torture to coverage test 2017-07-07 14:42:45 +02:00
Paul Harris 45f39945ec cmake: offer CMAKE_DEBUG_POSTFIX when building with MSVC
Removes BUILD_RELEASE_DEBUG_DIRS since it wasn't used anywhere.

Closes #1649
2017-07-07 14:29:26 +02:00
Daniel Stenberg bbc9c6d144 CURLOPT_POSTFIELDS.3: explain the 100-continue magic better 2017-07-07 12:43:17 +02:00
Max Dymond 06a6feba9d test1452: add telnet negotiation
Add a basic telnet server for negotiating some telnet options before
echoing back any data that's sent to it.

Closes #1645
2017-07-07 11:00:26 +02:00
Daniel Stenberg efedafe48a travis: do more tests in the coverage run
I added a selection of torture and event tests that run "fast enough"
2017-07-07 10:58:33 +02:00
Daniel Stenberg a126ca8481 curl_easy_escape.3: mention the (lack of) encoding
Fixes #1612
Reported-by: Jeroen Ooms
2017-07-07 10:47:46 +02:00
Gisle Vanem 0cec0f4615 memdebug: don't setbuf() if the file open failed
Bug: https://github.com/curl/curl/issues/828#issuecomment-313475151
2017-07-06 23:15:00 +02:00
Daniel Stenberg 2d86e8d128 appveyor: enable CURL_WERROR on all builds 2017-07-06 17:06:24 +02:00
Daniel Stenberg ce81aeb877 cmake: add CURL_WERROR for enabling "warning as errors" 2017-07-06 17:06:24 +02:00
Hannes Magnusson 75c3596f75 cmake: remove spurious "-l" from linker flags
Fixes #1552
2017-07-06 12:21:20 +02:00
Daniel Stenberg 23b828b78b test506: skip if threaded-resolver 2017-07-06 11:49:50 +02:00
Daniel Stenberg 759efe7b51 runtests: support "threaded-resolver" as a feature
... to let tests require it or skip if present
2017-07-06 11:49:50 +02:00
Daniel Stenberg 6b0aa00abb asyn-thread.c: fix unused variable warnings on macOS 2017-07-06 11:49:50 +02:00
Daniel Stenberg b22f93dbb8 http: s/TINY_INITIAL_POST_SIZE/EXPECT_100_THRESHOLD
Make the name reflect its use better, and add a short comment describing
what it's for.
2017-07-06 11:20:57 +02:00
Daniel Stenberg 9ee6cb1b77 cmake: if inet_pton is used, bump _WIN32_WINNT
... and make sure inet_pton is always checked for when *not* using Windows,
which is a regression from 4fc6ebe18.

Idea-by: Sergei Nikulov
2017-07-05 13:28:28 +02:00
Daniel Stenberg 7e21e5fd0c select.h: avoid macro redefinition harder
... by checking the POLLIN define, as the header file checks don't work
on Windows.
2017-07-05 13:28:28 +02:00
Daniel Stenberg 21e0705734 inet_pton: fix include on windows to get prototype
inet_pton() exists on Windows and gets used by our cmake builds. Make
sure the correct header file is included to avoid compiler warnings.

Closes #1639
2017-07-05 13:28:19 +02:00
Daniel Stenberg da08c867e4 TODO: 1.10 auto-detect proxy
Closes #1572
2017-07-05 10:07:56 +02:00
Daniel Stenberg add0f7119f TODO: HTTP proxy CONNECT is non-blocking now 2017-07-05 10:00:26 +02:00
Daniel Stenberg 40ed7685bf cmake: fix send/recv argument scanner for windows
... by simply trying the Windows argument types first.

Fixes #1640
2017-07-05 09:49:30 +02:00
Daniel Stenberg fa289ea08e RELEASE-NOTES: synced with 596cfb6c0 2017-07-05 01:11:41 +02:00
Gisle Vanem 596cfb6c0a smb: add support for CURLOPT_FILETIME
Bug: https://curl.haxx.se/mail/lib-2017-07/0005.html

Closes #1643
2017-07-04 23:12:57 +02:00
Daniel Stenberg 84a317cf17 travis: install nghttp2 on linux builds
Closes #1642
2017-07-04 23:04:06 +02:00
Gisle Vanem f8dba473a8 smb: fix build for djgpp/MSDOS
bug: https://curl.haxx.se/mail/lib-2017-07/0005.html
2017-07-04 15:42:55 +02:00
Daniel Stenberg c534384810 configure: try ldap/lber in reversed order first
When scanning for which LDAP libraries to use, try the -lldap -llber
combination before the reversed order since it has a greater chance of
working when linking with libcurl statically.

Fixes #1619
Closes #1634
Reported-by: David E. Narváez
2017-07-04 11:33:55 +02:00
Daniel Stenberg 909a5bee81 configure: remove checks for 5 functions never used
fork, getprotobyname, inet_addr, perror, uname

closes #1638
2017-07-04 11:32:25 +02:00
Daniel Stenberg 7121a994dd dist: add SMB python deps into the tarball 2017-07-04 10:46:41 +02:00
Max Dymond a6f8d27efc test1451: add SMB support to the testbed
Add test 1451 which does some very basic SMB testing using the impacket
SMB server.

Closes #1630
2017-07-04 10:41:58 +02:00
Max Dymond f1609155d5 test: add impacket for SMB testing
Import impacket 0.9.15 for use in SMB testing. This was generated by
doing "pip2.7 install -t . impacket"

Unnecessary files for current testing were deleted.
2017-07-04 10:36:06 +02:00
Daniel Stenberg fc2e81c38b travis.yml: use --enable-werror on debug builds
... to better detect and fault on compiler warnings/errors

Closes #1637
2017-07-04 10:27:36 +02:00
Daniel Stenberg c1d1a3448f tool_sleep: typecast to avoid macos compiler warning
tool_sleep.c:54:24: error: implicit conversion loses integer precision:
'long' to '__darwin_suseconds_t' (aka 'int')
[-Werror,-Wshorten-64-to-32]
2017-07-04 10:27:36 +02:00
Martin Kepplinger f50124f566 timeval.c: Use long long constant type for timeval assignment
On a 64 bit host, sparse says:

timeval.c:148:15: warning: constant 0x7fffffffffffffff is so big it is long
timeval.c:149:12: warning: constant 0x7fffffffffffffff is so big it is long

so let's use long long constant types in order to prevent undesired overflow
failures.

Bug: https://curl.haxx.se/mail/lib-2017-07/0003.html

Closes #1636

Signed-off-by: Martin Kepplinger <martink@posteo.de>
2017-07-04 07:59:21 +02:00
Daniel Stenberg b3786f61dc url: make the original string get used on subsequent transfers
... since CURLOPT_URL should follow the same rules as other options:
they remain set until changed or cleared.

Added test 1551 to verify.

Fixes #1631
Closes #1632
Reported-by: Pavel Rochnyak
2017-07-03 23:52:10 +02:00
Johannes Schindelin c0cdc68c7e gtls: fix build when sizeof(long) < sizeof(void *)
- Change gnutls pointer/int macros to pointer/curl_socket_t.
  Prior to this change they used long type as well.

The size of the `long` data type can be shorter than that of pointer
types. This is the case most notably on Windows.

If C99 were acceptable, we could simply use `intptr_t` here. But we
want to retain C89 compatibility.

Simply use the trick of performing pointer arithmetic with the NULL
pointer: to convert an integer `i` to a pointer, simply take the
address of the `i`th element of a hypothetical character array
starting at address NULL. To convert back, simply cast the pointer
difference.

Thanks to Jay Satiro for the initial modification to use curl_socket_t
instead of int/long.

Closes #1617

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2017-07-03 15:45:25 +02:00
Ryan Winograd 3a48a13268 unit1399: fix integer overflow
Bug: #1616
Closes #1633
2017-07-03 08:09:02 +02:00
Per Malmberg 4fc6ebe18a cmake: Added compatibility options for older Windows versions
CURL_STATIC_CRT and ENABLE_INET_PTON

Closes #1621
2017-07-02 01:02:22 +02:00
Daniel Stenberg 8d2b1de284 unit1399: add logging to time comparison
... to enable tracking down why autobuilds fail on this

Bug: #1616
2017-07-01 16:41:29 +02:00
Daniel Stenberg d24838d4da make: build the docs subdir only from within src
... and don't build at all in include

Prompted-by-work-by: Simon Warta
Ref: #1590
Closes #1591
2017-06-30 17:09:01 +02:00
Max Dymond 0362c77841 test1450: fix up DICT server in torture mode
As per https://github.com/curl/curl/pull/1615, the DICT server is a
little spammy in torture mode due to the sockets being torn down
unexpectedly. Fix this by adding some error handling to the handling
function.

Closes #1629
2017-06-30 14:58:06 +02:00