Changes by: antona
Update of /cvsroot/linux-ntfs/ntfsprogs/libntfs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30562/libntfs
Modified Files:
Makefile.am version.c
Log Message:
- Add API (actually renamed from what Rich/FlatCap did):
volume.[hc]::ntfs_libntfs_version() which returns a pointer to a
static const string of the libntfs verion, i.e. at the moment this is
"8.0.0". This required moving the version specifications from
libntfs/Makefile.am to configure.ac. This should hopefully have the
sideeffect that I will remember to increment it when incrementing the
ntfsprogs version number when making a release given the two are
right under one another. (Anton)
- Change ALL utilities to display the libntfs version they are running
on. This should make debugging easier in the case that people are
running mismatched utilities/library. (Anton)
Index: Makefile.am
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/libntfs/Makefile.am,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -p -r1.31 -r1.32
--- Makefile.am 24 Sep 2005 22:54:55 -0000 1.31
+++ Makefile.am 7 Oct 2005 14:10:57 -0000 1.32
@@ -25,7 +25,7 @@
# - If the interface is the same as the previous version, change to C:R+1:A
#
-LTVERSION_LIBNTFS = 8:0:0
+# For LTVERSION_LIBNTFS see configure.ac!
LTVERSION_LIBNTFS_GNOMEVFS = 1:0:0
@@ -33,6 +33,8 @@ linux_ntfsincludedir = -I$(top_srcdir)/i
lib_LTLIBRARIES = libntfs.la
libntfs_la_LDFLAGS = -version-info $(LTVERSION_LIBNTFS)
+libntfs_la_CFLAGS = $(LIBNTFS_CFLAGS) \
+ -DLTVERSION_LIBNTFS=\"$(LTVERSION_LIBNTFS)\"
libntfs_la_SOURCES = \
attrib.c \
attrlist.c \
@@ -84,4 +86,3 @@ EXTRA_DIST = unix_io.c win32_io.c libntf
MAINTAINERCLEANFILES = Makefile.in
libs: $(lib_LTLIBRARIES)
-
Index: version.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/libntfs/version.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- version.c 22 Sep 2005 16:41:43 -0000 1.1
+++ version.c 7 Oct 2005 14:10:57 -0000 1.2
@@ -1,6 +1,7 @@
/**
- * version.c - Info about the NTFS library. Part of the Linux-NTFS project.
+ * version.c - Info about the NTFS library. Part of the Linux-NTFS project.
*
+ * Copyright (c) 2005 Anton Altaparmakov
* Copyright (c) 2005 Richard Russon
*
* This program/include file is free software; you can redistribute it and/or
@@ -25,17 +26,20 @@
#include "version.h"
-#ifndef VERSION
-#define VERSION "unknown"
+#ifdef LTVERSION_LIBNTFS
+#define LIBNTFS_VERSION_STRING LTVERSION_LIBNTFS
+#else
+#define LIBNTFS_VERSION_STRING "unknown"
#endif
+static const char *libntfs_version_string = LIBNTFS_VERSION_STRING;
+
/**
- * ntfs_get_library_version - Version number of the library release
+ * ntfs_libntfs_version - query version number of the ntfs library libntfs
*
- * Returns a text string representing the release of libntfs, e.g. "1.9.4".
+ * Returns pointer to a text string representing the version of libntfs.
*/
-const char * ntfs_get_library_version (void)
+const char *ntfs_libntfs_version(void)
{
- return VERSION;
+ return libntfs_version_string;
}
-
|