aboutsummaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'common.h')
-rw-r--r--common.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/common.h b/common.h
new file mode 100644
index 0000000..1245bf6
--- /dev/null
+++ b/common.h
@@ -0,0 +1,17 @@
+/* See LICENSE file for copyright and license details. */
+#include "libkeccak.h"
+
+
+#include <sys/stat.h>
+#include <alloca.h>
+#include <errno.h>
+#include <unistd.h>
+
+
+/* Use built in functions and branching optimisation if available */
+#ifndef __GNUC__
+# define __builtin_expect(expression, expect) expression
+# define __builtin_memset(dest, c, n) memset(dest, c, n)
+# define __builtin_memcpy(dest, src, n) memcpy(dest, src, n)
+# define __builtin_memmove(dest, src, n) memmove(dest, src, n)
+#endif