]> code.citadel.org Git - citadel.git/blobdiff - citadel/imap_tools.c
- declare *printf format specifiers if gcc detected
[citadel.git] / citadel / imap_tools.c
index 58aabd897da843ac79c3b2e8fa8c070419c79e8e..4f9809879a30262213e6fd84f8b88be96c81b724 100644 (file)
 #include "imap_tools.h"
 
 
+#ifndef HAVE_SNPRINTF
+#include "snprintf.h"
+#endif
+
 /*
  * Output a string to the IMAP client, either as a literal or quoted.
  * (We do a literal if it has any double-quotes or backslashes.)
@@ -37,7 +41,7 @@ void imap_strout(char *buf)
        }
 
        if (is_literal) {
-               cprintf("{%d}\r\n%s", strlen(buf), buf);
+               cprintf("{%ld}\r\n%s", strlen(buf), buf);
        } else {
                cprintf("\"%s\"", buf);
        }