aboutsummaryrefslogtreecommitdiffstats
path: root/c/sha3.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-02-12 14:14:19 +0100
committerMattias Andrée <maandree@operamail.com>2014-02-12 14:14:19 +0100
commitb8045562e10fa117cd6724613a32344fa4d5c1bf (patch)
tree33d09ea0c0e6d7c2a7a9715a6b355cf4ae79acc8 /c/sha3.h
parentc version: add inclusion guard (diff)
downloadsha3sum-b8045562e10fa117cd6724613a32344fa4d5c1bf.tar.gz
sha3sum-b8045562e10fa117cd6724613a32344fa4d5c1bf.tar.bz2
sha3sum-b8045562e10fa117cd6724613a32344fa4d5c1bf.tar.xz
c version: instead of defining restrict as empty if not WITH_C99, define restrict_ as restrict if WITH_C99
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--c/sha3.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/c/sha3.h b/c/sha3.h
index 6587795..f984df5 100644
--- a/c/sha3.h
+++ b/c/sha3.h
@@ -24,12 +24,13 @@
#ifdef WITH_C99
#include <inttypes.h>
+ #define restrict_ restrict
#define byte int_fast8_t
#define boolean int_fast8_t
#define llong int_fast64_t
#define ullong uint_fast64_t
#else
- #define restrict /* introduced in C99 */
+ #define restrict_ /* introduced in C99 */
#define byte char
#define boolean char
#if __x86_64__ || __ppc64__
@@ -64,7 +65,7 @@ extern void sha3_dispose(void);
* @param msg The partial message
* @param msglen The length of the partial message
*/
-extern void sha3_update(byte* restrict msg, long msglen);
+extern void sha3_update(byte* restrict_ msg, long msglen);
/**
@@ -75,7 +76,7 @@ extern void sha3_update(byte* restrict msg, long msglen);
* @param withReturn Whether to return the hash instead of just do a quick squeeze phrase and return {@code null}
* @return The hash sum, or {@code null} if <tt>withReturn</tt> is {@code false}
*/
-extern byte* sha3_digest(byte* restrict msg, long msglen, boolean withReturn);
+extern byte* sha3_digest(byte* restrict_ msg, long msglen, boolean withReturn);
/**