diff options
author | Ashish SHUKLA <ashish@FreeBSD.org> | 2015-02-28 23:44:11 +0000 |
---|---|---|
committer | Ashish SHUKLA <ashish@FreeBSD.org> | 2015-02-28 23:44:11 +0000 |
commit | 6e7616a42870e55a562dc7d79a6879d928cb0b8c (patch) | |
tree | 04e99e2e32a9f6f5fce3bfcfd6efae04f2898a1b /lang/sagittarius-scheme | |
parent | 76ac1e321a6c3e80819fdcb2af8d30e27994a532 (diff) | |
download | ports-6e7616a42870e55a562dc7d79a6879d928cb0b8c.tar.gz ports-6e7616a42870e55a562dc7d79a6879d928cb0b8c.zip |
Notes
Diffstat (limited to 'lang/sagittarius-scheme')
-rw-r--r-- | lang/sagittarius-scheme/files/patch-ext_crypto_libtomcrypt-1.17_src_headers_tomcrypt__macros.h | 107 |
1 files changed, 107 insertions, 0 deletions
diff --git a/lang/sagittarius-scheme/files/patch-ext_crypto_libtomcrypt-1.17_src_headers_tomcrypt__macros.h b/lang/sagittarius-scheme/files/patch-ext_crypto_libtomcrypt-1.17_src_headers_tomcrypt__macros.h new file mode 100644 index 000000000000..793e3fe55954 --- /dev/null +++ b/lang/sagittarius-scheme/files/patch-ext_crypto_libtomcrypt-1.17_src_headers_tomcrypt__macros.h @@ -0,0 +1,107 @@ + +$FreeBSD$ + +--- ext/crypto/libtomcrypt-1.17/src/headers/tomcrypt_macros.h.orig ++++ ext/crypto/libtomcrypt-1.17/src/headers/tomcrypt_macros.h +@@ -262,21 +262,19 @@ + + #ifndef LTC_NO_ROLC + +-static inline unsigned ROLc(unsigned word, const int i) +-{ +- asm ("roll %2,%0" +- :"=r" (word) +- :"0" (word),"I" (i)); +- return word; +-} ++#define ROLc(word, i) ({ \ ++ unsigned _word = word; \ ++ asm ("roll %2,%0" \ ++ :"=r" (_word) \ ++ :"0" (_word),"I" (i)); \ ++ _word; }) + +-static inline unsigned RORc(unsigned word, const int i) +-{ +- asm ("rorl %2,%0" +- :"=r" (word) +- :"0" (word),"I" (i)); +- return word; +-} ++#define RORc(word, i) ({ \ ++ unsigned _word = word; \ ++ asm ("rorl %2,%0" \ ++ :"=r" (_word) \ ++ :"0" (_word),"I" (i)); \ ++ _word; }) + + #else + +@@ -305,21 +303,19 @@ + + #ifndef LTC_NO_ROLC + +-static inline unsigned ROLc(unsigned word, const int i) +-{ +- asm ("rotlwi %0,%0,%2" +- :"=r" (word) +- :"0" (word),"I" (i)); +- return word; +-} ++#define ROLc(word, i) ({ \ ++ unsigned _word = word; \ ++ asm ("rotlwi %0,%0,%2" \ ++ :"=r" (_word) \ ++ :"0" (_word),"I" (i)); \ ++ _word; }) + +-static inline unsigned RORc(unsigned word, const int i) +-{ +- asm ("rotrwi %0,%0,%2" +- :"=r" (word) +- :"0" (word),"I" (i)); +- return word; +-} ++#define RORc(word, i) ({ \ ++ unsigned _word = word; \ ++ asm ("rotrwi %0,%0,%2" \ ++ :"=r" (_word) \ ++ :"0" (_word),"I" (i)); \ ++ _word; }) + + #else + +@@ -361,21 +357,19 @@ + + #ifndef LTC_NO_ROLC + +-static inline unsigned long ROL64c(unsigned long word, const int i) +-{ +- asm("rolq %2,%0" +- :"=r" (word) +- :"0" (word),"J" (i)); +- return word; +-} ++#define ROL64c(word, i) ({ \ ++ unsigned long _word = word; \ ++ asm ("rolq %2,%0" \ ++ :"=r" (_word) \ ++ :"0" (_word),"J" (i)); \ ++ _word; }) + +-static inline unsigned long ROR64c(unsigned long word, const int i) +-{ +- asm("rorq %2,%0" +- :"=r" (word) +- :"0" (word),"J" (i)); +- return word; +-} ++#define ROR64c(word, i) ({ \ ++ unsigned long _word = word; \ ++ asm ("rorq %2,%0" \ ++ :"=r" (_word) \ ++ :"0" (_word),"J" (i)); \ ++ _word; }) + + #else /* LTC_NO_ROLC */ + |