61 lines
3.1 KiB
C
61 lines
3.1 KiB
C
#ifndef VERSION_H
|
|
#define VERSION_H
|
|
//---------------------------------------------------------------------------------------------------------------------------------
|
|
// File: version.h
|
|
// Contents: Version number constants
|
|
//
|
|
// Microsoft Drivers 5.1 for PHP for SQL Server
|
|
// Copyright(c) Microsoft Corporation
|
|
// All rights reserved.
|
|
// MIT License
|
|
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the ""Software""),
|
|
// to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
// and / or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions :
|
|
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
// THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
// IN THE SOFTWARE.
|
|
//---------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
// helper macros to stringify the a macro value
|
|
#define STRINGIFY(a) TOSTRING(a)
|
|
#define TOSTRING(a) #a
|
|
|
|
|
|
// Increase Major number with backward incompatible breaking changes.
|
|
// Increase Minor with backward compatible new functionalities and API changes.
|
|
// Increase Patch for backward compatible fixes.
|
|
#define SQLVERSION_MAJOR 5
|
|
#define SQLVERSION_MINOR 1
|
|
#define SQLVERSION_PATCH 2
|
|
#define SQLVERSION_BUILD 0
|
|
|
|
// Semantic versioning pre-release
|
|
// for stable releases should be empty
|
|
// "-RC" for release candidates
|
|
// "-preview" for ETP
|
|
#define SEMVER_PRERELEASE "preview"
|
|
// Semantic versioning build metadata, build meta data is not counted in precedence order.
|
|
#define SEMVER_BUILDMETA
|
|
|
|
#if SQLVERSION_BUILD > 0
|
|
#undef SEMVER_BUILDMETA
|
|
#define SEMVER_BUILDMETA "+" STRINGIFY( SQLVERSION_BUILD )
|
|
#endif
|
|
|
|
// Main version, dot separated 3 digits, Major.Minor.Patch
|
|
#define VER_APIVERSION_STR STRINGIFY( SQLVERSION_MAJOR ) "." STRINGIFY( SQLVERSION_MINOR ) "." STRINGIFY( SQLVERSION_PATCH )
|
|
|
|
// For preview release, we want the following:
|
|
// #define VER_FILEVERSION_STR VER_APIVERSION_STR "-" SEMVER_PRERELEASE SEMVER_BUILDMETA
|
|
// because pecl doesn't like dashes. However, if SEMVER_PRERELEASE is empty, the "-" must be removed
|
|
#define VER_FILEVERSION_STR VER_APIVERSION_STR "-" SEMVER_PRERELEASE SEMVER_BUILDMETA
|
|
#define _FILEVERSION SQLVERSION_MAJOR,SQLVERSION_MINOR,SQLVERSION_PATCH,SQLVERSION_BUILD
|
|
|
|
// PECL package version macros (can't have '-' or '+')
|
|
#define PHP_SQLSRV_VERSION VER_APIVERSION_STR SEMVER_PRERELEASE
|
|
#define PHP_PDO_SQLSRV_VERSION PHP_SQLSRV_VERSION
|
|
|
|
#endif // VERSION_H
|