1Upstream-Status: Submitted [https://github.com/probonopd/zsync-curl/pull/41]
2Signed-off-by: Ross Burton <ross.burton@arm.com>
3
4diff --git a/src/configure.ac b/src/configure.ac
5index 10de8c4..6488140 100644
6--- a/src/configure.ac
7+++ b/src/configure.ac
8@@ -9,7 +9,6 @@ AC_CONFIG_MACRO_DIR([autotools])
9 AC_CANONICAL_HOST
10
11 AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip foreign check-news -Woverride -Wobsolete -Wportability -Wsyntax -Wunsupported])
12-AM_MAINTAINER_MODE
13
14 dnl --- Check for programs
15 AC_PROG_CC
16@@ -23,6 +22,7 @@ AS_IF([test "x$enable_profile" = "xyes"], [
17    ZS_CFLAGS="${ZS_CFLAGS} -pg" ])
18
19 dnl --- Header files, typedefs, structures, libraries
20+AC_USE_SYSTEM_EXTENSIONS
21 AC_C_CONST
22 AC_HEADER_STDC
23 # string.h, memory.h, stdlib.h both included in the default header checks
24@@ -55,10 +55,6 @@ case $host_os in
25        host_os_mingw32=yes
26        LIBS="${LIBS} -lwsock32"
27        ;;
28-   *)
29-       AC_DEFINE([_XOPEN_SOURCE], 600, [Enable POSIX extensions if present])
30-       AC_DEFINE([_BSD_SOURCE],1, [Enable BSD extensions if present])
31-       ;;
32 esac
33 AM_CONDITIONAL([MINGW32], test "x$host_os_mingw32" = "xyes")
34
35diff --git a/src/librcksum/Makefile.am b/src/librcksum/Makefile.am
36index f4fce72..47754eb 100644
37--- a/src/librcksum/Makefile.am
38+++ b/src/librcksum/Makefile.am
39@@ -1,4 +1,4 @@
40-
41+AM_CPPFLAGS = "-I$(top_srcdir)"
42
43 noinst_LIBRARIES = librcksum.a
44
45diff --git a/src/librcksum/md4.h b/src/librcksum/md4.h
46index e90603a..0ed7485 100644
47--- a/src/librcksum/md4.h
48+++ b/src/librcksum/md4.h
49@@ -18,11 +18,8 @@
50
51 #include "zsglobal.h"
52
53-#ifdef HAVE_INTTYPES_H
54-#include <inttypes.h>
55-#else
56+#include <stdint.h>
57 #include <sys/types.h>
58-#endif
59
60 #define	MD4_BLOCK_LENGTH		64
61 #define	MD4_DIGEST_LENGTH		16
62diff --git a/src/libzsync/Makefile.am b/src/libzsync/Makefile.am
63index 0a6ae85..33a5951 100644
64--- a/src/libzsync/Makefile.am
65+++ b/src/libzsync/Makefile.am
66@@ -1,3 +1,4 @@
67+AM_CPPFLAGS = "-I$(top_srcdir)"
68
69 noinst_LIBRARIES = libzsync.a
70
71diff --git a/src/libzsync/sha1.h b/src/libzsync/sha1.h
72index 3946505..87f3794 100644
73--- a/src/libzsync/sha1.h
74+++ b/src/libzsync/sha1.h
75@@ -11,11 +11,8 @@
76
77 #include "config.h"
78
79-#ifdef HAVE_INTTYPES_H
80-#include <inttypes.h>
81-#else
82+#include <stdint.h>
83 #include <sys/types.h>
84-#endif
85
86 #define	SHA1_BLOCK_LENGTH		64
87 #define	SHA1_DIGEST_LENGTH		20
88diff --git a/src/libzsync/zmap.c b/src/libzsync/zmap.c
89index f052dba..030b2a5 100644
90--- a/src/libzsync/zmap.c
91+++ b/src/libzsync/zmap.c
92@@ -28,9 +28,6 @@
93 #include <string.h>
94 #include <sys/types.h>
95 #include <arpa/inet.h>
96-#ifdef HAVE_INTTYPES_H
97-#include <inttypes.h>
98-#endif
99
100 #ifdef WITH_DMALLOC
101 # include <dmalloc.h>
102diff --git a/src/make.c b/src/make.c
103index 191b527..ba7f3a9 100644
104--- a/src/make.c
105+++ b/src/make.c
106@@ -28,9 +28,6 @@
107 #include <time.h>
108
109 #include <arpa/inet.h>
110-#ifdef HAVE_INTTYPES_H
111-#include <inttypes.h>
112-#endif
113
114 #include <sys/types.h>
115 #include <sys/stat.h>
116