[Forensics-changes] [yara] 98/192: Fix issue introduced in previous commit.
Hilko Bengen
bengen at moszumanska.debian.org
Sat Jul 1 10:31:52 UTC 2017
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to annotated tag v3.6.0
in repository yara.
commit 16c3dd1215ea013bf472820878e22aaaab0fd8cd
Author: plusvic <plusvic at gmail.com>
Date: Tue Feb 7 12:12:22 2017 +0100
Fix issue introduced in previous commit.
---
libyara/include/yara/endian.h | 64 ++++++++++++++++++++++++++++++++-----------
1 file changed, 48 insertions(+), 16 deletions(-)
diff --git a/libyara/include/yara/endian.h b/libyara/include/yara/endian.h
index b4d083c..6c365c6 100644
--- a/libyara/include/yara/endian.h
+++ b/libyara/include/yara/endian.h
@@ -35,29 +35,61 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define GCC_48 (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
-#if (defined(__has_builtin) && __has_builtin(__builtin_bswap16)) || GCC_48
-#define yr_bswap16(x) __builtin_bswap16(x)
-#elif defined(_MSC_VER)
-#define yr_bswap16(x) _byteswap_ushort(x)
-#else
+#if defined(__has_builtin)
+# if __has_builtin(__builtin_bswap16)
+# define yr_bswap16(x) __builtin_bswap16(x)
+# endif
+#endif
+
+#if !defined(yr_bswap16) && defined(GCC_48)
+# define yr_bswap16(x) __builtin_bswap16(x)
+#endif
+
+#if !defined(yr_bswap16) && defined(_MSC_VER)
+# define yr_bswap16(x) _byteswap_ushort(x)
+#endif
+
+#if !defined(yr_bswap16)
uint16_t _yr_bswap16(uint16_t x);
-#define yr_bswap16(x) _yr_bswap16(x)
+# define yr_bswap16(x) _yr_bswap16(x)
#endif
-#if (defined(__has_builtin) && __has_builtin(__builtin_bswap32)) || GCC_48
-#define yr_bswap32(x) __builtin_bswap32(x)
-#elif defined(_MSC_VER)
-#define yr_bswap32(x) _byteswap_ulong(x)
-#else
+
+#if defined(__has_builtin)
+# if __has_builtin(__builtin_bswap32)
+# define yr_bswap32(x) __builtin_bswap32(x)
+# endif
+#endif
+
+#if !defined(yr_bswap32) && defined(GCC_48)
+# define yr_bswap32(x) __builtin_bswap32(x)
+#endif
+
+#if !defined(yr_bswap32) && defined(_MSC_VER)
+# define yr_bswap32(x) _byteswap_ushort(x)
+#endif
+
+#if !defined(yr_bswap32)
uint32_t _yr_bswap32(uint32_t x);
#define yr_bswap32(x) _yr_bswap32(x)
#endif
-#if (defined(__has_builtin) && __has_builtin(__builtin_bswap64)) || GCC_48
-#define yr_bswap64(x) __builtin_bswap32(x)
-#elif defined(_MSC_VER)
-#define yr_bswap64(x) _byteswap_uint64(x)
-#else
+
+#if defined(__has_builtin)
+# if __has_builtin(__builtin_bswap64)
+# define yr_bswap64(x) __builtin_bswap32(x)
+# endif
+#endif
+
+#if !defined(yr_bswap32) && defined(GCC_48)
+# define yr_bswap64(x) __builtin_bswap32(x)
+#endif
+
+#if !defined(yr_bswap32) && defined(_MSC_VER)
+# define yr_bswap64(x) _byteswap_uint64(x)
+#endif
+
+#if !defined(yr_bswap32)
uint64_t _yr_bswap64(uint64_t x);
#define yr_bswap64(x) _yr_bswap64(x)
#endif
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/forensics/yara.git
More information about the forensics-changes
mailing list