diff options
Diffstat (limited to 'xdelta3')
-rw-r--r-- | xdelta3/configure.ac | 3 | ||||
-rw-r--r-- | xdelta3/xdelta3.h | 21 |
2 files changed, 20 insertions, 4 deletions
diff --git a/xdelta3/configure.ac b/xdelta3/configure.ac index c1cae4c..748ffef 100644 --- a/xdelta3/configure.ac +++ b/xdelta3/configure.ac | |||
@@ -11,6 +11,9 @@ AC_PROG_CXX | |||
11 | AC_CHECK_HEADERS([lzma.h]) | 11 | AC_CHECK_HEADERS([lzma.h]) |
12 | AC_CHECK_LIB(lzma, lzma_easy_buffer_encode) | 12 | AC_CHECK_LIB(lzma, lzma_easy_buffer_encode) |
13 | AC_CHECK_SIZEOF(size_t) | 13 | AC_CHECK_SIZEOF(size_t) |
14 | AC_CHECK_SIZEOF(unsigned int) | ||
15 | AC_CHECK_SIZEOF(unsigned long) | ||
16 | AC_CHECK_SIZEOF(unsigned long long) | ||
14 | #AM_PATH_PYTHON(,, [:]) | 17 | #AM_PATH_PYTHON(,, [:]) |
15 | #AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :]) | 18 | #AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :]) |
16 | #AX_PYTHON_DEVEL() | 19 | #AX_PYTHON_DEVEL() |
diff --git a/xdelta3/xdelta3.h b/xdelta3/xdelta3.h index f72cdc9..9d6427a 100644 --- a/xdelta3/xdelta3.h +++ b/xdelta3/xdelta3.h | |||
@@ -153,16 +153,29 @@ typedef uint32_t usize_t; | |||
153 | #define _FILE_OFFSET_BITS 64 | 153 | #define _FILE_OFFSET_BITS 64 |
154 | #endif | 154 | #endif |
155 | 155 | ||
156 | typedef uint64_t xoff_t; | 156 | #if SIZEOF_UNSIGNED_LONG == 8 |
157 | #define SIZEOF_XOFF_T 8 | 157 | typedef unsigned long xoff_t; |
158 | #define SIZEOF_USIZE_T 4 | 158 | #define Q "l" |
159 | #ifndef WIN32 | 159 | #elif SIZEOF_SIZE_T == 8 |
160 | typedef size_t xoff_t; | ||
161 | #define Q "z" | ||
162 | #elif SIZEOF_UNSIGNED_LONG_LONG == 8 | ||
163 | typedef unsigned long long xoff_t; | ||
160 | #define Q "ll" | 164 | #define Q "ll" |
161 | #else | 165 | #else |
166 | typedef uint64_t xoff_t; | ||
162 | #define Q "I64" | 167 | #define Q "I64" |
163 | #endif | 168 | #endif |
169 | |||
170 | #define SIZEOF_XOFF_T 8 | ||
171 | #define SIZEOF_USIZE_T 4 | ||
172 | #else | ||
173 | #if SIZEOF_UNSIGNED_INT == 4 | ||
174 | typedef unsigned int xoff_t; | ||
164 | #else | 175 | #else |
165 | typedef uint32_t xoff_t; | 176 | typedef uint32_t xoff_t; |
177 | #endif | ||
178 | |||
166 | #define SIZEOF_XOFF_T 4 | 179 | #define SIZEOF_XOFF_T 4 |
167 | #define SIZEOF_USIZE_T 4 | 180 | #define SIZEOF_USIZE_T 4 |
168 | #define Q | 181 | #define Q |