summaryrefslogtreecommitdiff
path: root/xdelta3
diff options
context:
space:
mode:
Diffstat (limited to 'xdelta3')
-rw-r--r--xdelta3/configure.ac3
-rw-r--r--xdelta3/xdelta3.h21
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
11AC_CHECK_HEADERS([lzma.h]) 11AC_CHECK_HEADERS([lzma.h])
12AC_CHECK_LIB(lzma, lzma_easy_buffer_encode) 12AC_CHECK_LIB(lzma, lzma_easy_buffer_encode)
13AC_CHECK_SIZEOF(size_t) 13AC_CHECK_SIZEOF(size_t)
14AC_CHECK_SIZEOF(unsigned int)
15AC_CHECK_SIZEOF(unsigned long)
16AC_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
156typedef uint64_t xoff_t; 156#if SIZEOF_UNSIGNED_LONG == 8
157#define SIZEOF_XOFF_T 8 157typedef unsigned long xoff_t;
158#define SIZEOF_USIZE_T 4 158#define Q "l"
159#ifndef WIN32 159#elif SIZEOF_SIZE_T == 8
160typedef size_t xoff_t;
161#define Q "z"
162#elif SIZEOF_UNSIGNED_LONG_LONG == 8
163typedef unsigned long long xoff_t;
160#define Q "ll" 164#define Q "ll"
161#else 165#else
166typedef 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
174typedef unsigned int xoff_t;
164#else 175#else
165typedef uint32_t xoff_t; 176typedef 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