summaryrefslogtreecommitdiffstats
path: root/Utilities/cmlibarchive/libarchive/xxhash.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-05-02 14:48:48 (GMT)
committerBrad King <brad.king@kitware.com>2016-05-02 14:48:48 (GMT)
commite9bc469b2abcd0ad4cb3ad4bfefbc5ef1f559c1b (patch)
tree7e84ef0666764bcad5e77c9955c7dcd13413b427 /Utilities/cmlibarchive/libarchive/xxhash.c
parentdb9c40b4f5c9e1aadfe11c89040bad1e3b386162 (diff)
parent501345e470bb9c5b0cb61aff84bd50ffdd95b92d (diff)
downloadCMake-e9bc469b2abcd0ad4cb3ad4bfefbc5ef1f559c1b.zip
CMake-e9bc469b2abcd0ad4cb3ad4bfefbc5ef1f559c1b.tar.gz
CMake-e9bc469b2abcd0ad4cb3ad4bfefbc5ef1f559c1b.tar.bz2
Merge branch 'upstream-LibArchive' into update-libarchive
Resolve conflicts in C code by taking their side. Resolve conflicts in CMake code by integrating the changes.
Diffstat (limited to 'Utilities/cmlibarchive/libarchive/xxhash.c')
-rw-r--r--Utilities/cmlibarchive/libarchive/xxhash.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/Utilities/cmlibarchive/libarchive/xxhash.c b/Utilities/cmlibarchive/libarchive/xxhash.c
index e4f03ba..d7f8e96 100644
--- a/Utilities/cmlibarchive/libarchive/xxhash.c
+++ b/Utilities/cmlibarchive/libarchive/xxhash.c
@@ -29,8 +29,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
You can contact the author at :
- xxHash source repository : http://code.google.com/p/xxhash/
*/
+#include <stdlib.h>
+#include <string.h>
#include "archive_platform.h"
+#include "archive_xxhash.h"
+
#ifdef HAVE_LIBLZ4
/***************************************
@@ -83,11 +87,8 @@ You can contact the author at :
/***************************************
** Includes & Memory related functions
****************************************/
-#include "archive_xxhash.h"
-#include <stdlib.h>
#define XXH_malloc malloc
#define XXH_free free
-#include <string.h>
#define XXH_memcpy memcpy
@@ -497,4 +498,17 @@ struct archive_xxhash __archive_xxhash = {
XXH32_update,
XXH32_digest
};
+#else
+
+/*
+ * Define an empty version of the struct if we aren't using the LZ4 library.
+ */
+const
+struct archive_xxhash __archive_xxhash = {
+ NULL,
+ NULL,
+ NULL,
+ NULL
+};
+
#endif /* HAVE_LIBLZ4 */