g10,tools: Fix bzlib.h include order.
authorNIIBE Yutaka <gniibe@fsij.org>
Tue, 11 Apr 2017 04:52:19 +0000 (13:52 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Tue, 11 Apr 2017 04:52:19 +0000 (13:52 +0900)
* g10/compress-bz2.c: Include bzlib.h after gcrypt.h.
* tools/gpgsplit.c: Likewise.

--

bzlib.h may include windows.h on Windows.  It is better
after gcrypt.h which may include winsock2.h.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
g10/compress-bz2.c
tools/gpgsplit.c

index 4adca9b..45aa40d 100644 (file)
 #include <config.h>
 #include <string.h>
 #include <stdio.h> /* Early versions of bzlib (1.0) require stdio.h */
-#include <bzlib.h>
 
 #include "gpg.h"
 #include "../common/util.h"
+#include <bzlib.h>
+
 #include "packet.h"
 #include "filter.h"
 #include "main.h"
index ce2777d..b9787b1 100644 (file)
@@ -32,9 +32,6 @@
 #ifdef HAVE_ZIP
 # include <zlib.h>
 #endif
-#ifdef HAVE_BZIP2
-# include <bzlib.h>
-#endif /* HAVE_BZIP2 */
 #if defined(__riscos__) && defined(USE_ZLIBRISCOS)
 # include "zlib-riscos.h"
 #endif
 #include "../common/util.h"
 #include "../common/openpgpdefs.h"
 
+#ifdef HAVE_BZIP2
+# include <bzlib.h>
+#endif /* HAVE_BZIP2 */
+
 static int opt_verbose;
 static const char *opt_prefix = "";
 static int opt_uncompress;