]> granicus.if.org Git - curl/commitdiff
mime: when disabled, avoid C99 macro
authorDaniel Stenberg <daniel@haxx.se>
Mon, 16 Sep 2019 21:25:48 +0000 (23:25 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 18 Sep 2019 06:08:41 +0000 (08:08 +0200)
Closes #4368

lib/mime.c
lib/mime.h

index 2135f72c25d05219eff1267bb8c87bde5209ff74..0fb3ae81c1692298c55e08edd5d59bae9d1e7b20 100644 (file)
@@ -1901,4 +1901,11 @@ CURLcode curl_mime_headers(curl_mimepart *part,
   return CURLE_NOT_BUILT_IN;
 }
 
+CURLcode Curl_mime_add_header(struct curl_slist **slp, const char *fmt, ...)
+{
+  (void)slp;
+  (void)fmt;
+  return CURLE_NOT_BUILT_IN;
+}
+
 #endif /* if disabled */
index 4c9a5fb71f404e457fd09713d2eb6ecef72d7af6..3241fdc1f72fa23bca24236f5cd002cdb038f52c 100644 (file)
@@ -127,7 +127,9 @@ struct curl_mimepart_s {
   mime_encoder_state encstate;     /* Data encoder state. */
 };
 
-#if (!defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_MIME)) || \
+CURLcode Curl_mime_add_header(struct curl_slist **slp, const char *fmt, ...);
+
+#if (!defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_MIME)) ||     \
   !defined(CURL_DISABLE_SMTP) || !defined(CURL_DISABLE_IMAP)
 
 /* Prototypes. */
@@ -144,7 +146,6 @@ curl_off_t Curl_mime_size(curl_mimepart *part);
 size_t Curl_mime_read(char *buffer, size_t size, size_t nitems,
                       void *instream);
 CURLcode Curl_mime_rewind(curl_mimepart *part);
-CURLcode Curl_mime_add_header(struct curl_slist **slp, const char *fmt, ...);
 const char *Curl_mime_contenttype(const char *filename);
 
 #else
@@ -157,7 +158,6 @@ const char *Curl_mime_contenttype(const char *filename);
 #define Curl_mime_size(x) (curl_off_t) -1
 #define Curl_mime_read NULL
 #define Curl_mime_rewind(x) ((void)x, CURLE_NOT_BUILT_IN)
-#define Curl_mime_add_header(x,y,...) CURLE_NOT_BUILT_IN
 #endif