[Forensics-changes] [yara] 100/192: Don’t force the use of __builtin_bswapXX for gcc >= 4.8. Fix wrong function name.

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 0541a7932517364f5ec042af710ce48f92f6e5bd
Author: plusvic <plusvic at gmail.com>
Date:   Tue Feb 7 12:44:31 2017 +0100

    Don’t force the use of __builtin_bswapXX for gcc >= 4.8. Fix wrong function name.
---
 libyara/include/yara/endian.h | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/libyara/include/yara/endian.h b/libyara/include/yara/endian.h
index 038e443..8d75012 100644
--- a/libyara/include/yara/endian.h
+++ b/libyara/include/yara/endian.h
@@ -33,7 +33,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <stdint.h>
 #include <config.h>
 
-#define GCC_48 (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
 
 #if defined(__has_builtin)
 #  if __has_builtin(__builtin_bswap16)
@@ -41,10 +40,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #  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
@@ -61,12 +56,8 @@ uint16_t _yr_bswap16(uint16_t 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)
+#  define yr_bswap32(x) _byteswap_ulong(x)
 #endif
 
 #if !defined(yr_bswap32)
@@ -81,10 +72,6 @@ uint32_t _yr_bswap32(uint32_t x);
 #  endif
 #endif
 
-#if !defined(yr_bswap64) && defined(GCC_48)
-#  define yr_bswap64(x) __builtin_bswap64(x)
-#endif
-
 #if !defined(yr_bswap64) && defined(_MSC_VER)
 #  define yr_bswap64(x) _byteswap_uint64(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