summaryrefslogtreecommitdiffstats
path: root/Utilities/cmliblzma/common
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2014-07-13 20:24:29 (GMT)
committerBrad King <brad.king@kitware.com>2014-07-23 14:34:55 (GMT)
commitb2a07ca49c66665f5b51b592f44ecc4f66c7556b (patch)
treede0cd056692b88088e1b21f5bdf96afd781d52e2 /Utilities/cmliblzma/common
parentd44ad1612bfe01891bb16b4289f5fa5a2e29a546 (diff)
downloadCMake-b2a07ca49c66665f5b51b592f44ecc4f66c7556b.zip
CMake-b2a07ca49c66665f5b51b592f44ecc4f66c7556b.tar.gz
CMake-b2a07ca49c66665f5b51b592f44ecc4f66c7556b.tar.bz2
liblzma: Add CMake build system
Modify sources just enough to build without the full xz common directory.
Diffstat (limited to 'Utilities/cmliblzma/common')
-rw-r--r--Utilities/cmliblzma/common/sysdefs.h4
-rw-r--r--Utilities/cmliblzma/common/tuklib_integer.h10
2 files changed, 10 insertions, 4 deletions
diff --git a/Utilities/cmliblzma/common/sysdefs.h b/Utilities/cmliblzma/common/sysdefs.h
index 5ea6bda..5beda5c 100644
--- a/Utilities/cmliblzma/common/sysdefs.h
+++ b/Utilities/cmliblzma/common/sysdefs.h
@@ -20,9 +20,7 @@
// Includes //
//////////////
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include "config.h"
// Get standard-compliant stdio functions under MinGW and MinGW-w64.
#ifdef __MINGW32__
diff --git a/Utilities/cmliblzma/common/tuklib_integer.h b/Utilities/cmliblzma/common/tuklib_integer.h
index e6daa77..1897438 100644
--- a/Utilities/cmliblzma/common/tuklib_integer.h
+++ b/Utilities/cmliblzma/common/tuklib_integer.h
@@ -41,7 +41,15 @@
#ifndef TUKLIB_INTEGER_H
#define TUKLIB_INTEGER_H
-#include "tuklib_common.h"
+#include "sysdefs.h"
+
+#if defined(__GNUC__) && defined(__GNUC_MINOR__)
+# define TUKLIB_GNUC_REQ(major, minor) \
+ ((__GNUC__ == (major) && __GNUC_MINOR__ >= (minor)) \
+ || __GNUC__ > (major))
+#else
+# define TUKLIB_GNUC_REQ(major, minor) 0
+#endif
////////////////////////////////////////