hpp-util 6.0.0
Debugging tools for the HPP project.
Loading...
Searching...
No Matches
version.hh
Go to the documentation of this file.
1// Copyright (C) 2008, 2009 by Thomas Moulard, CNRS.
2//
3
4// Redistribution and use in source and binary forms, with or without
5// modification, are permitted provided that the following conditions are
6// met:
7//
8// 1. Redistributions of source code must retain the above copyright
9// notice, this list of conditions and the following disclaimer.
10//
11// 2. Redistributions in binary form must reproduce the above copyright
12// notice, this list of conditions and the following disclaimer in the
13// documentation and/or other materials provided with the distribution.
14//
15// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19// HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
26// DAMAGE.
27//
28// This software is provided "as is" without warranty of any kind,
29// either expressed or implied, including but not limited to the
30// implied warranties of fitness for a particular purpose.
31//
32// See the COPYING file for more information.
33
34#ifndef HPP_UTIL_VERSION_HH
35#define HPP_UTIL_VERSION_HH
36#include <hpp/util/config.hh>
37
38// Compare header version to library version.
39#define HPP_UTIL_CHECK() ::hpp::util::checkVersion(HPP_UTIL_VERSION)
40
41namespace hpp {
42namespace util {
43// Package version (compiled).
44HPP_UTIL_DLLAPI extern const char* version;
45
46// Check that header and library version are compatible.
47//
48// Return 0 if equal, 1 if library is newer and -1 if library is
49// older. The last possibility is an error and program should be
50// terminated in this case.
51HPP_UTIL_DLLAPI int checkVersion(const char* header_version);
52} // end of namespace util.
53} // end of namespace hpp.
54
55#endif
#define HPP_UTIL_DLLAPI
Definition config.hh:88
HPP_UTIL_DLLAPI const char * version
Definition version.cc:40
HPP_UTIL_DLLAPI int checkVersion(const char *header_version)
Definition version.cc:42
Definition assertion.hh:45