* Originally written by Mike Hamburg
*/
-#ifndef __C448_COMMON_H__
-# define __C448_COMMON_H__ 1
+#ifndef HEADER_CURVE448UTILS_H
+# define HEADER_CURVE448UTILS_H
# include <openssl/e_os2.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/*
* Internal word types. Somewhat tricky. This could be decided separately per
* platform. However, the structs do need to be all the same size and
* with arch_arm32.
*/
# ifndef C448_WORD_BITS
-# if (defined(__ILP64__) || defined(__amd64__) || defined(__x86_64__) \
- || (((__UINT_FAST32_MAX__)>>30)>>30))
+# if (defined(__SIZEOF_INT128__) && (__SIZEOF_INT128__ == 16)) \
+ && !defined(__sparc__)
# define C448_WORD_BITS 64 /* The number of bits in a word */
# else
# define C448_WORD_BITS 32 /* The number of bits in a word */
# endif
/* C448_TRUE = -1 so that C448_TRUE & x = x */
-static const c448_bool_t C448_TRUE = 0 - (c448_bool_t)1;
+# define C448_TRUE (0 - (c448_bool_t)1)
/* C448_FALSE = 0 so that C448_FALSE & x = 0 */
-static const c448_bool_t C448_FALSE = 0;
+# define C448_FALSE 0
/* Another boolean type used to indicate success or failure. */
typedef enum {
return (c448_error_t) x;
}
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
#endif /* __C448_COMMON_H__ */