libblkid: add BLKID_{VERSION,DATE} to blkid.h

The original e2fsprogs has BLKID_{VERSION,DATE} macros in blkid.h.
Although the macros are not updated for many years in e2fsprogs. So I
guess nobody uses it.

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2009-10-27 11:30:37 +01:00
parent 048c62915f
commit 033cf439e3
5 changed files with 13 additions and 1 deletions

View File

@ -330,6 +330,7 @@ AC_ARG_ENABLE([libblkid],
AS_HELP_STRING([--disable-libblkid], [do not build libblkid and blkid utilities]),
[], enable_libblkid=yes
)
AC_SUBST([LIBBLKID_DATE])
AC_SUBST([LIBBLKID_VERSION])
AC_SUBST([LIBBLKID_VERSION_INFO])
AM_CONDITIONAL(BUILD_LIBBLKID, test "x$enable_libblkid" = xyes)
@ -1022,6 +1023,7 @@ shlibs/blkid/Makefile
shlibs/blkid/docs/Makefile
shlibs/blkid/docs/version.xml
shlibs/blkid/src/Makefile
shlibs/blkid/src/blkid.h
shlibs/blkid/src/superblocks/Makefile
shlibs/blkid/src/topology/Makefile
shlibs/blkid/src/partitions/Makefile

View File

@ -2,3 +2,4 @@
bin/blkid
bin/findfs
test_*
blkid.h

View File

@ -46,7 +46,7 @@ libblkid_la_LDFLAGS = -Wl,--version-script=$(ul_libblkid_srcdir)/blkid.sym \
tests = test_cache test_config test_dev test_devname test_devno test_getsize \
test_read test_resolve test_save test_tag test_verify test_evaluate
EXTRA_DIST = blkid.sym tst_types.c
EXTRA_DIST = blkid.sym tst_types.c blkid.h.in
CLEANFILES = $(tests)
tests: all $(tests)

View File

@ -30,6 +30,9 @@
extern "C" {
#endif
#define BLKID_VERSION "@LIBBLKID_VERSION@"
#define BLKID_DATE "@LIBBLKID_DATE@"
/**
* blkid_dev:
*

View File

@ -22,6 +22,12 @@
static const char *lib_version = LIBBLKID_VERSION; /* release version */
static const char *lib_date = LIBBLKID_DATE;
/**
* blkid_parse_version_string:
* @ver_string: version string (e.g. "2.16.0")
*
* Returns: release version code.
*/
int blkid_parse_version_string(const char *ver_string)
{
const char *cp;