mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 16:18:48 -05:00
7f679c3da3
These minor changes remove portability issues with the this example and allow it to run on Win32. Specifically: * The use of pthread_create() has been replaced by g_thread_create(). This removes the dependency on the pthreads library. Since this is an example using GTK+, g_thread_create() is available as it is a part of glibc. * The CURLOPT_FILE option is now referred to by its "newer name" CURLOPT_WRITEDATA. * The use of CURLOPT_WRITEFUNCTION has been added. As described in the docs, this avoids the crashes when using a DLL under Win32. * The output file has been renamed from "/tmp/test.curl" to "test.curl". It's unlikely that there is a /tmp when in Win32 and other examples in libcurl write their output files to the working directory. |
||
---|---|---|
.. | ||
.cvsignore | ||
curlgtk.c | ||
curlx.c | ||
fopen.c | ||
ftpget.c | ||
ftpgetresp.c | ||
ftpupload.c | ||
getinmemory.c | ||
http-post.c | ||
httpput.c | ||
Makefile.am | ||
makefile.dj | ||
Makefile.example | ||
multi-app.c | ||
multi-double.c | ||
multi-post.c | ||
multi-single.c | ||
multithread.c | ||
persistant.c | ||
post-callback.c | ||
postit2.c | ||
README | ||
sepheaders.c | ||
simple.c | ||
simplepost.c | ||
simplessl.c |
EXAMPLES This directory is for libcurl programming examples. They are meant to show some simple steps on how you can build your own application to take full advantage of libcurl. If you end up with other small but still useful example sources, please mail them for submission in future packages and on the web site. The Makefile.example is an example makefile that could be used to build these examples. Just edit the file according to your system and requirements first. Most examples should build fine using a command line like this: $ `curl-config --cc --cflags --libs` -o example example.c Some compilers don't like having the arguments in this order but instead want you do reorganize them like: $ `curl-config --cc` -o example example.c `curl-config --cflags --libs` *PLEASE* do not use the curl.haxx.se site as a test target for your libcurl applications/experiments. Even if the examples in this directory use that site as an example URL at some places, it doesn't mean that the URLs work or that we expect you to actually torture our web site with your tests! Thanks.