]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
lib: include curl_printf.h as one of the last headers
authorDaniel Stenberg <daniel@haxx.se>
Fri, 29 Apr 2016 13:46:40 +0000 (15:46 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 29 Apr 2016 20:32:49 +0000 (22:32 +0200)
curl_printf.h defines printf to curl_mprintf, etc. This can cause
problems with external headers which may use
__attribute__((format(printf, ...))) markers etc.

To avoid that they cause problems with system includes, we include
curl_printf.h after any system headers. That makes the three last
headers to always be, and we keep them in this order:

 curl_printf.h
 curl_memory.h
 memdebug.h

None of them include system headers, they all do funny #defines.

Reported-by: David Benjamin
Fixes #743

49 files changed:
lib/asyn-ares.c
lib/asyn-thread.c
lib/base64.c
lib/conncache.c
lib/connect.c
lib/cookie.c
lib/curl_addrinfo.c
lib/curl_ntlm_core.c
lib/curl_ntlm_wb.c
lib/curl_sasl.c
lib/easy.c
lib/escape.c
lib/file.c
lib/formdata.c
lib/ftp.c
lib/hostip.c
lib/hostip4.c
lib/hostip6.c
lib/http.c
lib/http2.c
lib/http_digest.c
lib/http_negotiate.c
lib/http_ntlm.c
lib/http_proxy.c
lib/if2ip.c
lib/imap.c
lib/inet_ntop.c
lib/krb5.c
lib/ldap.c
lib/memdebug.c
lib/multi.c
lib/netrc.c
lib/openldap.c
lib/pingpong.c
lib/pop3.c
lib/rtsp.c
lib/sendf.c
lib/smtp.c
lib/socks_gssapi.c
lib/socks_sspi.c
lib/ssh.c
lib/strerror.c
lib/telnet.c
lib/tftp.c
lib/transfer.c
lib/url.c
lib/wildcard.c
lib/x509asn1.c
tests/libtest/testutil.c

index adb1a238a764395f6f9032ff44b5e8c9db35eb48..51f61dee1234a09c0646bd367ffbfc59f73470d7 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -68,7 +68,6 @@
 #include "connect.h"
 #include "select.h"
 #include "progress.h"
-#include "curl_printf.h"
 
 #  if defined(CURL_STATICLIB) && !defined(CARES_STATICLIB) && \
      (defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__))
@@ -83,8 +82,9 @@
 #define HAVE_CARES_CALLBACK_TIMEOUTS 1
 #endif
 
+/* The last 3 #include files should be in this order */
+#include "curl_printf.h"
 #include "curl_memory.h"
