add changelog
[platform/upstream/gdbm.git] / src / version.c
1 /* version.c - This is file contains the version number for gdbm source. */
2
3 /* This file is part of GDBM, the GNU data base manager.
4    Copyright (C) 1990, 1991, 1993, 2007, 2011, 2013 Free Software Foundation,
5    Inc.
6
7    GDBM is free software; you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation; either version 3, or (at your option)
10    any later version.
11
12    GDBM is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
16
17    You should have received a copy of the GNU General Public License
18    along with GDBM. If not, see <http://www.gnu.org/licenses/>.   */
19
20 #include "autoconf.h"
21 #include "gdbm.h"
22
23 /* Keep a string with the version number in it.
24    The DIST_DATE magic below is replaced by the actual date when
25    making the distdir. */
26 const char * gdbm_version = "GDBM version " PACKAGE_VERSION ". "
27 "13/11/2011";
28
29 int const gdbm_version_number[3] = {
30   GDBM_VERSION_MAJOR,
31   GDBM_VERSION_MINOR,
32   GDBM_VERSION_PATCH
33 };
34
35 int
36 gdbm_version_cmp (int const a[], int const b[])
37 {
38   if (a[0] > b[0])
39     return 1;
40   else if (a[0] < b[0])
41     return -1;
42
43   if (a[1] > b[1])
44     return 1;
45   else if (a[1] < b[1])
46     return -1;
47
48   if (a[2] > b[2])
49     return 1;
50   else if (a[2] < b[2])
51     return -1;
52
53   return 0;
54 }