Browse Source

remove __weak_alias

OPENBSD_5_7
Brent Cook 10 years ago
parent
commit
4f2207cfa8
3 changed files with 12 additions and 9 deletions
  1. +2
    -3
      configure.ac
  2. +10
    -0
      include/sha2.h
  3. +0
    -6
      include/sys/types.h

+ 2
- 3
configure.ac View File

@ -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*)


+ 10
- 0
include/sha2.h View File

@ -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)


+ 0
- 6
include/sys/types.h View File

@ -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


Loading…
Cancel
Save