Add BORINGSSL_API_VERSION. The BORINGSSL_YYYYMM #defines have served well to coordinate short-term skews in BoringSSL's public API, but some consumers (notably wpa_supplicant in Android) wish to build against multiple versions for an extended period of time. Consumers should not do this unless there is no alternative, but to accommodate this, start a BORINGSSL_API_VERSION counter. In future, instead of BORINGSSL_YYYYMM #defines, we'll simply increment the number. This is specifically called an "API version" rather than a plain "version" as this number does not denote any particular point in development or stability. It purely counts how many times we found it convenient to let the preprocessor observe a public API change up to now. Change-Id: I39f9740ae8e793cef4c2b5fb5707b9763b3e55ce Reviewed-on: https://boringssl-review.googlesource.com/7870 Reviewed-by: Adam Langley <agl@google.com>
diff --git a/include/openssl/base.h b/include/openssl/base.h index 2211920..d4a4eac 100644 --- a/include/openssl/base.h +++ b/include/openssl/base.h
@@ -117,6 +117,16 @@ #define OPENSSL_VERSION_NUMBER 0x10002000 #define SSLEAY_VERSION_NUMBER OPENSSL_VERSION_NUMBER +/* BORINGSSL_API_VERSION is a positive integer that increments as BoringSSL + * changes over time. The value itself is not meaningful. It will be incremented + * whenever is convenient to coordinate an API change with consumers. This will + * not denote any special point in development. + * + * A consumer may use this symbol in the preprocessor to temporarily build + * against multiple revisions of BoringSSL at the same time. It is not + * recommended to do so for longer than is necessary. */ +#define BORINGSSL_API_VERSION 1 + #if defined(BORINGSSL_SHARED_LIBRARY) #if defined(OPENSSL_WINDOWS)