lib558.c problem

2009-04-08 Thread Gisle Vanem
This test program makes calls to `Curl_mk_dnscache' and `Curl_hash_destroy'. Since there internals are not exported from libcurl.dll, what should be done about it? Force everybody on Windows to link statically? No option for me. --gv

Re: libcurl stuck with half-open connection

2009-04-17 Thread Gisle Vanem
Joe Eggleston wrote: I have a C program using the multi-interface to libcurl with libevent. I found it stuck with a half-open connection. By half-open I mean the connection was established, then the server box died, so there was no FIN, etc. Then the connection is probably

SCTP anyone?

2009-06-01 Thread Gisle Vanem
I there any plans or ideas to incorporate support for SCTP into libcurl? AFAICS there are several SCTP implementations for Linux and also for Win32 [1]. I took a look at this API [2] and noticed first it didn't resemble Berkley sockets at all. That makes it a bit hard to code into libcurl I

Re: SCTP anyone?

2009-06-02 Thread Gisle Vanem
Daniel Stenberg wrote: But that's a user-land implementation. Surely the in-kernel version has to be more similar to TCP than so? I checked out the examples in this article: Cool, that one looked simple enough. But it's

Re: libcurl-7.19.3-win32-ssl-msvc - release lib file is larger thandebug?

2010-11-23 Thread Gisle Vanem
Jerry W. Rice wrote: I've downloaded the 'libcurl-7.19.3-win32-ssl-msvc' zip file, and installed it on my Windows development system. I intend to link the 'libCurl' static release library file (lib/Release/curllib_static.lib) with my Windows application. I've noticed

Re: Linking curllib to other library

2011-03-15 Thread Gisle Vanem
Krzysztof Fediuk wrote: mlib project is supposed to be a common part of all apps and because of that i've set this project as a static library. I've added all necessary paths and libcurl_static.lib file to be linked. This project compiles fine. A -DCURL_STATICLIB in

Potentially wiped disk with Makefile.b32

2011-03-22 Thread Gisle Vanem
I have a big problem with the use of rmdir /s in the Makefile.b32 files. The 'make clean' could really create mayhem for a inexperienced user or from a small error/typo in these makefiles. Here is a warning in this regard (from the 4nt shell docs): /S (Subdirectories) (4NT, TC) This option is

Re: Potentially wiped disk with Makefile.b32

