From 361740acb97cd5b76a1b7fb1044acddbf501f903 Mon Sep 17 00:00:00 2001 From: beck Date: Sun, 13 Jul 2014 10:27:22 +0000 Subject: [PATCH] Take out __bounded__ in the include files we use it in when not on OpenBSD. while we can take it out in portable at compile time, it is still a problem when we install this header file on a system that doesn't support __bounded__ if this is unguarded. ok miod@ bcook@ --- lib/libcrypto/bio/bio.h | 6 ++++-- lib/libcrypto/buffer/buffer.h | 5 ++++- lib/libcrypto/md5/md5.h | 5 ++++- lib/libcrypto/sha/sha.h | 5 ++++- lib/libssl/src/crypto/bio/bio.h | 6 ++++-- lib/libssl/src/crypto/buffer/buffer.h | 5 ++++- lib/libssl/src/crypto/md5/md5.h | 5 ++++- lib/libssl/src/crypto/sha/sha.h | 5 ++++- 8 files changed, 32 insertions(+), 10 deletions(-) diff --git a/lib/libcrypto/bio/bio.h b/lib/libcrypto/bio/bio.h index cc5ef618b5d..59f916f0855 100644 --- a/lib/libcrypto/bio/bio.h +++ b/lib/libcrypto/bio/bio.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bio.h,v 1.24 2014/06/22 14:41:10 jsing Exp $ */ +/* $OpenBSD: bio.h,v 1.25 2014/07/13 10:27:22 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -58,7 +58,9 @@ #ifndef HEADER_BIO_H #define HEADER_BIO_H - +#if !defined(HAVE_ATTRIBUTE__BOUNDED__) || !defined(__OpenBSD__) +#define __bounded__(x, y, z) +#endif #include # include diff --git a/lib/libcrypto/buffer/buffer.h b/lib/libcrypto/buffer/buffer.h index c3d140b392e..00759cf8570 100644 --- a/lib/libcrypto/buffer/buffer.h +++ b/lib/libcrypto/buffer/buffer.h @@ -1,4 +1,4 @@ -/* $OpenBSD: buffer.h,v 1.11 2014/06/24 19:37:58 miod Exp $ */ +/* $OpenBSD: buffer.h,v 1.12 2014/07/13 10:27:22 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -58,6 +58,9 @@ #ifndef HEADER_BUFFER_H #define HEADER_BUFFER_H +#if !defined(HAVE_ATTRIBUTE__BOUNDED__) || !defined(__OpenBSD__) +#define __bounded__(x, y, z) +#endif #include diff --git a/lib/libcrypto/md5/md5.h b/lib/libcrypto/md5/md5.h index 98bdbc7b258..6f50e7f0ddc 100644 --- a/lib/libcrypto/md5/md5.h +++ b/lib/libcrypto/md5/md5.h @@ -1,4 +1,4 @@ -/* $OpenBSD: md5.h,v 1.17 2014/07/10 22:45:57 jsing Exp $ */ +/* $OpenBSD: md5.h,v 1.18 2014/07/13 10:27:22 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -60,6 +60,9 @@ #ifndef HEADER_MD5_H #define HEADER_MD5_H +#if !defined(HAVE_ATTRIBUTE__BOUNDED__) || !defined(__OpenBSD__) +#define __bounded__(x, y, z) +#endif #include diff --git a/lib/libcrypto/sha/sha.h b/lib/libcrypto/sha/sha.h index c2e303fcc25..d227ae458a5 100644 --- a/lib/libcrypto/sha/sha.h +++ b/lib/libcrypto/sha/sha.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sha.h,v 1.17 2014/07/10 22:45:58 jsing Exp $ */ +/* $OpenBSD: sha.h,v 1.18 2014/07/13 10:27:22 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -60,6 +60,9 @@ #ifndef HEADER_SHA_H #define HEADER_SHA_H +#if !defined(HAVE_ATTRIBUTE__BOUNDED__) || !defined(__OpenBSD__) +#define __bounded__(x, y, z) +#endif #include diff --git a/lib/libssl/src/crypto/bio/bio.h b/lib/libssl/src/crypto/bio/bio.h index cc5ef618b5d..59f916f0855 100644 --- a/lib/libssl/src/crypto/bio/bio.h +++ b/lib/libssl/src/crypto/bio/bio.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bio.h,v 1.24 2014/06/22 14:41:10 jsing Exp $ */ +/* $OpenBSD: bio.h,v 1.25 2014/07/13 10:27:22 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -58,7 +58,9 @@ #ifndef HEADER_BIO_H #define HEADER_BIO_H - +#if !defined(HAVE_ATTRIBUTE__BOUNDED__) || !defined(__OpenBSD__) +#define __bounded__(x, y, z) +#endif #include # include diff --git a/lib/libssl/src/crypto/buffer/buffer.h b/lib/libssl/src/crypto/buffer/buffer.h index c3d140b392e..00759cf8570 100644 --- a/lib/libssl/src/crypto/buffer/buffer.h +++ b/lib/libssl/src/crypto/buffer/buffer.h @@ -1,4 +1,4 @@ -/* $OpenBSD: buffer.h,v 1.11 2014/06/24 19:37:58 miod Exp $ */ +/* $OpenBSD: buffer.h,v 1.12 2014/07/13 10:27:22 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -58,6 +58,9 @@ #ifndef HEADER_BUFFER_H #define HEADER_BUFFER_H +#if !defined(HAVE_ATTRIBUTE__BOUNDED__) || !defined(__OpenBSD__) +#define __bounded__(x, y, z) +#endif #include diff --git a/lib/libssl/src/crypto/md5/md5.h b/lib/libssl/src/crypto/md5/md5.h index 98bdbc7b258..6f50e7f0ddc 100644 --- a/lib/libssl/src/crypto/md5/md5.h +++ b/lib/libssl/src/crypto/md5/md5.h @@ -1,4 +1,4 @@ -/* $OpenBSD: md5.h,v 1.17 2014/07/10 22:45:57 jsing Exp $ */ +/* $OpenBSD: md5.h,v 1.18 2014/07/13 10:27:22 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -60,6 +60,9 @@ #ifndef HEADER_MD5_H #define HEADER_MD5_H +#if !defined(HAVE_ATTRIBUTE__BOUNDED__) || !defined(__OpenBSD__) +#define __bounded__(x, y, z) +#endif #include diff --git a/lib/libssl/src/crypto/sha/sha.h b/lib/libssl/src/crypto/sha/sha.h index c2e303fcc25..d227ae458a5 100644 --- a/lib/libssl/src/crypto/sha/sha.h +++ b/lib/libssl/src/crypto/sha/sha.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sha.h,v 1.17 2014/07/10 22:45:58 jsing Exp $ */ +/* $OpenBSD: sha.h,v 1.18 2014/07/13 10:27:22 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -60,6 +60,9 @@ #ifndef HEADER_SHA_H #define HEADER_SHA_H +#if !defined(HAVE_ATTRIBUTE__BOUNDED__) || !defined(__OpenBSD__) +#define __bounded__(x, y, z) +#endif #include -- 2.20.1