diff options
author | David Benjamin <davidben@chromium.org> | 2015-05-09 08:38:06 +0300 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2015-05-11 21:38:08 +0300 |
commit | c561aa64b6c42192806fb9f74d8ffafa2ab8d64f (patch) | |
tree | 4cda73f7baf2c852acd9e413cdba6700a9970a99 /crypto/bn/bn_test.cc | |
parent | 3bf1cca2621867d4776a0d939516c8d0add106d5 (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 'crypto/bn/bn_test.cc')
-rw-r--r-- | crypto/bn/bn_test.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crypto/bn/bn_test.cc b/crypto/bn/bn_test.cc index 3c239d3b..9aa2bf58 100644 --- a/crypto/bn/bn_test.cc +++ b/crypto/bn/bn_test.cc @@ -67,6 +67,11 @@ * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems * Laboratories. */ +/* For BIGNUM format macros. */ +#if !defined(__STDC_FORMAT_MACROS) +#define __STDC_FORMAT_MACROS +#endif + #include <stdio.h> #include <string.h> @@ -76,7 +81,6 @@ #include <openssl/mem.h> #include "../crypto/test/scoped_types.h" -#include "internal.h" static const int num0 = 100; // number of tests |