better fix for __bounded removal

This commit is contained in:
Brent Cook 2014-07-10 16:02:49 -05:00
parent d81b9bda51
commit 388a1655d4
2 changed files with 7 additions and 8 deletions

View File

@ -8,14 +8,6 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_SUBST([USER_CFLAGS], "-O2 $CFLAGS")
CFLAGS="$CFLAGS -Wall -Werror -std=c99 -g -Wno-pointer-sign -DHAVE_CRYPTODEV -DLIBRESSL_INTERNAL"
case $target_os in
*openbsd*)
;;
*)
CFLAGS="$CFLAGS -D__bounded__(x,y,z)"
;;
esac
case $target_os in
*darwin*)
TARGET_OS=darwin;
@ -30,6 +22,9 @@ case $target_os in
CFLAGS="$CFLAGS -D__EXTENSIONS__ -D_XOPEN_SOURCE=600 -DBSD_COMP"
AC_SUBST([PLATFORM_LDADD], ['-lnsl -lsocket'])
;;
*openbsd*)
AC_DEFINE([HAVE_ATTRIBUTE__BOUNDED__], [1], [OpenBSD gcc has bounded])
;;
*) ;;
esac

View File

@ -10,4 +10,8 @@ typedef uint8_t u_int8_t;
typedef uint32_t u_int32_t;
#endif
#if !defined(HAVE_ATTRIBUTE__BOUNDED__) && !defined(__bounded__)
# define __bounded__(x, y, z)
#endif
#endif