diff options
author | josh.macdonald@gmail.com <josh.macdonald@gmail.com@a3eca27d-f21b-0410-9b4a-6511e771f64e> | 2012-07-15 22:16:58 +0000 |
---|---|---|
committer | josh.macdonald@gmail.com <josh.macdonald@gmail.com@a3eca27d-f21b-0410-9b4a-6511e771f64e> | 2012-07-15 22:16:58 +0000 |
commit | 505be6b4cc8c142d4098f8c050e3c1075e1caf24 (patch) | |
tree | 10def4dea1bd9c7d9f5cdad5dd2d076fda05e835 | |
parent | 7fab5abad768eed704ed7819567598b88228e790 (diff) |
Compiles on gcc-4.6
-rw-r--r-- | xdelta3/Makefile.am | 2 | ||||
l--------- | xdelta3/ltmain.sh | 2 | ||||
l--------- | xdelta3/m4/libtool.m4 | 2 | ||||
l--------- | xdelta3/m4/ltoptions.m4 | 2 | ||||
l--------- | xdelta3/m4/ltsugar.m4 | 2 | ||||
l--------- | xdelta3/m4/ltversion.m4 | 2 | ||||
l--------- | xdelta3/m4/lt~obsolete.m4 | 2 | ||||
-rw-r--r-- | xdelta3/testing/test.h | 3 | ||||
-rw-r--r-- | xdelta3/xdelta3-internal.h | 13 | ||||
-rw-r--r-- | xdelta3/xdelta3-main.h | 2 | ||||
-rw-r--r-- | xdelta3/xdelta3-test.h | 2 | ||||
-rw-r--r-- | xdelta3/xdelta3.c | 15 | ||||
-rw-r--r-- | xdelta3/xdelta3.h | 6 |
13 files changed, 22 insertions, 33 deletions
diff --git a/xdelta3/Makefile.am b/xdelta3/Makefile.am index a40a993..0f1720d 100644 --- a/xdelta3/Makefile.am +++ b/xdelta3/Makefile.am | |||
@@ -44,9 +44,11 @@ common_CFLAGS = \ | |||
44 | -DXD3_MAIN=1 | 44 | -DXD3_MAIN=1 |
45 | 45 | ||
46 | xdelta3_CFLAGS = $(WFLAGS) $(common_CFLAGS) -pedantic -std=c99 | 46 | xdelta3_CFLAGS = $(WFLAGS) $(common_CFLAGS) -pedantic -std=c99 |
47 | xdelta3_LDFLAGS = -lm | ||
47 | 48 | ||
48 | xdelta3regtest_CXXFLAGS = $(WFLAGS) $(common_CFLAGS) -DNOT_MAIN=1 -DXD3_DEBUG=1 | 49 | xdelta3regtest_CXXFLAGS = $(WFLAGS) $(common_CFLAGS) -DNOT_MAIN=1 -DXD3_DEBUG=1 |
49 | xdelta3regtest_CFLAGS = $(WFLAGS) $(common_CFLAGS) -DNOT_MAIN=1 -DXD3_DEBUG=1 | 50 | xdelta3regtest_CFLAGS = $(WFLAGS) $(common_CFLAGS) -DNOT_MAIN=1 -DXD3_DEBUG=1 |
51 | xdelta3regtest_LDFLAGS = -lm | ||
50 | 52 | ||
51 | man1_MANS = xdelta3.1 | 53 | man1_MANS = xdelta3.1 |
52 | 54 | ||
diff --git a/xdelta3/ltmain.sh b/xdelta3/ltmain.sh index 377d47b..4159958 120000 --- a/xdelta3/ltmain.sh +++ b/xdelta3/ltmain.sh | |||
@@ -1 +1 @@ | |||
/usr/local/share/libtool/config/ltmain.sh \ No newline at end of file | /usr/share/libtool/config/ltmain.sh \ No newline at end of file | ||
diff --git a/xdelta3/m4/libtool.m4 b/xdelta3/m4/libtool.m4 index d099988..f3504e9 120000 --- a/xdelta3/m4/libtool.m4 +++ b/xdelta3/m4/libtool.m4 | |||
@@ -1 +1 @@ | |||
/usr/local/share/aclocal/libtool.m4 \ No newline at end of file | /usr/share/aclocal/libtool.m4 \ No newline at end of file | ||
diff --git a/xdelta3/m4/ltoptions.m4 b/xdelta3/m4/ltoptions.m4 index 981b657..b81279e 120000 --- a/xdelta3/m4/ltoptions.m4 +++ b/xdelta3/m4/ltoptions.m4 | |||
@@ -1 +1 @@ | |||
/usr/local/share/aclocal/ltoptions.m4 \ No newline at end of file | /usr/share/aclocal/ltoptions.m4 \ No newline at end of file | ||
diff --git a/xdelta3/m4/ltsugar.m4 b/xdelta3/m4/ltsugar.m4 index 4953fb3..4d76cc7 120000 --- a/xdelta3/m4/ltsugar.m4 +++ b/xdelta3/m4/ltsugar.m4 | |||
@@ -1 +1 @@ | |||
/usr/local/share/aclocal/ltsugar.m4 \ No newline at end of file | /usr/share/aclocal/ltsugar.m4 \ No newline at end of file | ||
diff --git a/xdelta3/m4/ltversion.m4 b/xdelta3/m4/ltversion.m4 index f5bd471..5eb474f 120000 --- a/xdelta3/m4/ltversion.m4 +++ b/xdelta3/m4/ltversion.m4 | |||
@@ -1 +1 @@ | |||
/usr/local/share/aclocal/ltversion.m4 \ No newline at end of file | /usr/share/aclocal/ltversion.m4 \ No newline at end of file | ||
diff --git a/xdelta3/m4/lt~obsolete.m4 b/xdelta3/m4/lt~obsolete.m4 index 0d3c537..de0b9f9 120000 --- a/xdelta3/m4/lt~obsolete.m4 +++ b/xdelta3/m4/lt~obsolete.m4 | |||
@@ -1 +1 @@ | |||
/usr/local/share/aclocal/lt~obsolete.m4 \ No newline at end of file | /usr/share/aclocal/lt~obsolete.m4 \ No newline at end of file | ||
diff --git a/xdelta3/testing/test.h b/xdelta3/testing/test.h index 5b7eff9..f7c2ced 100644 --- a/xdelta3/testing/test.h +++ b/xdelta3/testing/test.h | |||
@@ -57,9 +57,6 @@ using std::ostream; | |||
57 | using std::map; | 57 | using std::map; |
58 | using std::pair; | 58 | using std::pair; |
59 | 59 | ||
60 | #include <ext/hash_map> | ||
61 | using __gnu_cxx::hash_map; | ||
62 | |||
63 | #include <list> | 60 | #include <list> |
64 | using std::list; | 61 | using std::list; |
65 | 62 | ||
diff --git a/xdelta3/xdelta3-internal.h b/xdelta3/xdelta3-internal.h index 9a728ff..10ecb38 100644 --- a/xdelta3/xdelta3-internal.h +++ b/xdelta3/xdelta3-internal.h | |||
@@ -18,12 +18,7 @@ | |||
18 | #ifndef XDELTA3_INTERNAL_H__ | 18 | #ifndef XDELTA3_INTERNAL_H__ |
19 | #define XDELTA3_INTERNAL_H__ | 19 | #define XDELTA3_INTERNAL_H__ |
20 | 20 | ||
21 | #include <stdio.h> | 21 | #include "xdelta3.h" |
22 | #include <stdlib.h> | ||
23 | #include <stdarg.h> | ||
24 | |||
25 | #ifndef _XDELTA3_INTERNAL_H_ | ||
26 | #define _XDELTA3_INTERNAL_H_ | ||
27 | 22 | ||
28 | typedef struct _main_file main_file; | 23 | typedef struct _main_file main_file; |
29 | typedef struct _main_extcomp main_extcomp; | 24 | typedef struct _main_extcomp main_extcomp; |
@@ -136,6 +131,12 @@ void xprintf(const char *fmt, ...) PRINTF_ATTRIBUTE(1,2); | |||
136 | #define NT "xdelta3: " | 131 | #define NT "xdelta3: " |
137 | #define NTR "" | 132 | #define NTR "" |
138 | 133 | ||
134 | #ifndef UINT32_MAX | ||
135 | #define UINT32_MAX 4294967295U | ||
136 | #endif | ||
137 | |||
138 | #ifndef UINT64_MAX | ||
139 | #define UINT64_MAX 18446744073709551615ULL | ||
139 | #endif | 140 | #endif |
140 | 141 | ||
141 | #endif // XDELTA3_INTERNAL_H__ | 142 | #endif // XDELTA3_INTERNAL_H__ |
diff --git a/xdelta3/xdelta3-main.h b/xdelta3/xdelta3-main.h index c853f4a..0c01092 100644 --- a/xdelta3/xdelta3-main.h +++ b/xdelta3/xdelta3-main.h | |||
@@ -3601,7 +3601,6 @@ int main (int argc, char **argv) | |||
3601 | s = strchr (flags, ret); | 3601 | s = strchr (flags, ret); |
3602 | if (s && s[1] && s[1] == ':') | 3602 | if (s && s[1] && s[1] == ':') |
3603 | { | 3603 | { |
3604 | int eqcase = 0; | ||
3605 | int option = s[2] && s[2] == ':'; | 3604 | int option = s[2] && s[2] == ':'; |
3606 | 3605 | ||
3607 | /* Case 1, set optarg to the remaining characters. */ | 3606 | /* Case 1, set optarg to the remaining characters. */ |
@@ -3638,7 +3637,6 @@ int main (int argc, char **argv) | |||
3638 | { | 3637 | { |
3639 | /* Remove the = in all cases. */ | 3638 | /* Remove the = in all cases. */ |
3640 | my_optarg += 1; | 3639 | my_optarg += 1; |
3641 | eqcase = 1; | ||
3642 | 3640 | ||
3643 | if (option && *my_optarg == 0) | 3641 | if (option && *my_optarg == 0) |
3644 | { | 3642 | { |
diff --git a/xdelta3/xdelta3-test.h b/xdelta3/xdelta3-test.h index 63b7978..bd04f56 100644 --- a/xdelta3/xdelta3-test.h +++ b/xdelta3/xdelta3-test.h | |||
@@ -2369,7 +2369,6 @@ test_identical_behavior (xd3_stream *stream, int ignore) | |||
2369 | xd3_source source; | 2369 | xd3_source source; |
2370 | int nextencwin = 0; | 2370 | int nextencwin = 0; |
2371 | int winstarts = 0, winfinishes = 0; | 2371 | int winstarts = 0, winfinishes = 0; |
2372 | xoff_t srcwin = XOFF_T_MAX; | ||
2373 | usize_t delpos = 0, recsize; | 2372 | usize_t delpos = 0, recsize; |
2374 | xd3_config config; | 2373 | xd3_config config; |
2375 | memset(&source, 0, sizeof(source)); | 2374 | memset(&source, 0, sizeof(source)); |
@@ -2405,7 +2404,6 @@ test_identical_behavior (xd3_stream *stream, int ignore) | |||
2405 | source.curblkno = source.getblkno; | 2404 | source.curblkno = source.getblkno; |
2406 | source.onblk = IDB_BLKSZ; | 2405 | source.onblk = IDB_BLKSZ; |
2407 | source.curblk = buf + source.getblkno * IDB_BLKSZ; | 2406 | source.curblk = buf + source.getblkno * IDB_BLKSZ; |
2408 | srcwin = source.getblkno; | ||
2409 | continue; | 2407 | continue; |
2410 | } | 2408 | } |
2411 | 2409 | ||
diff --git a/xdelta3/xdelta3.c b/xdelta3/xdelta3.c index 6a041d5..9d9e52c 100644 --- a/xdelta3/xdelta3.c +++ b/xdelta3/xdelta3.c | |||
@@ -264,9 +264,6 @@ | |||
264 | #ifndef __XDELTA3_C_HEADER_PASS__ | 264 | #ifndef __XDELTA3_C_HEADER_PASS__ |
265 | #define __XDELTA3_C_HEADER_PASS__ | 265 | #define __XDELTA3_C_HEADER_PASS__ |
266 | 266 | ||
267 | #include <errno.h> | ||
268 | #include <string.h> | ||
269 | |||
270 | #include "xdelta3.h" | 267 | #include "xdelta3.h" |
271 | 268 | ||
272 | /*********************************************************************** | 269 | /*********************************************************************** |
@@ -570,14 +567,6 @@ static int xd3_selftest (void); | |||
570 | #define UINT32_OFLOW_MASK 0xfe000000U | 567 | #define UINT32_OFLOW_MASK 0xfe000000U |
571 | #define UINT64_OFLOW_MASK 0xfe00000000000000ULL | 568 | #define UINT64_OFLOW_MASK 0xfe00000000000000ULL |
572 | 569 | ||
573 | #ifndef UINT32_MAX | ||
574 | #define UINT32_MAX 4294967295U | ||
575 | #endif | ||
576 | |||
577 | #ifndef UINT64_MAX | ||
578 | #define UINT64_MAX 18446744073709551615ULL | ||
579 | #endif | ||
580 | |||
581 | #if SIZEOF_USIZE_T == 4 | 570 | #if SIZEOF_USIZE_T == 4 |
582 | #define USIZE_T_MAX UINT32_MAX | 571 | #define USIZE_T_MAX UINT32_MAX |
583 | #define xd3_decode_size xd3_decode_uint32_t | 572 | #define xd3_decode_size xd3_decode_uint32_t |
@@ -2623,10 +2612,8 @@ xd3_set_source (xd3_stream *stream, | |||
2623 | * calculations are cheap. */ | 2612 | * calculations are cheap. */ |
2624 | if (!xd3_check_pow2 (src->blksize, &shiftby) == 0) | 2613 | if (!xd3_check_pow2 (src->blksize, &shiftby) == 0) |
2625 | { | 2614 | { |
2626 | int check; | ||
2627 | src->blksize = xd3_pow2_roundup(src->blksize); | 2615 | src->blksize = xd3_pow2_roundup(src->blksize); |
2628 | check = xd3_check_pow2 (src->blksize, &shiftby); | 2616 | xd3_check_pow2 (src->blksize, &shiftby); |
2629 | XD3_ASSERT (check == 0); | ||
2630 | IF_DEBUG1 (DP(RINT "raising srcblksz to %u\n", src->blksize)); | 2617 | IF_DEBUG1 (DP(RINT "raising srcblksz to %u\n", src->blksize)); |
2631 | } | 2618 | } |
2632 | 2619 | ||
diff --git a/xdelta3/xdelta3.h b/xdelta3/xdelta3.h index b31cbe9..1a4f838 100644 --- a/xdelta3/xdelta3.h +++ b/xdelta3/xdelta3.h | |||
@@ -25,7 +25,13 @@ | |||
25 | #ifndef _XDELTA3_H_ | 25 | #ifndef _XDELTA3_H_ |
26 | #define _XDELTA3_H_ | 26 | #define _XDELTA3_H_ |
27 | 27 | ||
28 | #define _POSIX_SOURCE | ||
29 | #define _ISOC99_SOURCE | ||
30 | |||
31 | #include <errno.h> | ||
32 | #include <stdarg.h> | ||
28 | #include <stddef.h> | 33 | #include <stddef.h> |
34 | #include <stdio.h> | ||
29 | #include <stdlib.h> | 35 | #include <stdlib.h> |
30 | #include <string.h> | 36 | #include <string.h> |
31 | #include <sys/types.h> | 37 | #include <sys/types.h> |