cURL / Mailing Lists / curl-library / Single Mail

curl-library

formdata.c won't compile if CURL_DISABLE_HTTP is set

From: David McCreedy <mccreedytpf_at_msn.com>
Date: Wed, 19 Jul 2006 18:55:40 +0000

The curl_formadd function in lib/formdata.c takes a compiler error if
CURL_DISABLE_HTTP is defined.
The curl_formadd function's return value is the nonexistant CURLFORMCode.
(Note the uppercase 'C' of 'Code'.)

I think changes to the HTTP-enabled curl_formadd function weren't carried
over to the HTTP-disabled curl_formadd function.

Sync'ing the disabled one with the enabled one fixes the compilation error:

   return CURL_FORMADD_DISABLED;
}

-CURLFORMCode curl_formget(struct curl_httppost *post, void *arg,
- curl_formget_callback append)
+int curl_formget(struct curl_httppost *form, void *arg,
+ curl_formget_callback append)
{
- (void) post;
+ (void) form;
   (void) arg;
   (void) append;
   return CURL_FORMADD_DISABLED;

I changed "post" to "form" to more closely match the HTTP-enabled
curl_formget function but the change from CURLFORMCode to int is the only
truly necessary change.

-David

Received on 2006-07-19