diff options
author | Brad King <brad.king@kitware.com> | 2014-07-29 12:52:08 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-07-29 12:52:08 (GMT) |
commit | 4d574ee3a1a8dcc54835d90d7eab55677deb4cfb (patch) | |
tree | ad01ad56e2f09ac3173d11bba18af79501b7df27 /Utilities/cmliblzma/liblzma/check/crc_macros.h | |
parent | b6acd96f7fbe4df80e3735b101271cb801ba375a (diff) | |
parent | 65a0ea456d5d92644fe67bbbcbe973df3f111822 (diff) | |
download | CMake-4d574ee3a1a8dcc54835d90d7eab55677deb4cfb.zip CMake-4d574ee3a1a8dcc54835d90d7eab55677deb4cfb.tar.gz CMake-4d574ee3a1a8dcc54835d90d7eab55677deb4cfb.tar.bz2 |
Merge topic 'add-liblzma'
65a0ea45 Help: Add notes for topic 'add-liblzma'
8436d181 CMake: Enable use of liblzma in libarchive (#14504)
73eab246 liblzma: Avoid defining a 'restrict' macro
90e7a4d4 liblzma: Disable warnings to avoid changing 3rd party code
c20b4502 liblzma: Port to VS 6, 7.0
7a92eddb liblzma: Port from C99 to C89/90
b2a07ca4 liblzma: Add CMake build system
d44ad161 liblzma: Remove unused Makefile.* files
a53caea3 liblzma: Add README-CMake.txt
133d42fe Merge branch 'liblzma-upstream' into add-liblzma
c289e634 liblzma 5.0.5-gb69900ed (reduced)
8510533f liblzma: Add .gitattributes to ignore whitespace checks
Diffstat (limited to 'Utilities/cmliblzma/liblzma/check/crc_macros.h')
-rw-r--r-- | Utilities/cmliblzma/liblzma/check/crc_macros.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Utilities/cmliblzma/liblzma/check/crc_macros.h b/Utilities/cmliblzma/liblzma/check/crc_macros.h new file mode 100644 index 0000000..a7c21b7 --- /dev/null +++ b/Utilities/cmliblzma/liblzma/check/crc_macros.h @@ -0,0 +1,30 @@ +/////////////////////////////////////////////////////////////////////////////// +// +/// \file crc_macros.h +/// \brief Some endian-dependent macros for CRC32 and CRC64 +// +// Author: Lasse Collin +// +// This file has been put into the public domain. +// You can do whatever you want with this file. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifdef WORDS_BIGENDIAN +# define A(x) ((x) >> 24) +# define B(x) (((x) >> 16) & 0xFF) +# define C(x) (((x) >> 8) & 0xFF) +# define D(x) ((x) & 0xFF) + +# define S8(x) ((x) << 8) +# define S32(x) ((x) << 32) + +#else +# define A(x) ((x) & 0xFF) +# define B(x) (((x) >> 8) & 0xFF) +# define C(x) (((x) >> 16) & 0xFF) +# define D(x) ((x) >> 24) + +# define S8(x) ((x) >> 8) +# define S32(x) ((x) >> 32) +#endif |