[git] GCRYPT - branch, master, updated. libgcrypt-1.6.0-31-g5f2af6c

by Werner Koch cvs at cvs.gnupg.org
Mon Jan 13 11:53:02 CET 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU crypto library".

The branch, master has been updated
       via  5f2af6c26bc04975c0b518881532871d7387d7ce (commit)
      from  518ae274a1845ce626b2b4223a9b3805cbbab1a7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5f2af6c26bc04975c0b518881532871d7387d7ce
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Jan 9 19:14:09 2014 +0100

    Fix macro conflict in NetBSD
    
    * cipher/bithelp.h (bswap32): Rename to _gcry_bswap32.
    (bswap64): Rename to _gcry_bswap64.
    --
    
    NetBSD provides system macros bswap32 and bswap64 which conflicts with
    our macros.  Prefixing them with _gcry_ is easier than to come up with
    a proper test.
    
    GnuPG-bug-id: 1600
    Signed-off-by: Werner Koch <wk at gnupg.org>
    (cherry picked from commit 36214bfa8f612cd2faa4de217d1a12a8b5faadbf)

diff --git a/cipher/bithelp.h b/cipher/bithelp.h
index 418bdf5..6e59c53 100644
--- a/cipher/bithelp.h
+++ b/cipher/bithelp.h
@@ -39,9 +39,10 @@ static inline u32 ror(u32 x, int n)
 /* Byte swap for 32-bit and 64-bit integers.  If available, use compiler
    provided helpers.  */
 #ifdef HAVE_BUILTIN_BSWAP32
-# define bswap32 __builtin_bswap32
+# define _gcry_bswap32 __builtin_bswap32
 #else
-static inline u32 bswap32(u32 x)
+static inline u32
+_gcry_bswap32(u32 x)
 {
 	return ((rol(x, 8) & 0x00ff00ffL) | (ror(x, 8) & 0xff00ff00L));
 }
@@ -49,29 +50,30 @@ static inline u32 bswap32(u32 x)
 
 #ifdef HAVE_U64_TYPEDEF
 # ifdef HAVE_BUILTIN_BSWAP64
-#  define bswap64 __builtin_bswap64
+#  define _gcry_bswap64 __builtin_bswap64
 # else
-static inline u64 bswap64(u64 x)
+static inline u64
+_gcry_bswap64(u64 x)
 {
-	return ((u64)bswap32(x) << 32) | (bswap32(x >> 32));
+	return ((u64)_gcry_bswap32(x) << 32) | (_gcry_bswap32(x >> 32));
 }
 # endif
 #endif
 
 /* Endian dependent byte swap operations.  */
 #ifdef WORDS_BIGENDIAN
-# define le_bswap32(x) bswap32(x)
+# define le_bswap32(x) _gcry_bswap32(x)
 # define be_bswap32(x) ((u32)(x))
 # ifdef HAVE_U64_TYPEDEF
-#  define le_bswap64(x) bswap64(x)
+#  define le_bswap64(x) _gcry_bswap64(x)
 #  define be_bswap64(x) ((u64)(x))
 # endif
 #else
 # define le_bswap32(x) ((u32)(x))
-# define be_bswap32(x) bswap32(x)
+# define be_bswap32(x) _gcry_bswap32(x)
 # ifdef HAVE_U64_TYPEDEF
 #  define le_bswap64(x) ((u64)(x))
-#  define be_bswap64(x) bswap64(x)
+#  define be_bswap64(x) _gcry_bswap64(x)
 # endif
 #endif
 

-----------------------------------------------------------------------

Summary of changes:
 cipher/bithelp.h |   20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
The GNU crypto library
http://git.gnupg.org


_______________________________________________
Gnupg-commits mailing list
Gnupg-commits at gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-commits




More information about the Gcrypt-devel mailing list