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:
authorDavid Benjamin <davidben@chromium.org>2015-05-09 08:38:06 +0300
committerAdam Langley <agl@google.com>2015-05-11 21:38:08 +0300
commitc561aa64b6c42192806fb9f74d8ffafa2ab8d64f (patch)
tree4cda73f7baf2c852acd9e413cdba6700a9970a99 /include/openssl/bn.h
parent3bf1cca2621867d4776a0d939516c8d0add106d5 (diff)
Require source files define __STDC_FORMAT_MACROS to use BN FMT macros.
inttypes.h kindly requires a feature macro in C++ on some platforms, due to a bizarre footnote in C99 (see footnote 191 in section 7.8.1). As bn.h is a public header, we must leak this wart to the consumer. On platforms with unfriendly inttypes.h headers, using BN_DEC_FMT1 and friends now require the feature macro be defined externally. This broke the Chromium Android Clang builder: http://build.chromium.org/p/chromium.linux/builders/Android%20Clang%20Builder%20%28dbg%29/builds/59288 Change-Id: I88275a6788c7babd0eae32cae86f115bfa93a591 Reviewed-on: https://boringssl-review.googlesource.com/4688 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'include/openssl/bn.h')
-rw-r--r--include/openssl/bn.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/openssl/bn.h b/include/openssl/bn.h
index 18aba5ff..2cd02245 100644
--- a/include/openssl/bn.h
+++ b/include/openssl/bn.h
@@ -139,7 +139,12 @@ extern "C" {
* will allow you to work with numbers until you run out of memory. */
-/* BN_ULONG is the native word size when working with big integers. */
+/* BN_ULONG is the native word size when working with big integers.
+ *
+ * Note: on some platforms, inttypes.h does not define print format macros in
+ * C++ unless |__STDC_FORMAT_MACROS| defined. As this is a public header, bn.h
+ * does not define |__STDC_FORMAT_MACROS| itself. C++ source files which use the
+ * FMT macros must define it externally. */
#if defined(OPENSSL_64_BIT)
#define BN_ULONG uint64_t
#define BN_BITS2 64