gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnurl] 28/222: mime: when disabled, avoid C99 macro


From: gnunet
Subject: [gnurl] 28/222: mime: when disabled, avoid C99 macro
Date: Thu, 07 Nov 2019 00:08:44 +0100

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository gnurl.

commit ac58c51b297466e248c2c1201c2c6c895c477a11
Author: Daniel Stenberg <address@hidden>
AuthorDate: Mon Sep 16 23:25:48 2019 +0200

    mime: when disabled, avoid C99 macro
    
    Closes #4368
---
 lib/mime.c | 7 +++++++
 lib/mime.h | 6 +++---
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/lib/mime.c b/lib/mime.c
index 2135f72c2..0fb3ae81c 100644
--- a/lib/mime.c
+++ b/lib/mime.c
@@ -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 */
diff --git a/lib/mime.h b/lib/mime.h
index 4c9a5fb71..3241fdc1f 100644
--- a/lib/mime.h
+++ b/lib/mime.h
@@ -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
 
 

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]