From e36400aa300f5ec17f5cbaa11860b50e3ac4260f Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Thu, 10 Dec 2015 11:26:14 +0100 Subject: [PATCH] __attribute__((...)) -> __attribute__ ((...)) --- .../crypto_generichash/blake2/ref/blake2b-ref.c | 2 +- .../poly1305/donna/poly1305_donna32.h | 2 +- .../poly1305/donna/poly1305_donna64.h | 4 ++-- .../poly1305/sse2/poly1305_sse2.c | 4 ++-- .../curve25519/donna_c64/curve25519_donna_c64.c | 2 +- .../chacha20/vec/stream_chacha20_vec.c | 2 +- src/libsodium/include/sodium/export.h | 6 +++--- src/libsodium/sodium/utils.c | 16 ++++++++-------- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/libsodium/crypto_generichash/blake2/ref/blake2b-ref.c b/src/libsodium/crypto_generichash/blake2/ref/blake2b-ref.c index 0e1628e4..31a2e13c 100644 --- a/src/libsodium/crypto_generichash/blake2/ref/blake2b-ref.c +++ b/src/libsodium/crypto_generichash/blake2/ref/blake2b-ref.c @@ -24,7 +24,7 @@ # if defined(__SIZEOF_INT128__) typedef unsigned __int128 uint128_t; # else -typedef unsigned uint128_t __attribute__((mode(TI))); +typedef unsigned uint128_t __attribute__ ((mode(TI))); # endif #endif diff --git a/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna32.h b/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna32.h index 921e0845..d998330c 100644 --- a/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna32.h +++ b/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna32.h @@ -5,7 +5,7 @@ #if defined(_MSC_VER) # define POLY1305_NOINLINE __declspec(noinline) #elif defined(__GNUC__) -# define POLY1305_NOINLINE __attribute__((noinline)) +# define POLY1305_NOINLINE __attribute__ ((noinline)) #else # define POLY1305_NOINLINE #endif diff --git a/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna64.h b/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna64.h index 2dbb4cbf..fbc7ca36 100644 --- a/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna64.h +++ b/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna64.h @@ -5,7 +5,7 @@ #if defined(__SIZEOF_INT128__) typedef unsigned __int128 uint128_t; #else -typedef unsigned uint128_t __attribute__((mode(TI))); +typedef unsigned uint128_t __attribute__ ((mode(TI))); #endif #define MUL(out, x, y) out = ((uint128_t)x * y) @@ -17,7 +17,7 @@ typedef unsigned uint128_t __attribute__((mode(TI))); #if defined(_MSC_VER) # define POLY1305_NOINLINE __declspec(noinline) #elif defined(__GNUC__) -# define POLY1305_NOINLINE __attribute__((noinline)) +# define POLY1305_NOINLINE __attribute__ ((noinline)) #else # define POLY1305_NOINLINE #endif diff --git a/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c b/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c index d5a8fbde..cd464605 100644 --- a/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c +++ b/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c @@ -18,13 +18,13 @@ typedef __m128i xmmi; #if defined(__SIZEOF_INT128__) typedef unsigned __int128 uint128_t; #else -typedef unsigned uint128_t __attribute__((mode(TI))); +typedef unsigned uint128_t __attribute__ ((mode(TI))); #endif #if defined(_MSC_VER) # define POLY1305_NOINLINE __declspec(noinline) #elif defined(__GNUC__) -# define POLY1305_NOINLINE __attribute__((noinline)) +# define POLY1305_NOINLINE __attribute__ ((noinline)) #else # define POLY1305_NOINLINE #endif diff --git a/src/libsodium/crypto_scalarmult/curve25519/donna_c64/curve25519_donna_c64.c b/src/libsodium/crypto_scalarmult/curve25519/donna_c64/curve25519_donna_c64.c index 66c45758..fe923ea3 100644 --- a/src/libsodium/crypto_scalarmult/curve25519/donna_c64/curve25519_donna_c64.c +++ b/src/libsodium/crypto_scalarmult/curve25519/donna_c64/curve25519_donna_c64.c @@ -36,7 +36,7 @@ typedef uint64_t limb; typedef limb felem[5]; // This is a special gcc mode for 128-bit integers. It's implemented on 64-bit // platforms only as far as I know. -typedef unsigned uint128_t __attribute__((mode(TI))); +typedef unsigned uint128_t __attribute__ ((mode(TI))); /* Sum two numbers: output += in */ static inline void diff --git a/src/libsodium/crypto_stream/chacha20/vec/stream_chacha20_vec.c b/src/libsodium/crypto_stream/chacha20/vec/stream_chacha20_vec.c index b376d261..736f299e 100644 --- a/src/libsodium/crypto_stream/chacha20/vec/stream_chacha20_vec.c +++ b/src/libsodium/crypto_stream/chacha20/vec/stream_chacha20_vec.c @@ -16,7 +16,7 @@ #define CHACHA_RNDS 20 -typedef unsigned int vec __attribute__((vector_size(16))); +typedef unsigned int vec __attribute__ ((vector_size(16))); #include #include diff --git a/src/libsodium/include/sodium/export.h b/src/libsodium/include/sodium/export.h index 5b9c1587..f9b945cc 100644 --- a/src/libsodium/include/sodium/export.h +++ b/src/libsodium/include/sodium/export.h @@ -6,7 +6,7 @@ # ifdef __attribute__ # undef __attribute__ # endif -# define __attribute__(a) +# define __attribute__ (a) #endif #ifdef SODIUM_STATIC @@ -21,7 +21,7 @@ # else # if defined(__SUNPRO_C) # ifndef __GNU_C__ -# define SODIUM_EXPORT __attribute__(visibility(__global)) +# define SODIUM_EXPORT __attribute__ (visibility(__global)) # else # define SODIUM_EXPORT __attribute__ __global # endif @@ -37,7 +37,7 @@ # if defined(__INTEL_COMPILER) || defined(_MSC_VER) # define CRYPTO_ALIGN(x) __declspec(align(x)) # else -# define CRYPTO_ALIGN(x) __attribute__((aligned(x))) +# define CRYPTO_ALIGN(x) __attribute__ ((aligned(x))) # endif #endif diff --git a/src/libsodium/sodium/utils.c b/src/libsodium/sodium/utils.c index 00ee38ad..039255dc 100644 --- a/src/libsodium/sodium/utils.c +++ b/src/libsodium/sodium/utils.c @@ -50,7 +50,7 @@ static size_t page_size; static unsigned char canary[CANARY_SIZE]; #ifdef HAVE_WEAK_SYMBOLS -__attribute__((weak)) void +__attribute__ ((weak)) void _sodium_dummy_symbol_to_prevent_memzero_lto(void * const pnt, const size_t len) { (void) pnt; @@ -83,7 +83,7 @@ sodium_memzero(void * const pnt, const size_t len) } #ifdef HAVE_WEAK_SYMBOLS -__attribute__((weak)) void +__attribute__ ((weak)) void _sodium_dummy_symbol_to_prevent_memcmp_lto(const unsigned char *b1, const unsigned char *b2, const size_t len) @@ -117,7 +117,7 @@ sodium_memcmp(const void * const b1_, const void * const b2_, size_t len) } #ifdef HAVE_WEAK_SYMBOLS -__attribute__((weak)) void +__attribute__ ((weak)) void _sodium_dummy_symbol_to_prevent_compare_lto(const unsigned char *b1, const unsigned char *b2, const size_t len) @@ -459,7 +459,7 @@ _page_round(const size_t size) return (size + page_mask) & ~page_mask; } -static __attribute__((malloc)) unsigned char * +static __attribute__ ((malloc)) unsigned char * _alloc_aligned(const size_t size) { void *ptr; @@ -514,13 +514,13 @@ _unprotected_ptr_from_user_ptr(void * const ptr) #endif /* HAVE_ALIGNED_MALLOC */ #ifndef HAVE_ALIGNED_MALLOC -static __attribute__((malloc)) void * +static __attribute__ ((malloc)) void * _sodium_malloc(const size_t size) { return malloc(size); } #else -static __attribute__((malloc)) void * +static __attribute__ ((malloc)) void * _sodium_malloc(const size_t size) { void *user_ptr; @@ -563,7 +563,7 @@ _sodium_malloc(const size_t size) } #endif /* !HAVE_ALIGNED_MALLOC */ -__attribute__((malloc)) void * +__attribute__ ((malloc)) void * sodium_malloc(const size_t size) { void *ptr; @@ -576,7 +576,7 @@ sodium_malloc(const size_t size) return ptr; } -__attribute__((malloc)) void * +__attribute__ ((malloc)) void * sodium_allocarray(size_t count, size_t size) { size_t total_size;