.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "BSON_VERSION" "3" "Apr 02, 2024" "1.26.2" "libbson" .sp Versioning Macros and Functions .SH MACROS .sp The following preprocessor macros can be used to perform various checks based on the version of the library you are compiling against. This may be useful if you only want to enable a feature on a certain version of the library. .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .EX #define BSON_CHECK_VERSION(major, minor, micro) #define BSON_MAJOR_VERSION (1) #define BSON_MINOR_VERSION (4) #define BSON_MICRO_VERSION (1) #define BSON_VERSION_S \(dq1.4.1\(dq #define BSON_VERSION_HEX \e (BSON_MAJOR_VERSION << 24 | BSON_MINOR_VERSION << 16 | \e BSON_MICRO_VERSION << 8) .EE .UNINDENT .UNINDENT .sp Only compile a block on Libbson 1.1.0 and newer. .INDENT 0.0 .INDENT 3.5 .sp .EX #if BSON_CHECK_VERSION(1, 1, 0) static void do_something (void) { } #endif .EE .UNINDENT .UNINDENT .SH AUTHOR MongoDB, Inc .SH COPYRIGHT 2017-present, MongoDB, Inc .\" Generated by docutils manpage writer. .