// file : bpkg/bpkg-version -*- C++ -*- // copyright : Copyright (c) 2014-2016 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file #ifndef BPKG_VERSION // Note: using the version macro itself. #include // LIBBUTL_VERSION #include // LIBBPKG_VERSION // Version format is AABBCCDD where // // AA - major version number // BB - minor version number // CC - bugfix version number // DD - alpha / beta (DD + 50) version number // // When DD is not 00, 1 is subtracted from AABBCC. For example: // // Version AABBCCDD // 2.0.0 02000000 // 2.1.0 02010000 // 2.1.1 02010100 // 2.2.0-a1 02019901 // 3.0.0-b2 02999952 // #define BPKG_VERSION 39901 #define BPKG_VERSION_STR "0.4.0-a1" // Generally, we expect minor versions to be source code backwards- // compatible, thought we might have a minimum version requirement. // // Note: does not apply during early development. // #if LIBBUTL_VERSION != 39901 # error incompatible libbutl version #endif #if LIBBPKG_VERSION != 39901 # error incompatible libbpkg version #endif // User agent. // #if defined(_WIN32) # if defined(__MINGW32__) # define BPKG_OS "MinGW" # else # define BPKG_OS "Windows" # endif #elif defined(__linux) # define BPKG_OS "GNU/Linux" #elif defined(__APPLE__) # define BPKG_OS "MacOS" #elif defined(__CYGWIN__) # define BPKG_OS "Cygwin" #elif defined(__FreeBSD__) # define BPKG_OS "FreeBSD" #elif defined(__OpenBSD__) # define BPKG_OS "OpenBSD" #elif defined(__NetBSD__) # define BPKG_OS "NetBSD" #elif defined(__sun) # define BPKG_OS "Solaris" #elif defined(__hpux) # define BPKG_OS "HP-UX" #elif defined(_AIX) # define BPKG_OS "AIX" #elif defined(__unix) # define BPKG_OS "Unix" #elif defined(__posix) # define BPKG_OS "Posix" #else # define BPKG_OS "Other" #endif #define BPKG_USER_AGENT \ "bpkg/" BPKG_VERSION_STR " (" BPKG_OS "; +https://build2.org)" \ " libbpkg/" LIBBPKG_VERSION_STR \ " libbutl/" LIBBUTL_VERSION_STR #endif // BPKG_VERSION