New mdb_get_version() function

See https://github.com/mdbtools/mdbtools/issues/138
This commit is contained in:
Evan Miller 2020-09-02 14:55:32 -04:00
parent eaf4e86695
commit 9f23385a8c
3 changed files with 27 additions and 1 deletions

View File

@ -449,6 +449,9 @@ typedef struct {
extern MDB_DEPRECATED(void, mdb_init(void));
extern MDB_DEPRECATED(void, mdb_exit(void));
/* version.c */
const char *mdb_get_version(void);
/* file.c */
ssize_t mdb_read_pg(MdbHandle *mdb, unsigned long pg);
ssize_t mdb_read_alt_pg(MdbHandle *mdb, unsigned long pg);

View File

@ -1,5 +1,5 @@
lib_LTLIBRARIES = libmdb.la
libmdb_la_SOURCES= catalog.c mem.c file.c table.c data.c dump.c backend.c money.c sargs.c index.c like.c write.c stats.c map.c props.c worktable.c options.c iconv.c
libmdb_la_SOURCES= catalog.c mem.c file.c table.c data.c dump.c backend.c money.c sargs.c index.c like.c write.c stats.c map.c props.c worktable.c options.c iconv.c version.c
libmdb_la_LDFLAGS = -version-info 2:1:0
if FAKE_GLIB
libmdb_la_SOURCES += fakeglib.c

23
src/libmdb/version.c Normal file
View File

@ -0,0 +1,23 @@
/* MDB Tools - A library for reading MS Access database files
* Copyright (C) 2020 Evan Miller
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "mdbver.h"
const char *mdb_get_version() {
return MDB_VERSION_NO;
}