2011-03-22 Thread Gisle Vanem
Gisle Vanem wrote: Also there is a problem if you have e.g. 'rmdir.exe' on path (like i have with CygWin's /usr/bin/rmdir.exe). AFAICS Borland's make doesn't have 'del', 'rmdir' etc. internally (like wmake have). So if you have 'rmdir.exe on path, 'make clean' doesn't work

[Patch] transfer.c

2011-03-29 Thread Gisle Vanem
A small typo in transfer.c: --- Git-latest/lib/transfer.cTue Mar 29 11:04:17 2011 +++ lib/transfer.c Tue Mar 29 12:06:04 2011 @@ -125,7 +125,7 @@ #ifdef CURL_DOES_CONVERSIONS bool sending_http_headers = FALSE; - if((conn-protocol(CURLPROTO_HTTP|CURLPROTO_RTSP)) +

[Patch] lib/Makefile.b32

2011-04-07 Thread Gisle Vanem
As I promised some weeks ago, I would be patching the files makefile.b32 for users of Borland/CBuilder. Ref. This patch does several things: * Rename the object object directory from 'objs' to 'BCC_obj'. I feel it should be named properly. Ref.

[Patch] src/Makefile.b32

2011-04-07 Thread Gisle Vanem
I'm not sure this patch should go the curl-users or curl-lib ML, but I choose the latter. This patch does several things: * Rename the object object directory from 'objs' to 'BCC_obj' to be in sync with my previous patch for lib/Makefile.b32. * Turn off these warnings to keep the build totally

Address change

2011-04-13 Thread Gisle Vanem
Please change my email address in some files: diff -u3 -Hb Git-latest/lib/ ./lib/ --- Git-latest/lib/ Wed Dec 08 17:27:28 2010 +++ ./lib/ Wed Apr 13 23:06:53 2011 @@ -1,6 +1,6 @@ # # Adapted for djgpp2 / Watt-32 / DOS by -# Gisle Vanem


2011-04-20 Thread Gisle Vanem
Daniel Stenberg wrote: So, is there anyone around who needs the conversion and can do some test builds and make sure things still work as they should? I can't say I need it, but I compile regularly with CURL_DOES_CONVERSIONS. So here are my patches that makes this possible.

Re: Curl lib with IPV6 support for Windows

2011-07-11 Thread Gisle Vanem
Sumit Popli wrote: I have tried all the versions of Curl libraries listed on the web site for windows. None of them have support for IP V6 . Any help will be greatly appreciated. No, you have to build the lib youself after adding this to your CFLAGS: -DENABLE_IPV6

Re: Added BSD-style lwIP TCP/IP stack support

2011-08-05 Thread Gisle Vanem
Yang Tse wrote: I've made this happen, and have been able to compile curl and libcurl with lwIP 1.4.0 sockets on Win32. Great. Does it actually work too? I've been looking at lwIP and built it so far as to the netif stuff. Do you have a working netif driver for Win32? If

Re: Added BSD-style lwIP TCP/IP stack support

2011-08-06 Thread Gisle Vanem
Yang Tse wrote: I have no clue. Around here I only have VC6 and msvc makefile/projects provided with lwIP 1.4.0 only support newer msvc compilers. :-( I found the LwIP netif files in an extra distro; installed under 'src/contrib/ports/win32'. I managed to build it and link

Re: Problem using static libraries libcurl with OpenSSL, minGW, Eclipse

2011-08-12 Thread Gisle Vanem
Oleksiy wrote: It is compiled with this: g++ -DCURL_STATICLIB -O0 -g3 -Wall -c -fmessage-length=0 -osrc\main.o ..\src\main.cpp g++ -L..\lib -oYTUploader.exe src\main.o -lcurl -lcurldll -lws2_32 -lwldap32 -leay32 -lssleay32 -lz Here you link with both libcurl.a

Re: Re: Problem using static libraries libcurl with OpenSSL, minGW,Eclipse

2011-08-12 Thread Gisle Vanem
Oleksiy wrote: g++ -DCURL_STATICLIB -O0 -g3 -Wall -c -fmessage-length=0 -osrc\main.o ..\src\main.cpp g++ -L..\lib -oYTUploader.exe src\main.o -lcurl -lws2_32 -lwldap32 -leay32 -lssleay32 -lz The same thing Try producing a .map file then: g++

Re: Compiling libcurl staticly within DLL-module with mingw32

2011-08-20 Thread Gisle Vanem
Alexander Tumin wrote: As you can see in Makefile; module.c is compiled twice: * once linked staticly with libstatic_curl.a and * once linked dynamicly with libcurl-4.dll There is no problems with dynamic build - it just works perfectly as expected. The problem is that

Re: RE: RE: RE: Linker errors when statically compiled linkinglibcurl+openssl to my project

2011-08-25 Thread Gisle Vanem
Steve Holme wrote: I use Visual Studio (and have solution and project files for .NET 2003 (v7.1), 2005 (v8.0), 2008 (v9.0) and 2010 (v10.0)) and have them configured to build against OpenSSL (as a DLL rather than statically) and to include Visual Studio uses a 2 pass

Re: Lots of errors when try ro use self built OpenSSL and lincUrl with it

2011-08-30 Thread Gisle Vanem
Oleksiy wrote: ..\lib/libeay32.lib(tmp32/asn_mime.obj):(.text[_SMIME_text]+0x6): undefined reference to `_chkstk' ..\lib/libeay32.lib(tmp32/asn_mime.obj):(.text[_SMIME_text]+0xb): undefined reference to `__security_cookie' Because the libeay32.lib was built using

lwIP not using getaddrinfo()

2011-09-22 Thread Gisle Vanem
Playing with lwIP, I see libcurl (Win32/MSVC) doesn't use getaddrinfo(). Although lwIP has it. This stack-trace shows it: ... lwip.dll!sys_arch_sem_wait+0xbb lwip.dll!netconn_gethostbyname+0xb6 lwip.dll!lwip_gethostbyname_r+0x87 curl.exe!Curl_ipv4_resolve_r+0x78

Re: lwIP not using getaddrinfo()

2011-09-22 Thread Gisle Vanem
Daniel Stenberg wrote: On Thu, 22 Sep 2011, Gisle Vanem wrote: But I cannot make sense of the messy #ifdef-ing to select the correct resolver. We have been told for like 10 years that gethostbyname() has been deprecated. At least on Windows. So someone help me fix

Re: lwIP not using getaddrinfo()

2011-09-23 Thread Gisle Vanem
Gisle Vanem wrote: It does. Trying that, I see lwIP uses getaddrinfo(), then calls gethostbyname() internally and then hangs forever waiting for some event: ... kernel32.dll!WaitForSingleObjectEx+0xa8 I see why. lwip_init() is called from easy.c. But the main input

[Patch] url.c

2011-10-04 Thread Gisle Vanem
url.c doesn't compile w/o #define USE_SLL. Here goes: --- Git-latest/lib/url.c Tue Oct 04 16:23:23 2011 +++ lib/url.c Tue Oct 04 18:17:20 2011 @@ -2084,10 +2084,12 @@ if(data-share-cookies == data-cookies) data-cookies = NULL; +#ifdef USE_SSL

Re: Curl + Visual Studio 2010 - Application fails to initialize

2012-02-13 Thread Gisle Vanem
eli wrote: There are two PCs i work on, both have the same versions of Windows and the same versions of Visual Studio. The first is desktop PC and the second is laptop. It would be nice to know which Windows that is? Loaded '..\Debug\curllib.dll', Binary was not built

Re: static link libcurl with VS2010 causes crash

2012-02-21 Thread Gisle Vanem
JonathonS wrote: stack below of the crash. msvcr100d.dll!_free() + 0x10 bytes xx.dll!destroy_async_data(Curl_async * async=0x003f2aa0) Line 326 + 0xe bytes C What excactly is it trying to free? Who allocated the data? You must make sure that the allocator and the code

Re: libcurl+openssl on windows

2012-02-28 Thread Gisle Vanem
Alex Loukissas wrote: I have an app that links statically against libcurl, which itself (libcurl) is built with openssl support. My app is cross-compiled on Linux with mingw-64 and run on Win7-64. The problem I'm facing is the following: Unless I use the CURLOPT_CAINFO

Re: Cross-compiling libcurl for an embedded platform using lwip

2012-02-28 Thread Gisle Vanem
Dan Fandrich wrote: curl very much expects a BSD-style socket library. The best bet is to write a shim library that calls the LWIP socket functions using the standard names so that configure can find them. lwIP already has this shim built-in. Ref.

Re: Cross-compiling libcurl for an embedded platform using lwip

2012-02-28 Thread Gisle Vanem
Dan Fandrich wrote: Do the shim include files mirror the POSIX socket include files? If so, then adding something like CPPFLAGS=-Isrc/include/lwip/ to the configure like ought to make configure curl pick them up. If not, it's trickier. I'm not sure about non-Windows;

Re: Using libcurl on top of lwip on POSIX embedded platform (take 2)

2012-03-19 Thread Gisle Vanem
Guenter wrote: If its not possible to check if initialisation is required or not then its probably worth to talk to the lwip team and suggest an enhancement to lwip_init() so that it does simply nothing if the stack is already initialized. I can only speak for Windows. We can

Re: ftpget.c example error

2012-03-28 Thread Gisle Vanem
Avi Manor wrote: Please don't post in html. It's messy to format a sensible reply in html. While testing this example I have noticed that every call to my_fwrite comes with size = 1. This is the reason why the error is unnoticeable. However, it is not guaranteed to get

Re: pycurl/libcurl/libfaketime crash in clock_gettime

2012-04-04 Thread Gisle Vanem
Dima Tisnek wrote: Granted this is hardly an outright bug in pycurl, however I would rather like to track it down. Agreed, I think the bug must be in libfaketime. Ask them. stack head: #0 0x in ?? () #1 0x77bd9a3d in clock_gettime () from

Re: SSL/TLS support using Windows SSPI Schannel API

2012-04-09 Thread Gisle Vanem
Marc Hörsken wrote: Yes, that is basically the whole purpose of this. Schannel is a replacement for other SSL/TLS implementations, like OpenSSL. I am currently building it using the previously mentioned in winbuild/ and can successfully do HTTPS without

Re: SSL/TLS support using Windows SSPI Schannel API

2012-04-14 Thread Gisle Vanem
Marc Hoersken wrote: functionality of SSL/TLS encryption behind the API. This is the whole purpose of the general SSPI API and provider approach. It might be hard to get some information out of it. I think I see. I've played a little at enumerating and getting the

Re: Using libcurl with zlib

2012-05-10 Thread Gisle Vanem
east2006 east2006 wrote: 1libcurl.lib(content_encoding.obj) : error LNK2019: unresolved external symbol _zlibVersion@0 referenced in function _Curl_unencode_gzip_write 1.\Standalone-D\MelodoContent.exe : fatal error LNK1120: 5 unresolved externals I'm staticly compiling

Re: Using libcurl with zlib

2012-05-10 Thread Gisle Vanem
east2006 east2006 wrote: Thank you, that solved it When compiling libcurl with zlib (MSVC), I get this error: libcurl.res : fatal error LNK1241: resource file zlib1d.lib(zlib1.res) already specified Well, zlib1.res must have been included twice. Why, I don't know. Where vs. host.dispname

2012-06-06 Thread Gisle Vanem
When running curl --trace-ascii -, I see lots of such lines: == Info: Re-using existing connection! (#0) with host (nil) == Info: Connected to (nil) ( port 443 (#0) I mean, the (nil) looks ugly. So to give a nicer trace, when '' is known, why not use that instead when

Re: vs. host.dispname

2012-06-06 Thread Gisle Vanem
Daniel Stenberg wrote. I mean, the (nil) looks ugly. So to give a nicer trace, when '' is known, why not use that instead when 'host.dispname' is NULL? I don't get to see this. How do you get it like this? What name resolver is this libcurl built to use? The

Re: Windows SSPI Schannel implementation ready

2012-06-12 Thread Gisle Vanem
Marc Hoersken wrote: I like this idea. That way Curl_schannel_version would still return something useful while avoiding the dependency on version.lib. Do you also mean that '-DWIN_USE_SSPI' also needs to drop the version.lib requirement? I mean, 'WIN_USE_SSPI' without

curl_schannel.c and realloc()

2012-06-12 Thread Gisle Vanem
I've learned that using realloc() should be kept to a minimum; they could cause copying memory from old to new buffer, heap fragmentation etc. So, I noticed that the number of realloc() calls in libcurl has risen sharply with USE_SCHANNEL. A small test using: curl -v

CyaSSL problem in ldap.c

2012-06-13 Thread Gisle Vanem
From gcc/MingW: In file included from ../../CyaSSL-2.2.0/cyassl/openssl/ssl.h:31:0, from urldata.h:115, from ldap.c:68: ../../CyaSSL-2.2.0/cyassl/ssl.h:422:5: error: expected identifier before '(' token Reason being that OCSP_REQUEST+OCSP_RESPONSE are enum

Re: vs. host.dispname

2012-07-09 Thread Gisle Vanem
Daniel Stenberg wrote: Okay, but can you give me an exact command line you use to get it? I've not yet managed to repeat this problem and I would like to, so that I can perhaps make a test case for it. Sorry for the delay. I forgot about this. But this example shows the (nil)

Re: What is the best way to debug this?

2012-07-15 Thread Gisle Vanem
Igor Korot wrote: Here is my code: [code] struct curl_slist *post = NULL; char *data; sprintf( data, ---%x, static_castunsigned int( time( NULL ) ) ); post = curl_slist_append( post, Content-Type: multipart/form-data ); post =

Re: Unable to build libcurl on mingw with curl-7.26.0 - Daniel

2012-07-19 Thread Gisle Vanem
Guenter wrote: Another option we could do in our GIT would be to at least add *.c and *.h to .gitattributes to so that they are also always forced to be checked out in LF format; AFAIK all compilers can deal with this. Haven't followed the thread so closely. The core problem

Re: Unable to build libcurl on mingw with curl-7.26.0 - Daniel

2012-07-19 Thread Gisle Vanem
Guenter wrote: Hello Gunter What do you mean with problems with '\r\n' ? Errors from 'sh' like: line 12: $'\r': command not found Did you actually run an autobuild from GIT with MSYS? No. I'm not keen on using Msys more than absolutely neccesary. Currently I dont

Re: Conflicting lines 273 and 317 in /lib/urldata.h

2012-07-28 Thread Gisle Vanem
Jan Ehrhardt wrote: The first error is the double declaration of 'connecting_state' in lines 273 and 317 of urldata.h. The next ones have to do with X509_NAME. ../../win32build/include/openssl\x509v3.h(192) : error C2059: syntax error : '(' line 192 of x509v3.h (OpelSSL

Re: ld.exe: cannot find -lcurl

2012-07-31 Thread Gisle Vanem
Chris Ch wrote: I am trying to compile a simple program which uses libcurl with Mingw using Msys. Here is my command and the output given: Chris@Chris-HP ~ $ gcc -L/usr/local/lib/libcurl.a -o live live.c -DCURL_STATICLIB -I/usr/local/include -lcurl

Re: ld.exe: cannot find -lcurl

2012-07-31 Thread Gisle Vanem
Chris Ch wrote: Chris@Chris-HP ~ $ gcc -o live live.c -DCURL_STATICLIB -I/usr/local/include /usr/local/lib/libcu From your prompt, I thought you were not on Win32. How come you have /usr/local/lib on MingW? Sure you don't use MSys? In any case use: gcc -o live live.c

Re: Issues building with ZLIB and c-ares, Mingw on Win8 x64

2012-12-13 Thread Gisle Vanem
Jesse Nicholson wrote: Anyway so I downloaded latest release c-ares, zlib and curl... compiled c-ares successfully (although I can only get it to spit out a static lib), That's the problem. zlib compiled without issue, then on to curl. Curl will compile the static

Re: [bagder/curl] 13606b: build: make use of 93 lib/*.c renamed files

2013-01-03 Thread Gisle Vanem
GitHub i.e. Yang Tse wrote: 93 *.c source files renamed to use our standard naming scheme. .. A lib/curl_amigaos.c A lib/curl_asyn_ares.c A lib/curl_asyn_thread.c A lib/curl_axtls.c A lib/curl_base64.c A lib/curl_bundles.c Okay, but now we can say

Re: [bagder/curl] 13606b: build: make use of 93 lib/*.c renamed files

2013-01-03 Thread Gisle Vanem
Yang Tse wrote: 2) When debugging libcurl or apps that use it with debuggers that are capable of showing the name of the source file it is much easier to know if one is stepping in libcurl's code or elsewhere. I think that's a good argument for renaming. From your

Re: [bagder/curl] 13606b: build: make use of 93 lib/*.c renamed files

2013-01-05 Thread Gisle Vanem
Steve Holme wrote: I'm still more in favour of going back to the old names and reverting the change. Me too. --gv --- List admin: Etiquette:

Re: #include setup.h in libtest

2013-01-10 Thread Gisle Vanem
Yang, I think you forgot about patching tests/libtest. Some files under tests\libtest, includes setup.h. (e.g. in chkhostname.c). Shouldn't that be '#include curl_setup.h'? My bad. Saw on an old version in git. --gv --- List

#include setup.h in libtest

2013-01-10 Thread Gisle Vanem
Yang, I think you forgot about patching tests/libtest. Some files under tests\libtest, includes setup.h. (e.g. in chkhostname.c). Shouldn't that be '#include curl_setup.h'? --gv --- List admin:

[Patch] packages/DOS/

2013-01-10 Thread Gisle Vanem
gcc on DOS hasn't really supported COFF-debug (-gcoff) on djgpp for a long time. Eli Zaretskii wrote in: Sounds like the COFF debug info generation has bit-rotted in GCC. Nothing new here, no other platform

USE_ARES in config-win32.h

2013-01-10 Thread Gisle Vanem
lib/Makefile.m32 has this: ifdef ARES INCLUDES += -I$(LIBCARES_PATH) CFLAGS += -DUSE_ARES But lib/config-win32.h has this: /* Define to enable c-ares asynchronous DNS lookups. */ /* #define USE_ARES 1 */ /* Define to enable threaded asynchronous DNS lookups. */ #define

Re: USE_ARES in config-win32.h

2013-01-11 Thread Gisle Vanem
Yang Tse wrote: config-platform.h in this case (config-win32.h) should be defining USE_ARES and verifying that USE_THREADS_WIN32 is not defined when WITH_ARES or ENABLE_ARES is defined. It's been a long time since I was involved in the asyn*.c / resolver stuff. Many other

ares_getsock() return value

2013-01-11 Thread Gisle Vanem
I'm not sure it matters, but the comment in asyn-ares.c is wrong: /* ... * Returns: CURLE_OK always! */ int Curl_resolver_getsock(struct connectdata *conn, curl_socket_t *socks, int numsocks) { .. int max =

Re: ares_getsock() return value

2013-01-13 Thread Gisle Vanem
Daniel Stenberg wrote: It's funny that we haven't noticed bigger problems with this from users. It might be that it is a fairly unusual limit to actual hit in real life. Have you tried to just bump it? Anyone else? No I haven't. Just caught this while reading and figuring out

Re: [W32] Testsuite does not build in 7.28.1 anymore

2013-01-22 Thread Gisle Vanem
LRN wrote: compiled object files that go into libcurl. So the header tells it to link to dllimport mprintf functions, while the object files provide only normal mprintf functions for internal use. Right, unless you put a -DCURL_STATICLIB in your CFLAGS. And link with a

Re: Patch to get Windows proxy settings

2013-01-28 Thread Gisle Vanem
Daniel Stenberg wrote: 1 - you don't follow our code style, run lib/ and you'll find many errors (tabs, spaces, line lengths) And there's no need to typecast ret-vals from malloc(). libcurl is written in C, not C++. --gv

Moving some files?

2013-01-28 Thread Gisle Vanem
Just some ideas I have to reduce the number of files in curl's root-dir: 1) Could ./ be moved to ./packages/Android like we do for other platforms? 2) Not sure about ./MacOSX-Framework. I do not know OSX-building. But a ./packages/OSX seems logical. 3) ./curl-style.el +

Re: curl 7.28.1/ bug?

2013-01-28 Thread Gisle Vanem
Pierre Joye wrote: However, I do not think we should allow non thread safe crt usage with curl. Not a big matter as recent versions of the VC does not support it anymore. 2003 (7.1) was the last version to support it: What you mean by recent versions? My version is:

Re: Slow Upload Performance on High-Bandwidth connections on windows

2013-02-01 Thread Gisle Vanem
Christian Hägele wrote: The reason for that is the Curl_sndbufset-function in connect.c. On windows the socket-sendbuffer is set to a value of CURL_MAX_WRITE_SIZE + 32 (16416 bytes). There is a also a strange comment why this is done. When the SO_SNDBUF is not

Re: [bagder/curl] 0e66d5: vc: remove explicit MSVC6 IDE project file and doc...

2013-02-07 Thread Gisle Vanem
Yang Tse wrote: The possibility of building by other means is no reason to drop this. Sometimes the best way of debugging something is using the IDE, even when it is possible to build using makefiles. Also. MSVC6 IDE can generate makefiles from project files. Not sure if

Re: [PATCH] More features changes

2013-02-07 Thread Gisle Vanem
Nick Zitzmann wrote: @@ -173,6 +175,12 @@ FOOTNOTES *4 = requires FBopenssl *5 = requires a krb4 library, such as the MIT one or similar. *6 = requires c-ares - *7 = requires OpenSSL or NSS, as GnuTLS only supports SSLv3 and TLSv1 + *7 = requires OpenSSL, NSS, qssl,


2013-02-08 Thread Gisle Vanem
This is AFAICS the only test program in this directory that doesn't call curl_global_init(). This function is needed for Curl_gethostname() to work on Windows at least. Besides it does a case-sensitive string compare of 'argv[1]' and return buffer from Curl_gethostname(). Aren't hostnames always

Mem leak in curl_ntlm_msg.c

2013-02-08 Thread Gisle Vanem
Running tests\libtest\libntlmconnect.exe reveals a 1 byte (!) leak in ./lib/curl_ntlm_msgs.c: perl ..\ c:memdebug.curl Leak detected: memory still allocated: 1 bytes At 9771e8, there's 1 bytes. allocated by curl_ntlm_msgs.c:399 Snippet from curl_ntlm_msgs.c: /* setup ntlm

Re: Mem leak in curl_ntlm_msg.c

2013-02-11 Thread Gisle Vanem
Christian Hägele wrote: I didn't have the opportunity to test the code, but as Really? You should build libcurl with '-DCURLDEBUG', do a set CURL_MEMDEBUG=mem_trace_file, run tests\libtest\libntlmconnect.exe and check leaks with perl tests\ mem_trace_file.

[Patch] lib/config-dos.h

2013-02-14 Thread Gisle Vanem
1) HAVE_TERMIOS_H and HAVE_STRLCAT are for djgpp only. 2) The HAVE_CLOSESOCKET_CAMEL hack is not suited for MSDOS/Watt-32. To close a socket, close_s() should be used. Not obfuscated as CloseSocket(). Change reflected in curl_setup_once.h also. Camel as in Apache Camel? 3) Need to force

Re: [Patch] lib/config-dos.h

2013-02-15 Thread Gisle Vanem
Yang Tse wrote: Pushed your changes, although #2 done differently. I saw that. Okay by me. If you are trying to figure out for some specific system what should be defined, use the following heuristic. Don't define HAVE_MALLOC_H nor NEED_MALLOC_H and see if everything

Re: limits of independent curl connections

2013-02-25 Thread Gisle Vanem
Tom K. wrote: This example creates a CURL handle and then sends data in a loop. I start 200 of these applications up and eventually the system will become unresponsive to the point of having to press the power button. When

Re: limits of independent curl connections

2013-02-26 Thread Gisle Vanem
Tom K. wrote: How would a different compiler rule out libcurl? I'm just suggesting that GNU C++ is a better compiler than MSVC++. PS. In the project-file I saw you did use '-D_SCL_SECURE_NO_WARNINGS'. Why? This is fairly common practice with MSVC, whether good or

Re: Writing cURL response to a file or a string in C++

2013-03-04 Thread Gisle Vanem
Jason T. Slack-Moehrle wrote: curl_easy_setopt(curl, CURLOPT_WRITEDATA, stream); ... I seem to be crashing at: stream-write(ptr, count); with simply a bus error How is 'stream' initialiased then? I.e. what is 'stream-write' set to? Doesn't look like something

[Patch] lib/polarssl.c

2013-03-08 Thread Gisle Vanem
A typo in lib/polarssl.c? lib/polarsslthreadlock.h doesn't exists here. Patch: --- Git-latest\lib\polarssl.c Sat Feb 23 20:58:58 2013 +++ lib\polarssl.c Tue Feb 26 09:05:09 2013 @@ -66,7 +66,7 @@ #include connect.h /* for the connect timeout */ #include select.h #include rawstr.h

Re: [PATCH] Addition of trailer headers in HTTP requests generated by libcurl

2013-03-15 Thread Gisle Vanem
Chrysovaladis Datsios wrote: In the patch: ... (line 155 in patch): + trailer_headers_buf = malloc(headers_buf_size); + if(trailer_headers_buf == NULL) +return CURLE_BAD_FUNCTION_ARGUMENT; W/o looking at your code in details, why isn't this

Re: Unable to send/receive messages using curl (version 7.28.1)

2013-03-22 Thread Gisle Vanem
subrahmanya wrote: When I run my application I get the value -1 for nread. This was not considered as error till 7.18.0 release. From release 7.18.0 onwards this value is treated as error because of the condition if((size_t)nread buffersize). And hence my application

Re: libuv example

2013-03-27 Thread Gisle Vanem
Clemens Gruber wrote: I am sure many of you are aware that libev and libevent only support select()/poll() on Windows, but not the nice and much faster IO Completion Ports API. libevent as used in the Tor-project and others has used IOCP for some time now. Since

Re: Name lookup/DNS resolution mechanism of libcurl

2013-04-01 Thread Gisle Vanem
Michael-O wrote: Jackpot! No proxies but I found several addresses in 192.168.56.* This is the VirtualBox (version 4.1.24 installed) Host-Only Network adapter. I have disabled it, and boom curl resolves immediately. A bug in VirtualBox I would guess. Some similar issue is

Re: [bagder/curl] efa548: Made Perl testsuite able to kill Windows p...

2013-04-06 Thread Gisle Vanem
Commit: efa5488448771f9cf6554b137d388ea5f3dc90c6 Author: Marc Hoersken Date: 2013-04-06 (Sat, 06 Apr 2013) .. Made Perl testsuite able to kill Windows processes This patch

Re: Make DNS requests follow the CURLOPT_INTERFACE if c-ares is in use

2013-04-07 Thread Gisle Vanem
Vandry wrote: If c-ares is in use, this is actually easy to implement because c-ares already has a hook for it. I propose a small change that would make DNS requests also follow the CURLOPT_INTERFACE binding if c-ares is in use. If c-ares is not in use or if the c-ares

Re: Name lookup/DNS resolution mechanism of libcurl

2013-04-09 Thread Gisle Vanem
Guenter wrote: On 09.04.2013 20:01, Michael-O wrote: Günter, were you able to look at the Makefiles of c-ares and curl? yes, today commited two patches - one for curl and one for c-ares ... Thanks for fixing this. I wrote about this in this thread:

Re: Name lookup/DNS resolution mechanism of libcurl

2013-04-10 Thread Gisle Vanem
Guenter wrote: How can USE_THREADS_WIN32 both be defined and set to 0? The USE_THREADS_WIN32 == 0 part is superfluous AFAICS. well, simply by -DUSE_THREADS_WIN32=0 ... I think you know I already knew that. Just that it's highly suspicious that it was needed. I forgot the

Re: progressfunction called too much

2013-06-04 Thread Gisle Vanem
Linos wrote: You are welcome, thank you for create the bug report. I also see this. Here is the stack of the main thread: ntkrnlpa.exe!KiUnexpectedInterrupt+0x121 ntkrnlpa.exe!ZwYieldExecution+0x1c90

Re: progressfunction called too much

2013-06-14 Thread Gisle Vanem
Daniel Stenberg wrote: Just for the record: I just pushed a fix for this (commit 0feeab7802dd2a) and I've closed that issue! Good. It's much better now. No longer a CPU-hog. Here is the call-stack now with the same Python script: ntkrnlpa.exe!KiUnexpectedInterrupt+0x121

Re: x64 libcurl

2013-07-09 Thread Gisle Vanem
Jamey Kirby wrote: I am trying to build libcurl for x64, I finally got it almost working. I can build x86 with no problems. Fails when it tried to compile amigaos for x64. How do I tell it to only build vc-x64? Here is my build line: nmake /f Makefile.vc10 MACHINE=x64

Re: x64 libcurl

2013-07-09 Thread Gisle Vanem
Jamey Kirby wrote: Gonna have a try. Again, thanks for your help and tolerating my frustrations. Having been dinking with this for a month, it is getting frustrating. I'm not sure you're using the correct cl.exe. In a cmd-shell, what does cl /? print? Here with my

Re: Compiling Curl with TLS support using MSVC 2008

2013-07-13 Thread Gisle Vanem
sumit gambhir wrote: Please provide steps to compile Curl with TLS and HTTPS support using MSVC 2008. What HTTPS library you want to use? The SSL that comes with Windows would probably be best for your. It could be built in this ugly way: cd lib nmake -f Makefile.vc6

[Patch] transfer.c

2013-08-20 Thread Gisle Vanem
A change in 'struct SessionHandle' broke the 'CURL_DOES_CONVERSIONS' code in transfer.c: --- Git-latest/lib/transfer.c2013-08-20 06:52:36 + +++ lib/transfer.c 2013-08-20 07:05:06 + @@ -101,8 +101,10 @@ #ifdef CURL_DOES_CONVERSIONS bool sending_http_headers = FALSE; -

Re: Linker errors in pre-compiled static library for windows

2013-08-22 Thread Gisle Vanem
Garrick Mason wrote: lib\libcurl.a(url.o):(.text.unlikely+0x1a4): undefined reference to `stringprep_check_version' lib\libcurl.a(sendf.o):(.text+0x147): undefined reference to `recv@16' Try adding 'libidn.a' and '-lws2_32' to the link command. libidn.a should be in the

snprintf in http2.c

2013-09-06 Thread Gisle Vanem
I built NgHTTP2 some days ago using MSVC 2010. I was amazed of how easy it was. Not very Unix/Posix centric at all. But using the first little merge of nghttp2 into libcurl, I stumbeled on the missing 'snprintf' in MSVCRT. Isn't this how we do it for other libcurl files? I.e. use 'curl_msnprintf'

Re: best practices: c-ares vs threaded resolver

2013-09-17 Thread Gisle Vanem
m brandenberg wrote: So these and other issues make me want to use the system resolver library. When it fails, there's a general system/network configuration issue that doesn't become a support issue for us. I tend to agree. The systems resolver seems alway to work best for

HTTP 2.0 selects forever

2013-09-25 Thread Gisle Vanem
I'm having some success with HTTP 2.0 using the NgHTTP2 test server . I don't suppose there are other HTTP 2.0 servers I can test with? The problem is some extra garbage in the start and end of output. Using this command curl --http2.0 Gives

Re: HTTP 2.0 selects forever

2013-09-26 Thread Gisle Vanem
Daniel Stenberg wrote: I have a few local commits that make it slightly better but recently I've hit a little obstacle in nghttp2's API that I've been communicating with Tatsuhiro about how to solve[1]. I hope to be able to get something done on that soon so that I can get a

Re: HTTP 2.0 selects forever

2013-09-27 Thread Gisle Vanem
Daniel Stenberg wrote: On Thu, 26 Sep 2013, Tatsuhiro Tsujikawa wrote: But SPDY will disappear when HTTP/2.0 is standardized, so there may be less incentive to invest the time to support SPDY now, but YMMV. Exactly. SPDY was pioneered by Google and it is now being offered on

errno on lwIP

2013-10-09 Thread Gisle Vanem
lib/curl_setup_once.h assumes lwIP on Windows uses 'SetLastError()' to set network errors. It doesn't; it uses 'errno'. Hence this little patch: --- g:/MingW32/src/inet/curl/Git-latest/lib/curl_setup_once.h 2013-02-23 19:58:58 + +++ g:/MingW32/src/inet/curl/lib/curl_setup_once.h

[Patch] docs/examples/httpput.c

2013-10-22 Thread Gisle Vanem
Patch docs/examples/httpput.c for MSVC since it's missing unistd.h: --- Git-latest/docs/examples/httpput.c 2013-01-28 15:48:38 + +++ docs/examples/httpput.c2013-10-09 11:54:26 + @@ -22,7 +22,9 @@ #include stdio.h #include fcntl.h #include sys/stat.h -#include unistd.h +#ifndef

Re: Question about some platform updates to Windows

2013-10-24 Thread Gisle Vanem
Myria wrote: I noticed that Windows does not define HAVE_GMTIME_R or HAVE_LOCALTIME_R. It is true that Visual Studio's C runtime library doesn't have gmtime_r, but it has a somewhat-equivalent API, gmtime_s. gmtime_s's prototype is different, reversing the order of the two

Re: [Patch] docs/examples/httpput.c

2013-10-24 Thread Gisle Vanem
Dan Fandrich wrote: But I'm not sure unistd.h is needed at all. It's needed for close(2). But the only reason that's needed is because fstat is used instead of stat(2); if you fix that, then you could remove that include altogether. Okay. I've tested the following

  1   2   3   >