diff options
Diffstat (limited to 'xdelta3')
-rw-r--r-- | xdelta3/Makefile.all | 40 | ||||
-rw-r--r-- | xdelta3/config.h.in | 9 | ||||
-rw-r--r-- | xdelta3/configure.ac | 7 | ||||
-rwxr-xr-x | xdelta3/run_release.sh | 2 | ||||
-rw-r--r-- | xdelta3/xdelta3-main.h | 17 | ||||
-rw-r--r-- | xdelta3/xdelta3.c | 2 | ||||
-rw-r--r-- | xdelta3/xdelta3.h | 2 |
7 files changed, 70 insertions, 9 deletions
diff --git a/xdelta3/Makefile.all b/xdelta3/Makefile.all new file mode 100644 index 0000000..c8e8cc0 --- /dev/null +++ b/xdelta3/Makefile.all | |||
@@ -0,0 +1,40 @@ | |||
1 | # -*- Mode: Makefile -*- | ||
2 | all: 32_32_32 32_32_64 32_64_64 64_32_32 64_32_64 64_64_64 | ||
3 | |||
4 | 32_32_32: | ||
5 | (cd ./build/m32/32size-32off && $(MAKE) all) | ||
6 | |||
7 | 32_32_64: | ||
8 | (cd ./build/m32/32size-64off && $(MAKE) all) | ||
9 | |||
10 | 32_64_64: | ||
11 | (cd ./build/m32/64size-64off && $(MAKE) all) | ||
12 | |||
13 | 64_32_32: | ||
14 | (cd ./build/m64/32size-32off && $(MAKE) all) | ||
15 | |||
16 | 64_32_64: | ||
17 | (cd ./build/m64/32size-64off && $(MAKE) all) | ||
18 | |||
19 | 64_64_64: | ||
20 | (cd ./build/m64/64size-64off && $(MAKE) all) | ||
21 | |||
22 | clean: 32_32_32_clean 32_32_64_clean 32_64_64_clean 64_32_32_clean 64_32_64_clean 64_64_64_clean | ||
23 | |||
24 | 32_32_32_clean: | ||
25 | (cd ./build/m32/32size-32off && $(MAKE) clean) | ||
26 | |||
27 | 32_32_64_clean: | ||
28 | (cd ./build/m32/32size-64off && $(MAKE) clean) | ||
29 | |||
30 | 32_64_64_clean: | ||
31 | (cd ./build/m32/64size-64off && $(MAKE) clean) | ||
32 | |||
33 | 64_32_32_clean: | ||
34 | (cd ./build/m64/32size-32off && $(MAKE) clean) | ||
35 | |||
36 | 64_32_64_clean: | ||
37 | (cd ./build/m64/32size-64off && $(MAKE) clean) | ||
38 | |||
39 | 64_64_64_clean: | ||
40 | (cd ./build/m64/64size-64off && $(MAKE) clean) | ||
diff --git a/xdelta3/config.h.in b/xdelta3/config.h.in index 70bb1c2..6607403 100644 --- a/xdelta3/config.h.in +++ b/xdelta3/config.h.in | |||
@@ -61,6 +61,15 @@ | |||
61 | /* Define to the version of this package. */ | 61 | /* Define to the version of this package. */ |
62 | #undef PACKAGE_VERSION | 62 | #undef PACKAGE_VERSION |
63 | 63 | ||
64 | /* The size of `int', as computed by sizeof. */ | ||
65 | #undef SIZEOF_INT | ||
66 | |||
67 | /* The size of `long', as computed by sizeof. */ | ||
68 | #undef SIZEOF_LONG | ||
69 | |||
70 | /* The size of `long long', as computed by sizeof. */ | ||
71 | #undef SIZEOF_LONG_LONG | ||
72 | |||
64 | /* The size of `size_t', as computed by sizeof. */ | 73 | /* The size of `size_t', as computed by sizeof. */ |
65 | #undef SIZEOF_SIZE_T | 74 | #undef SIZEOF_SIZE_T |
66 | 75 | ||
diff --git a/xdelta3/configure.ac b/xdelta3/configure.ac index 3b430d7..313e48b 100644 --- a/xdelta3/configure.ac +++ b/xdelta3/configure.ac | |||
@@ -8,9 +8,13 @@ AM_INIT_AUTOMAKE([1.9 no-define foreign tar-ustar]) | |||
8 | AX_CHECK_ALIGNED_ACCESS_REQUIRED | 8 | AX_CHECK_ALIGNED_ACCESS_REQUIRED |
9 | AC_PROG_CC | 9 | AC_PROG_CC |
10 | AC_PROG_CXX | 10 | AC_PROG_CXX |
11 | AC_CHECK_SIZEOF(size_t) | ||
12 | AC_CHECK_SIZEOF(int) | ||
13 | AC_CHECK_SIZEOF(long) | ||
14 | AC_CHECK_SIZEOF(long long) | ||
11 | AC_CHECK_HEADERS([lzma.h]) | 15 | AC_CHECK_HEADERS([lzma.h]) |
12 | AC_CHECK_LIB(lzma, lzma_easy_buffer_encode) | 16 | AC_CHECK_LIB(lzma, lzma_easy_buffer_encode) |
13 | AC_CHECK_SIZEOF(size_t) | 17 | |
14 | #AM_PATH_PYTHON(,, [:]) | 18 | #AM_PATH_PYTHON(,, [:]) |
15 | #AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :]) | 19 | #AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :]) |
16 | #AX_PYTHON_DEVEL() | 20 | #AX_PYTHON_DEVEL() |
@@ -22,6 +26,7 @@ AC_ARG_ENABLE(debug-symbols, | |||
22 | AS_HELP_STRING(--enable-debug-symbols,[Build with debug symbols (default is NO)]),,enableval=no) | 26 | AS_HELP_STRING(--enable-debug-symbols,[Build with debug symbols (default is NO)]),,enableval=no) |
23 | AM_CONDITIONAL([DEBUG_SYMBOLS], [test ${enableval} = "yes"]) | 27 | AM_CONDITIONAL([DEBUG_SYMBOLS], [test ${enableval} = "yes"]) |
24 | 28 | ||
29 | |||
25 | AC_CONFIG_HEADERS([config.h]) | 30 | AC_CONFIG_HEADERS([config.h]) |
26 | AC_CONFIG_FILES([Makefile]) | 31 | AC_CONFIG_FILES([Makefile]) |
27 | AC_OUTPUT | 32 | AC_OUTPUT |
diff --git a/xdelta3/run_release.sh b/xdelta3/run_release.sh index 4266af4..fc06491 100755 --- a/xdelta3/run_release.sh +++ b/xdelta3/run_release.sh | |||
@@ -53,7 +53,7 @@ function buildit { | |||
53 | D=build/$MACH/${sizebits}size-${offsetbits}off | 53 | D=build/$MACH/${sizebits}size-${offsetbits}off |
54 | mkdir -p $D | 54 | mkdir -p $D |
55 | (cd $D && $SRCDIR/configure --prefix=$PWD/bin --enable-debug-symbols) | 55 | (cd $D && $SRCDIR/configure --prefix=$PWD/bin --enable-debug-symbols) |
56 | (cd $D && make xdelta3checksum) | 56 | #(cd $D && make all && make test) |
57 | } | 57 | } |
58 | 58 | ||
59 | function buildall { | 59 | function buildall { |
diff --git a/xdelta3/xdelta3-main.h b/xdelta3/xdelta3-main.h index 63ca51f..157a4fb 100644 --- a/xdelta3/xdelta3-main.h +++ b/xdelta3/xdelta3-main.h | |||
@@ -49,6 +49,8 @@ | |||
49 | 49 | ||
50 | /*********************************************************************/ | 50 | /*********************************************************************/ |
51 | 51 | ||
52 | #include <limits.h> | ||
53 | |||
52 | #ifndef XD3_POSIX | 54 | #ifndef XD3_POSIX |
53 | #define XD3_POSIX 0 | 55 | #define XD3_POSIX 0 |
54 | #endif | 56 | #endif |
@@ -669,14 +671,17 @@ main_strtoxoff (const char* s, xoff_t *xo, char which) | |||
669 | XD3_ASSERT(s && *s != 0); | 671 | XD3_ASSERT(s && *s != 0); |
670 | 672 | ||
671 | { | 673 | { |
672 | /* Should check LONG_MIN, LONG_MAX, LLONG_MIN, LLONG_MAX? */ | 674 | #if SIZEOF_XOFF_T == SIZEOF_LONG_LONG |
673 | #if SIZEOF_XOFF_T == 4 | 675 | unsigned long long xx = strtoull (s, &e, 0); |
674 | long xx = strtol (s, &e, 0); | 676 | unsigned long long bad = ULLONG_MAX; |
677 | #elif SIZEOF_XOFF_T <= SIZEOF_LONG | ||
678 | unsigned long xx = strtoul (s, &e, 0); | ||
679 | unsigned long long bad = ULONG_MAX; | ||
675 | #else | 680 | #else |
676 | long long xx = strtoll (s, &e, 0); | 681 | /* Something wrong with SIZEOF_XOFF_T, SIZEOF_LONG, etc. */ |
677 | #endif | 682 | #endif |
678 | 683 | ||
679 | if (xx < 0) | 684 | if (xx == bad) |
680 | { | 685 | { |
681 | XPR(NT "-%c: negative integer: %s\n", which, s); | 686 | XPR(NT "-%c: negative integer: %s\n", which, s); |
682 | return EXIT_FAILURE; | 687 | return EXIT_FAILURE; |
@@ -703,7 +708,7 @@ main_atoux (const char* arg, xoff_t *xo, xoff_t low, | |||
703 | int ret; | 708 | int ret; |
704 | 709 | ||
705 | if ((ret = main_strtoxoff (arg, & x, which))) { return ret; } | 710 | if ((ret = main_strtoxoff (arg, & x, which))) { return ret; } |
706 | 711 | XPR(NT "SEE -%c: value %"Q" low %"Q" high %"Q"\n", which, x, low, high); | |
707 | if (x < low) | 712 | if (x < low) |
708 | { | 713 | { |
709 | XPR(NT "-%c: minimum value: %"Q"\n", which, low); | 714 | XPR(NT "-%c: minimum value: %"Q"\n", which, low); |
diff --git a/xdelta3/xdelta3.c b/xdelta3/xdelta3.c index 612e747..42fdfe2 100644 --- a/xdelta3/xdelta3.c +++ b/xdelta3/xdelta3.c | |||
@@ -349,7 +349,9 @@ typedef unsigned int xd3_rtype; | |||
349 | 349 | ||
350 | #include "xdelta3-list.h" | 350 | #include "xdelta3-list.h" |
351 | 351 | ||
352 | #if XD3_ENCODER | ||
352 | XD3_MAKELIST(xd3_rlist, xd3_rinst, link); | 353 | XD3_MAKELIST(xd3_rlist, xd3_rinst, link); |
354 | #endif | ||
353 | 355 | ||
354 | /***********************************************************************/ | 356 | /***********************************************************************/ |
355 | 357 | ||
diff --git a/xdelta3/xdelta3.h b/xdelta3/xdelta3.h index 7b63b9c..f1aa5d8 100644 --- a/xdelta3/xdelta3.h +++ b/xdelta3/xdelta3.h | |||
@@ -25,7 +25,7 @@ | |||
25 | #ifndef _XDELTA3_H_ | 25 | #ifndef _XDELTA3_H_ |
26 | #define _XDELTA3_H_ | 26 | #define _XDELTA3_H_ |
27 | 27 | ||
28 | #define _POSIX_SOURCE | 28 | #define _POSIX_SOURCE 200112L |
29 | #define _ISOC99_SOURCE | 29 | #define _ISOC99_SOURCE |
30 | #define _C99_SOURCE | 30 | #define _C99_SOURCE |
31 | 31 | ||