also removed very old "require libcurl older than blablabla"
* This exact source code has not been verified to work.
*/
-/* to make this work under windows, use the win32-functions from the
- win32socket.c file as well */
-
#include <stdio.h>
#include <string.h>
#include <curl/types.h>
#include <curl/easy.h>
-#if LIBCURL_VERSION_NUM < 0x070900
-#error "curl_formadd() is not introduced until libcurl 7.9 and later"
-#endif
-
int main(int argc, char *argv[])
{
CURL *curl;
struct curl_slist *headerlist=NULL;
char buf[] = "Expect:";
+ curl_global_init(CURL_GLOBAL_ALL);
+
/* Fill in the file upload field */
curl_formadd(&formpost,
&lastptr,
* $Id$
*/
-/* to make this work under windows, use the win32-functions from the
- win32socket.c file as well */
-
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
char *bodyfilename = "body.out";
FILE *bodyfile;
+ curl_global_init(CURL_GLOBAL_ALL);
+
/* init the curl session */
curl_handle = curl_easy_init();