From 4f2207cfa8c932c4253587b51de6788968c7e36f Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Sun, 28 Dec 2014 21:30:35 -0600 Subject: [PATCH] remove __weak_alias --- configure.ac | 5 ++--- include/sha2.h | 10 ++++++++++ include/sys/types.h | 6 ------ 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index 0e0a9d2..d88281b 100644 --- a/configure.ac +++ b/configure.ac @@ -22,9 +22,8 @@ case $host_os in CFLAGS="$CFLAGS -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE -D_GNU_SOURCE" ;; *openbsd*) - AC_DEFINE([HAVE_ATTRIBUTE__BOUNDED__], [1], [OpenBSD gcc has __bounded__]) - AC_DEFINE([HAVE_ATTRIBUTE__WEAK_ALIAS], [1], [OpenBSD gcc has __weak_alias]) - AC_DEFINE([HAVE_ATTRIBUTE__DEAD], [1], [OpenBSD gcc has __dead]) + AC_DEFINE([HAVE_ATTRIBUTE__BOUNDED__], [1], [OpenBSD has __bounded__]) + AC_DEFINE([HAVE_ATTRIBUTE__DEAD], [1], [OpenBSD has __dead]) HAVE_SENSORS=true ;; *solaris*) diff --git a/include/sha2.h b/include/sha2.h index 293c14f..9fda715 100644 --- a/include/sha2.h +++ b/include/sha2.h @@ -9,6 +9,16 @@ #include "sha2_openbsd.h" +#define __weak_alias(alias,sym) + +#define SHA224Transform(a, b) SHA256Transform(a, b) +#define SHA224Update(a, b, c) SHA256Update(a, b, c) +#define SHA224Pad(a) SHA256Pad(a) + +#define SHA384Transform(a, b) SHA512Transform(a, b) +#define SHA384Update(a, b, c) SHA512Update(a, b, c) +#define SHA384Pad(a) SHA512Pad(a) + #define SHA512_CTX SHA2_CTX #define SHA512_Init(ctx) SHA512Init(ctx) #define SHA512_Update(ctx, buf, len) SHA512Update(ctx, (void *)buf, len) diff --git a/include/sys/types.h b/include/sys/types.h index 3588e4d..248cf24 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -18,12 +18,6 @@ #define __dead #endif -#if !defined(HAVE_ATTRIBUTE__WEAK_ALIAS) && !defined(__weak_alias) -#define __weak_alias(alias,sym) \ - __asm__(".weak " __STRING(alias) " ; " \ - __STRING(alias) " = " __STRING(sym)) -#endif - #if !defined(HAVE_ATTRIBUTE__BOUNDED__) && !defined(__bounded__) # define __bounded__(x, y, z) #endif