Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Smith <brian@briansmith.org>2016-01-17 22:30:42 +0300
committerDavid Benjamin <davidben@google.com>2016-01-21 23:58:51 +0300
commit061332f21643a910941c32cbfc40e577c380e342 (patch)
tree1180cc35ec109cd6546d8d68d4658a28f0e6bf36 /include/openssl/mem.h
parent0687bdfc12e7ce5832610465d12c69040d1c714b (diff)
Define |OPENSSL_PRINTF_FORMAT_FUNC| for format string annotations.
This centralizes the conditional logic into openssl/base.h so that it doesn't have to be repeated. The name |OPENSSL_PRINTF_FORMAT_FUNC| was chosen in anticipation of eventually defining an |OPENSSL_PRINTF_FORMAT_ARG| for MSVC-style parameter annotations. Change-Id: I273e6eddd209e696dc9f82099008c35b6d477cdb Reviewed-on: https://boringssl-review.googlesource.com/6909 Reviewed-by: David Benjamin <davidben@google.com>
Diffstat (limited to 'include/openssl/mem.h')
-rw-r--r--include/openssl/mem.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/include/openssl/mem.h b/include/openssl/mem.h
index c8e2b3ef..46d75d12 100644
--- a/include/openssl/mem.h
+++ b/include/openssl/mem.h
@@ -119,18 +119,12 @@ OPENSSL_EXPORT int OPENSSL_strncasecmp(const char *a, const char *b, size_t n);
* These functions are either OpenSSL wrappers for standard functions (i.e.
* |BIO_snprintf| and |BIO_vsnprintf|) which don't exist in C89, or are
* versions of printf functions that output to a BIO rather than a FILE. */
-#ifdef __GNUC__
-#define __bio_h__attr__ __attribute__
-#else
-#define __bio_h__attr__(x)
-#endif
OPENSSL_EXPORT int BIO_snprintf(char *buf, size_t n, const char *format, ...)
- __bio_h__attr__((__format__(__printf__, 3, 4)));
+ OPENSSL_PRINTF_FORMAT_FUNC(3, 4);
OPENSSL_EXPORT int BIO_vsnprintf(char *buf, size_t n, const char *format,
va_list args)
- __bio_h__attr__((__format__(__printf__, 3, 0)));
-#undef __bio_h__attr__
+ OPENSSL_PRINTF_FORMAT_FUNC(3, 0);
#if defined(__cplusplus)