summaryrefslogtreecommitdiff
path: root/dviware/dvisvgm/libs/brotli/common/version.h
diff options
context:
space:
mode:
Diffstat (limited to 'dviware/dvisvgm/libs/brotli/common/version.h')
-rw-r--r--dviware/dvisvgm/libs/brotli/common/version.h37
1 files changed, 31 insertions, 6 deletions
diff --git a/dviware/dvisvgm/libs/brotli/common/version.h b/dviware/dvisvgm/libs/brotli/common/version.h
index 01b2998e25..8098040f64 100644
--- a/dviware/dvisvgm/libs/brotli/common/version.h
+++ b/dviware/dvisvgm/libs/brotli/common/version.h
@@ -9,18 +9,43 @@
#ifndef BROTLI_COMMON_VERSION_H_
#define BROTLI_COMMON_VERSION_H_
-/* This macro should only be used when library is compiled together with client.
- If library is dynamically linked, use BrotliDecoderVersion and
+/* Compose 3 components into a single number. In a hexadecimal representation
+ B and C components occupy exactly 3 digits. */
+#define BROTLI_MAKE_HEX_VERSION(A, B, C) ((A << 24) | (B << 12) | C)
+
+/* Those macros should only be used when library is compiled together with
+ the client. If library is dynamically linked, use BrotliDecoderVersion and
BrotliEncoderVersion methods. */
-/* Semantic version, calculated as (MAJOR << 24) | (MINOR << 12) | PATCH */
-#define BROTLI_VERSION 0x1000009
+#define BROTLI_VERSION_MAJOR 1
+#define BROTLI_VERSION_MINOR 1
+#define BROTLI_VERSION_PATCH 0
+
+#define BROTLI_VERSION BROTLI_MAKE_HEX_VERSION( \
+ BROTLI_VERSION_MAJOR, BROTLI_VERSION_MINOR, BROTLI_VERSION_PATCH)
/* This macro is used by build system to produce Libtool-friendly soname. See
https://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html
+ Version evolution rules:
+ - interfaces added (or change is compatible) -> current+1:0:age+1
+ - interfaces removed (or changed is incompatible) -> current+1:0:0
+ - interfaces not changed -> current:revision+1:age
*/
-/* ABI version, calculated as (CURRENT << 24) | (REVISION << 12) | AGE */
-#define BROTLI_ABI_VERSION 0x1009000
+#define BROTLI_ABI_CURRENT 2
+#define BROTLI_ABI_REVISION 0
+#define BROTLI_ABI_AGE 1
+
+#if BROTLI_VERSION_MAJOR != (BROTLI_ABI_CURRENT - BROTLI_ABI_AGE)
+#error ABI/API version inconsistency
+#endif
+
+#if BROTLI_VERSION_MINOR != BROTLI_ABI_AGE
+#error ABI/API version inconsistency
+#endif
+
+#if BROTLI_VERSION_PATCH != BROTLI_ABI_REVISION
+#error ABI/API version inconsistency
+#endif
#endif /* BROTLI_COMMON_VERSION_H_ */