-/* The last #include file should be: */
 #include "memdebug.h"
 
 struct ResolverResults {
index 83ce0ce4ede7185be2eb12437fdcbda77e70ce53..81caedb091cf2dcd7a4ce388dc266506c620a304 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
 #include "inet_ntop.h"
 #include "curl_threads.h"
 #include "connect.h"
+/* The last 3 #include files should be in this order */
 #include "curl_printf.h"
 #include "curl_memory.h"
-
-/* The last #include file should be: */
 #include "memdebug.h"
 
 /***********************************************************************
index 9facd38638a8cadcb95744263ce6218f6f6efdd8..0ef24d51f88a271875741d1fcfa8ddc65a49c7e2 100644 (file)
 /* Base64 encoding/decoding */
 
 #include "curl_setup.h"
-#include "curl_printf.h"
 #include "urldata.h" /* for the SessionHandle definition */
 #include "warnless.h"
 #include "curl_base64.h"
 #include "non-ascii.h"
 
-/* The last #include files should be: */
+/* The last 3 #include files should be in this order */
+#include "curl_printf.h"
 #include "curl_memory.h"
 #include "memdebug.h"
 
index 89086590aabb2dd191e04e67e6062d2e9a8ce047..930b932b71507af55530ce0e674eccefdbe51b9c 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2012, Linus Nielsen Feltzing, <linus@haxx.se>
+ * Copyright (C) 2012, 2016, Linus Nielsen Feltzing, <linus@haxx.se>
  * Copyright (C) 2012 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
 #include "sendf.h"
 #include "rawstr.h"
 #include "conncache.h"
+/* The last 3 #include files should be in this order */
 #include "curl_printf.h"
-
 #include "curl_memory.h"
-/* The last #include file should be: */
 #include "memdebug.h"
 
 static void conn_llist_dtor(void *user, void *element)
index 6ed9b024a8afa93dbdb3c63711c6d6e96f28c80d..8dfe9e2bf5ce630db8401417045f482c460eb09c 100644 (file)
@@ -56,7 +56,6 @@
 #include <inet.h>
 #endif
 
-#include "curl_printf.h"
 #include "urldata.h"
 #include "sendf.h"
 #include "if2ip.h"
@@ -74,7 +73,8 @@
 #include "conncache.h"
 #include "multihandle.h"
 
-/* The last #include files should be: */
+/* The last 3 #include files should be in this order */
+#include "curl_printf.h"
 #include "curl_memory.h"
 #include "memdebug.h"
 
index 1f2239242864f616ba7fac3b4a9b2d57e9923f57..01ce270bb6ce7f104a7f7c40c004df3a92a4ec7a 100644 (file)
@@ -88,7 +88,6 @@ Example set of cookies:
 # include <libpsl.h>
 #endif
 
-#include "curl_printf.h"
 #include "urldata.h"
 #include "cookie.h"
 #include "strequal.h"
@@ -101,7 +100,8 @@ Example set of cookies:
 #include "curl_memrchr.h"
 #include "inet_pton.h"
 
-/* The last #include files should be: */
+/* The last 3 #include files should be in this order */
+#include "curl_printf.h"
 #include "curl_memory.h"
 #include "memdebug.h"
 
index cc60ddb66485a159be8084af297796f53b1ee4b6..8fa0c84cccec4eefef39b510c59a4cb1f8af2400 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
 #include "curl_addrinfo.h"
 #include "inet_pton.h"
 #include "warnless.h"
+/* The last 3 #include files should be in this order */
 #include "curl_printf.h"
 #include "curl_memory.h"
-
-/* The last #include file should be: */
 #include "memdebug.h"
 
 /*
index 60a0bb4d7d09fc530cd68fa5f5966040b4641eea..ea7548dd180b4ef2633de37bf4e5fae35def350f 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
 #include "warnless.h"
 #include "curl_endian.h"
 #include "curl_des.h"
+/* The last 3 #include files should be in this order */
 #include "curl_printf.h"
-
-/* The last #include files should be: */
 #include "curl_memory.h"
 #include "memdebug.h"
 
index 3defec7b554e648e70846d3e0c04ec55b5e5be33..afdea16c0508167519efde37392f8f9d5149e1cf 100644 (file)
@@ -51,9 +51,8 @@
 #include "curl_ntlm_wb.h"
 #include "url.h"
 #include "strerror.h"
+/* The last 3 #include files should be in this order */
 #include "curl_printf.h"
-
-/* The last #include files should be: */
 #include "curl_memory.h"
 #include "memdebug.h"
 
index 81b023523c2c0e5cabec4706b68b0456761511f1..94b39e4a620c225ff4318355aa277243bdacebc5 100644 (file)
@@ -46,9 +46,8 @@
 #include "rawstr.h"
 #include "sendf.h"
 #include "non-ascii.h" /* included for Curl_convert_... prototypes */
+/* The last 3 #include files should be in this order */
 #include "curl_printf.h"
-
-/* The last #include files should be: */
 #include "curl_memory.h"
 #include "memdebug.h"
 
index 390888a8d2806692ebef3f8bcc527974cdf62eeb..ea7af5e5243295bd0a81abf62857e6c9b08cd96b 100644 (file)
@@ -73,9 +73,8 @@
 #include "multiif.h"
 #include "sigpipe.h"
 #include "ssh.h"
+/* The last 3 #include files should be in this order */
 #include "curl_printf.h"
-
-/* The last #include files should be: */
 #include "curl_memory.h"
 #include "memdebug.h"
 
index 8299ab3961451c1859cec93b53d85d6e93d16440..2c6a7f6554a890f37b7b233dff4cb181d5434335 100644 (file)
@@ -31,9 +31,8 @@
 #include "warnless.h"
 #include "non-ascii.h"
 #include "escape.h"
+/* The last 3 #include files should be in this order */
 #include "curl_printf.h"
-
-/* The last #include files should be: */
 #include "curl_memory.h"
 #include "memdebug.h"
 
index 350c3eeced14549f89ff7f22eb7688eddbc32b7f..1eeb84d5a9e4d4305fd57ffef64938bf4fe92e4f 100644 (file)
@@ -61,9 +61,8 @@
 #include "url.h"
 #include "parsedate.h" /* for the week day and month names */
 #include "warnless.h"
+/* The last 3 #include files should be in this order */
 #include "curl_printf.h"
-
-/* The last #include files should be: */
 #include "curl_memory.h"
 #include "memdebug.h"
 
index 667371c80f5613292e66bfe95c1121af9784ab69..a71f099c8abe9d3649047b907d461e1a6af40d57 100644 (file)
@@ -36,9 +36,8 @@
 #include "strequal.h"
 #include "sendf.h"
 #include "strdup.h"
+/* The last 3 #include files should be in this order */
 #include "curl_printf.h"
-
-/* The last #include files should be: */
 #include "curl_memory.h"
 #include "memdebug.h"
 
index 27f48b58545688652f7618e7ec416e90ab487ec6..cfa1bbb805859d8e52102a8c970192303ee0bf16 100644 (file)
--- a/lib/ftp.c
+++ b/lib/ftp.c
 #include "warnless.h"
 #include "http_proxy.h"
 #include "non-ascii.h"
+/* The last 3 #include files should be in this order */
 #include "curl_printf.h"
-
 #include "curl_memory.h"
-/* The last #include file should be: */
 #include "memdebug.h"
 
 #ifndef NI_MAXHOST
index 727b62dfe209d49e2f77a3db7167f2cadb5d28f6..ead78de7297df0a2ee74bdc717fb2e94e34c4a2d 100644 (file)
@@ -56,9 +56,9 @@
 #include "url.h"
 #include "inet_ntop.h"
 #include "warnless.h"
+/* The last 3 #include files should be in this order */
 #include "curl_printf.h"
 #include "curl_memory.h"
-/* The last #include file should be: */
 #include "memdebug.h"
 
 #if defined(CURLRES_SYNCH) && \
index 25c4529655ae7e9e5b71b29d79c0da9c4f66f1e8..15895d7cec8081c4776494e30e718f9f276b89a3 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -48,9 +48,9 @@
 #include "strerror.h"
 #include "url.h"
 #include "inet_pton.h"
+/* The last 3 #include files should be in this order */
 #include "curl_printf.h"
 #include "curl_memory.h"
-/* The last #include file should be: */
 #include "memdebug.h"
 
 /***********************************************************************
index 2f58376d26eddef1ab615c6e126fa878be4240af..59bc4e4ac57143b1ff87b809b6737a3bea8769bf 100644 (file)
 #include "url.h"
 #include "inet_pton.h"
 #include "connect.h"
+/* The last 3 #include files should be in this order */
 #include "curl_printf.h"
 #include "curl_memory.h"
-
-/* The last #include file should be: */
 #include "memdebug.h"
 
 /***********************************************************************
index 471685001f30f646a85da15e6b3955c02f167ad0..f3805cc5bd53c8a3aab18af7ae42e18a8953dd35 100644 (file)
@@ -77,9 +77,9 @@
 #include "pipeline.h"
 #include "http2.h"
 #include "connect.h"
-#include "curl_printf.h"
 
-/* The last #include files should be: */
+/* The last 3 #include files should be in this order */
+#include "curl_printf.h"
 #include "curl_memory.h"
 #include "memdebug.h"
 
index eae8dac8d2e5607d601d8c2086d4c0f5eebdbc32..557685b8070b8885274f1a3cfe2540252f3f11b1 100644 (file)
@@ -23,7 +23,6 @@
 #include "curl_setup.h"
 
 #ifdef USE_NGHTTP2
-#include "curl_printf.h"
 #include <nghttp2/nghttp2.h>
 #include "urldata.h"
 #include "http2.h"
@@ -37,7 +36,8 @@
 #include "connect.h"
 #include "strtoofft.h"
 
-/* The last #include files should be: */
+/* The last 3 #include files should be in this order */
+#include "curl_printf.h"
 #include "curl_memory.h"
 #include "memdebug.h"
 
index 782a7a2407acbea7fabbc25790275cfacc6585b8..a1768b863cee102a0049b100ad18235d51002a04 100644 (file)
@@ -28,9 +28,8 @@
 #include "rawstr.h"
 #include "vauth/vauth.h"
 #include "http_digest.h"
+/* The last 3 #include files should be in this order */
 #include "curl_printf.h"
-
-/* The last #include files should be: */
 #include "curl_memory.h"
 #include "memdebug.h"
 
index 92113eb0784e2ef964e9c714eec277a7fa33f155..999bc0c528a43ca9124d85785f12f098e0f11d2d 100644 (file)
@@ -29,9 +29,9 @@
 #include "rawstr.h"
 #include "http_negotiate.h"
 #include "vauth/vauth.h"
-#include "curl_printf.h"
 
-/* The last #include files should be: */
+/* The last 3 #include files should be in this order */
+#include "curl_printf.h"
 #include "curl_memory.h"
 #include "memdebug.h"
 
index 9ea5d70ee6a2c247859ef2c9401cab69b6dbdfb3..935df25dbe78cf2acc2e93bdae7c7a31a97e2be2 100644 (file)
@@ -40,7 +40,6 @@
 #include "curl_ntlm_wb.h"
 #include "vauth/vauth.h"
 #include "url.h"
-#include "curl_printf.h"
 
 #if defined(USE_NSS)
 #include "vtls/nssg.h"
@@ -48,7 +47,8 @@
 #include "curl_sspi.h"
 #endif
 
-/* The last #include files should be: */
+/* The last 3 #include files should be in this order */
+#include "curl_printf.h"
 #include "curl_memory.h"
 #include "memdebug.h"
 
index 676f0cb5de75e4845dc82b053a4dc26767fe9628..814c572f6f7e63301a175e8d3b50e32fd9af77d2 100644 (file)
 #include "progress.h"
 #include "non-ascii.h"
 #include "connect.h"
-#include "curl_printf.h"
 #include "curlx.h"
 
+/* The last 3 #include files should be in this order */
+#include "curl_printf.h"
 #include "curl_memory.h"
-/* The last #include file should be: */
 #include "memdebug.h"
 
 CURLcode Curl_proxy_connect(struct connectdata *conn)
index 63bea541d79ec357e184c4a36b9ff14fecea3ab1..2f92b2def5c55d7d57fbd5aed8a1964b1193086a 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
 #include "inet_ntop.h"
 #include "strequal.h"
 #include "if2ip.h"
+/* The last 3 #include files should be in this order */
 #include "curl_printf.h"
-
 #include "curl_memory.h"
-/* The last #include file should be: */
 #include "memdebug.h"
 
 /* ------------------------------------------------------------------ */
index 89f0499d11a34209d8c167ce2f4a0d230c3f64b5..16ba402ca70b8b54ae0d6c06d0087a8260619eda 100644 (file)
 #include "rawstr.h"
 #include "curl_sasl.h"
 #include "warnless.h"
-#include "curl_printf.h"
 
+/* The last 3 #include files should be in this order */
+#include "curl_printf.h"
 #include "curl_memory.h"
-/* The last #include file should be: */
 #include "memdebug.h"
 
 /* Local API functions */
index da9a3ab43a37cf3426f00be4b804812e008c51b7..416005c0344d40597ad25ddb709f1c318b95c854 100644 (file)
@@ -32,9 +32,8 @@
 #include <arpa/inet.h>
 #endif
 
-#include "curl_printf.h"
-
 #include "inet_ntop.h"
+#include "curl_printf.h"
 
 #define IN6ADDRSZ       16
 #define INADDRSZ         4
@@ -57,10 +56,10 @@ static char *inet_ntop4 (const unsigned char *src, char *dst, size_t size)
 
   tmp[0] = '\0';
   (void)snprintf(tmp, sizeof(tmp), "%d.%d.%d.%d",
-          ((int)((unsigned char)src[0])) & 0xff,
-          ((int)((unsigned char)src[1])) & 0xff,
-          ((int)((unsigned char)src[2])) & 0xff,
-          ((int)((unsigned char)src[3])) & 0xff);
+                 ((int)((unsigned char)src[0])) & 0xff,
+                 ((int)((unsigned char)src[1])) & 0xff,
+                 ((int)((unsigned char)src[2])) & 0xff,
+                 ((int)((unsigned char)src[3])) & 0xff);
 
   len = strlen(tmp);
   if(len == 0 || len >= size) {
index 992da54561e296b4eda8d90d0d0ed742ead75f62..0b146e06bba541bd5b5c0776c0f0cf202c777aaa 100644 (file)
@@ -47,9 +47,9 @@
 #include "sendf.h"
 #include "curl_sec.h"
 #include "warnless.h"
-#include "curl_printf.h"
 
-/* The last #include files should be: */
+/* The last 3 #include files should be in this order */
+#include "curl_printf.h"
 #include "curl_memory.h"
 #include "memdebug.h"
 
index d355a6676f87ac2c7869cc0d6d3d107f5ec64c19..1f1f72fba4cfa2851ab3c48f36ea664b6e759052 100644 (file)
@@ -76,9 +76,8 @@
 #include "curl_base64.h"
 #include "rawstr.h"
 #include "connect.h"
+/* The last 3 #include files should be in this order */
 #include "curl_printf.h"
-
-/* The last #include files should be: */
 #include "curl_memory.h"
 #include "memdebug.h"
 
index 804b5fa347fea1393ae7a36c2778afc2a7430aa9..1618bbaf31d3f02bdafdd4735c2a8bbc56196390 100644 (file)
 
 #include <curl/curl.h>
 
-#include "curl_printf.h"
 #include "urldata.h"
 
 #define MEMDEBUG_NODEFINES /* don't redefine the standard functions */
+
+/* The last 3 #include files should be in this order */
+#include "curl_printf.h"
 #include "curl_memory.h"
 #include "memdebug.h"
 
index 1184482f2c208ca73b9c8db22e50f3d1838b48a7..ffc422c40af1a2d8f21d2415a293ab84f8999207 100644 (file)
@@ -42,9 +42,9 @@
 #include "multihandle.h"
 #include "pipeline.h"
 #include "sigpipe.h"
+/* The last 3 #include files should be in this order */
 #include "curl_printf.h"
 #include "curl_memory.h"
-/* The last #include file should be: */
 #include "memdebug.h"
 
 /*
index 541310e2bee646f5b9d1c1d8c3b4e7164af3bf0e..46f427a2b36cae60b9bd00f132ac982f6e5985e5 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -32,9 +32,9 @@
 #include "strequal.h"
 #include "strtok.h"
 #include "rawstr.h"
-#include "curl_printf.h"
 
-/* The last #include files should be: */
+/* The last 3 #include files should be in this order */
+#include "curl_printf.h"
 #include "curl_memory.h"
 #include "memdebug.h"
 
index 7241bb90665a63ec882b2451944e666ed6ade536..01567acd1d8c39d15a3426643ebbe450c0fdb50f 100644 (file)
@@ -6,7 +6,7 @@
  *                 \___|\___/|_| \_\_____|
  *
  * Copyright (C) 2010, Howard Chu, <hyc@openldap.org>
- * Copyright (C) 2011 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2011 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -46,9 +46,8 @@
 #include "curl_ldap.h"
 #include "curl_base64.h"
 #include "connect.h"
+/* The last 3 #include files should be in this order */
 #include "curl_printf.h"
-
-/* The last #include files should be: */
 #include "curl_memory.h"
 #include "memdebug.h"
 
index 2aecf4e8a3b0b429bde1a8908d7b91b49c1cecc7..ce2b58612fa4a79fc14cd26e765ca8a870931797 100644 (file)
 #include "multiif.h"
 #include "non-ascii.h"
 #include "vtls/vtls.h"
-#include "curl_printf.h"
 
+/* The last 3 #include files should be in this order */
+#include "curl_printf.h"
 #include "curl_memory.h"
-/* The last #include file should be: */
 #include "memdebug.h"
 
 #ifdef USE_PINGPONG
index 0c2446dedd54327db9f7d7ab670fc0e5dcd69208..a6b2c3f75bec861d0451b21642f9a6b6a0255989 100644 (file)
@@ -83,9 +83,9 @@
 #include "curl_sasl.h"
 #include "curl_md5.h"
 #include "warnless.h"
+/* The last 3 #include files should be in this order */
 #include "curl_printf.h"
 #include "curl_memory.h"
-/* The last #include file should be: */
 #include "memdebug.h"
 
 /* Local API functions */
index 24bf801d90456e95132f61271450d7fef2c7a63b..5cb1044880293053d56b924e6b69e42eb071d2bf 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -36,9 +36,8 @@
 #include "rawstr.h"
 #include "select.h"
 #include "connect.h"
+/* The last 3 #include files should be in this order */
 #include "curl_printf.h"
-
-/* The last #include files should be: */
 #include "curl_memory.h"
 #include "memdebug.h"
 
index 23bcfa2c983e7b0b5fef82c916c2c2234368c94f..22f3bf27cc2b8e4dd3fa59d743214800a1bf0138 100644 (file)
 #include "ssh.h"
 #include "multiif.h"
 #include "non-ascii.h"
-#include "curl_printf.h"
 #include "strerror.h"
 #include "select.h"
 
-/* The last #include files should be: */
+/* The last 3 #include files should be in this order */
+#include "curl_printf.h"
 #include "curl_memory.h"
 #include "memdebug.h"
 
index ed4c046ce3a40d923ab3f88314b427860088b57c..83eb1d6231553a3fe9091ca0ca395994a4dafaeb 100644 (file)
@@ -82,9 +82,9 @@
 #include "curl_gethostname.h"
 #include "curl_sasl.h"
 #include "warnless.h"
+/* The last 3 #include files should be in this order */
 #include "curl_printf.h"
 #include "curl_memory.h"
-/* The last #include file should be: */
 #include "memdebug.h"
 
 /* Local API functions */
index e3fc260cb030180b6dbcdd92e34ababd8bbf6c34..1214048bf139617f890c35068fa5eba67cbca7d7 100644 (file)
@@ -6,7 +6,7 @@
  *                             \___|\___/|_| \_\_____|
  *
  * Copyright (C) 2009, 2011, Markus Moeller, <markus_moeller@compuserve.com>
- * Copyright (C) 2012 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2012 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
 #include "timeval.h"
 #include "socks.h"
 #include "warnless.h"
+
+/* The last 3 #include files should be in this order */
 #include "curl_printf.h"
 #include "curl_memory.h"
-/* The last #include file should be: */
 #include "memdebug.h"
 
 static gss_ctx_id_t gss_context = GSS_C_NO_CONTEXT;
index c5f25b66f9cfbe07d4b20692f120ed6bf1e1deff..ec564b488317282ef254135a4391d68313f53a27 100644 (file)
@@ -34,9 +34,9 @@
 #include "curl_sspi.h"
 #include "curl_multibyte.h"
 #include "warnless.h"
+/* The last 3 #include files should be in this order */
 #include "curl_printf.h"
 #include "curl_memory.h"
-/* The last #include file should be: */
 #include "memdebug.h"
 
 /*
index da19bf3dc15b48fbca8f55a266eea41a4d1aea72..50a72ac6ee42d32c02186f6681297460513ca949 100644 (file)
--- a/lib/ssh.c
+++ b/lib/ssh.c
 #include "multiif.h"
 #include "select.h"
 #include "warnless.h"
+
+/* The last 3 #include files should be in this order */
 #include "curl_printf.h"
 #include "curl_memory.h"
-/* The last #include file should be: */
 #include "memdebug.h"
 
 #ifdef WIN32
index ac616f2c873198285c4021fbb30aebb5a96d7e15..0e268d5e3f6e3d911a11ded29a9a2ca7022ad9c0 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2004 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2004 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -44,9 +44,9 @@
 #endif
 
 #include "strerror.h"
+/* The last 3 #include files should be in this order */
 #include "curl_printf.h"
 #include "curl_memory.h"
-/* The last #include file should be: */
 #include "memdebug.h"
 
 const char *
index 068470b93a3bcefda12df47db2cd3b3f05bb72d0..6b73bc5bd3120b1e244fd00929e73c3d9ef6c5cb 100644 (file)
@@ -51,7 +51,6 @@
 #include "telnet.h"
 #include "connect.h"
 #include "progress.h"
-#include "curl_printf.h"
 
 #define  TELOPTS
 #define  TELCMDS
@@ -62,7 +61,8 @@
 #include "rawstr.h"
 #include "warnless.h"
 
-/* The last #include files should be: */
+/* The last 3 #include files should be in this order */
+#include "curl_printf.h"
 #include "curl_memory.h"
 #include "memdebug.h"
 
index 975ef2faf8250a57ee4d36a5de745f5ee2f0b74f..3c3eb5e11d5d5a6d0e034c5f931a0d7d63e91409 100644 (file)
 #include "url.h"
 #include "rawstr.h"
 #include "speedcheck.h"
-#include "curl_printf.h"
 #include "select.h"
 
-/* The last #include files should be: */
+/* The last 3 #include files should be in this order */
+#include "curl_printf.h"
 #include "curl_memory.h"
 #include "memdebug.h"
 
index 11f9df38f586333b4c8a4baf93a8abce18f2c077..5b22003dcbb73aaabb90c016b9e59a253d286f2d 100644 (file)
@@ -75,9 +75,9 @@
 #include "multiif.h"
 #include "connect.h"
 #include "non-ascii.h"
-#include "curl_printf.h"
 
-/* The last #include files should be: */
+/* The last 3 #include files should be in this order */
+#include "curl_printf.h"
 #include "curl_memory.h"
 #include "memdebug.h"
 
index 1251373c3001e1bd8b0b1766c5d09d1645fd55f2..feffb7fb440c0427bb3812ef2ef00f54e7cd0146 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -130,9 +130,9 @@ bool curl_win32_idn_to_ascii(const char *in, char **out);
 #include "pipeline.h"
 #include "dotdot.h"
 #include "strdup.h"
+/* The last 3 #include files should be in this order */
 #include "curl_printf.h"
 #include "curl_memory.h"
-/* The last #include file should be: */
 #include "memdebug.h"
 
 /* Local static prototypes */
index 21630730440f74df2aed8f9653b60081df924ac9..dbbe45f6fb1ee9abd74fbb5c874d4d8a8250724b 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -25,9 +25,9 @@
 #include "wildcard.h"
 #include "llist.h"
 #include "fileinfo.h"
+/* The last 3 #include files should be in this order */
 #include "curl_printf.h"
 #include "curl_memory.h"
-/* The last #include file should be: */
 #include "memdebug.h"
 
 CURLcode Curl_wildcard_init(struct WildcardData *wc)
index dbe57c7b7f76cdb780c525b0971185b4db7c47c0..c221ba075accaf7550a2ffba6164f2e9c2ac0e46 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
 #include "inet_pton.h"
 #include "curl_base64.h"
 #include "x509asn1.h"
+
+/* The last 3 #include files should be in this order */
 #include "curl_printf.h"
 #include "curl_memory.h"
-/* The last #include file should be: */
 #include "memdebug.h"
 
 
index 2ff06b19d2be55547e7588049493afbe72c21b54..b9c43de047f471a58ef4712c3b7e47d725c0686c 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -20,7 +20,7 @@
  *
  ***************************************************************************/
 #include "curl_setup.h"
-
+#include <curl/curl.h>
 #include "testutil.h"
 #include "memdebug.h"