diff options
| author | Brent Cook <busterb@gmail.com> | 2014-07-10 16:02:49 -0500 |
|---|---|---|
| committer | Brent Cook <busterb@gmail.com> | 2014-07-10 16:02:49 -0500 |
| commit | 388a1655d4d94141a979a058e737eb573c8ed257 (patch) | |
| tree | a31af90fa2d8634f4803896d1beeef007c9f7c6b | |
| parent | d81b9bda51f972d5d54cb4ff4a8d1aaa7e626f9e (diff) | |
| download | portable-388a1655d4d94141a979a058e737eb573c8ed257.tar.gz portable-388a1655d4d94141a979a058e737eb573c8ed257.tar.bz2 portable-388a1655d4d94141a979a058e737eb573c8ed257.zip | |
better fix for __bounded removal
| -rw-r--r-- | configure.ac | 11 | ||||
| -rw-r--r-- | include/sys/types.h | 4 |
2 files changed, 7 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac index 82a6be4..ffa1786 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -9,14 +9,6 @@ AC_SUBST([USER_CFLAGS], "-O2 $CFLAGS") | |||
| 9 | CFLAGS="$CFLAGS -Wall -Werror -std=c99 -g -Wno-pointer-sign -DHAVE_CRYPTODEV -DLIBRESSL_INTERNAL" | 9 | CFLAGS="$CFLAGS -Wall -Werror -std=c99 -g -Wno-pointer-sign -DHAVE_CRYPTODEV -DLIBRESSL_INTERNAL" |
| 10 | 10 | ||
| 11 | case $target_os in | 11 | case $target_os in |
| 12 | *openbsd*) | ||
| 13 | ;; | ||
| 14 | *) | ||
| 15 | CFLAGS="$CFLAGS -D__bounded__(x,y,z)" | ||
| 16 | ;; | ||
| 17 | esac | ||
| 18 | |||
| 19 | case $target_os in | ||
| 20 | *darwin*) | 12 | *darwin*) |
| 21 | TARGET_OS=darwin; | 13 | TARGET_OS=darwin; |
| 22 | LDFLAGS="$LDFLAGS -Qunused-arguments" | 14 | LDFLAGS="$LDFLAGS -Qunused-arguments" |
| @@ -30,6 +22,9 @@ case $target_os in | |||
| 30 | CFLAGS="$CFLAGS -D__EXTENSIONS__ -D_XOPEN_SOURCE=600 -DBSD_COMP" | 22 | CFLAGS="$CFLAGS -D__EXTENSIONS__ -D_XOPEN_SOURCE=600 -DBSD_COMP" |
| 31 | AC_SUBST([PLATFORM_LDADD], ['-lnsl -lsocket']) | 23 | AC_SUBST([PLATFORM_LDADD], ['-lnsl -lsocket']) |
| 32 | ;; | 24 | ;; |
| 25 | *openbsd*) | ||
| 26 | AC_DEFINE([HAVE_ATTRIBUTE__BOUNDED__], [1], [OpenBSD gcc has bounded]) | ||
| 27 | ;; | ||
| 33 | *) ;; | 28 | *) ;; |
| 34 | esac | 29 | esac |
| 35 | 30 | ||
diff --git a/include/sys/types.h b/include/sys/types.h index 05fc05b..3904bcb 100644 --- a/include/sys/types.h +++ b/include/sys/types.h | |||
| @@ -10,4 +10,8 @@ typedef uint8_t u_int8_t; | |||
| 10 | typedef uint32_t u_int32_t; | 10 | typedef uint32_t u_int32_t; |
| 11 | #endif | 11 | #endif |
| 12 | 12 | ||
| 13 | #if !defined(HAVE_ATTRIBUTE__BOUNDED__) && !defined(__bounded__) | ||
| 14 | # define __bounded__(x, y, z) | ||
| 15 | #endif | ||
| 16 | |||
| 13 | #endif | 17 | #endif |
