cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Minor patches related with CURL_DISABLE_HTTP

From: Yang Tse <yangsita_at_gmail.com>
Date: Thu, 24 Nov 2005 07:48:24 +0100

Daniel,

First patch removes GOPHER protocol when HTTP is disabled.

diff -urp c:\f\curl-old/curl/lib/setup.h c:\f\curl-new/curl/lib/setup.h
--- c:\f\curl-old/curl/lib/setup.h 2005-11-23 12:51:31.000000000 +0100
+++ c:\f\curl-new/curl/lib/setup.h 2005-11-24 06:49:05.342254400 +0100
@@ -307,6 +307,10 @@ typedef int curl_socket_t;
 #endif
 #endif

+#if defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_GOPHER)
+#define CURL_DISABLE_GOPHER
+#endif
+
 #ifdef CURLDEBUG
 #define DEBUGF(x) x
 #else

Second patch solves compilation errors when SSL is not disabled and
HTTP is disabled.

diff -urp c:\f\curl-old/curl/lib/formdata.c c:\f\curl-new/curl/lib/formdata.c
--- c:\f\curl-old/curl/lib/formdata.c 2005-05-02 16:33:07.000000000 +0200
+++ c:\f\curl-new/curl/lib/formdata.c 2005-11-24 06:51:59.743030400 +0100
@@ -105,7 +105,7 @@ Content-Disposition: form-data; name="FI
 /* Length of the random boundary string. */
 #define BOUNDARY_LENGTH 40

-#ifndef CURL_DISABLE_HTTP
+#if !defined(CURL_DISABLE_HTTP) || defined(USE_SSLEAY)

 #include <stdio.h>
 #include <stdlib.h>
@@ -128,6 +128,10 @@ Content-Disposition: form-data; name="FI
 /* The last #include file should be: */
 #include "memdebug.h"

+#endif /* !defined(CURL_DISABLE_HTTP) || defined(USE_SSLEAY) */
+
+#ifndef CURL_DISABLE_HTTP
+
 #if defined(HAVE_BASENAME) && defined(NEED_BASENAME_PROTO)
 /* This system has a basename() but no prototype for it! */
 char *basename(char *path);
@@ -1511,7 +1515,7 @@ int main()
   return 0;
 }

-#endif
+#endif /* _FORM_DEBUG */

 #else /* CURL_DISABLE_HTTP */
 CURLFORMcode curl_formadd(struct curl_httppost **httppost,
@@ -1531,6 +1535,8 @@ void curl_formfree(struct curl_httppost

 #endif /* CURL_DISABLE_HTTP */

+#if !defined(CURL_DISABLE_HTTP) || defined(USE_SSLEAY)
+
 /*
  * Curl_FormBoundary() creates a suitable boundary string and returns an
  * allocated one. This is also used by SSL-code so it must be present even
@@ -1563,3 +1569,5 @@ char *Curl_FormBoundary(void)

   return retstring;
 }
+
+#endif /* !defined(CURL_DISABLE_HTTP) || defined(USE_SSLEAY) */
Received on 2005-11-24

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET