Moving the major.minor.micro definition from configure.ac to libburn.h

This commit is contained in:
Thomas Schmitt 2008-01-29 21:09:16 +00:00
parent 9ee6c1c4d8
commit 2eb71652d5
3 changed files with 42 additions and 5 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2008.01.27.143933"
#define Cdrskin_timestamP "2008.01.29.210821"

View File

@ -66,17 +66,22 @@ dnl The linker will do no finer checks. Especially no age range check for
dnl the application binary. If SONAME matches, then the couple starts.
dnl
dnl Therefore at run time info is provided by libburn function burn_version().
dnl It returns the MAJOR, MINOR and MICRO revision of the library.
dnl It returns the major, minor and micro revision of the library.
dnl Before using any API feature, a program should check for age.
dnl
dnl The variables BURN_*_VERSION are mere copies for informing libtool.
dnl The true values which get issued and should be compared are macros
dnl defined in libburn/libburn.h .
dnl
dnl Normally one can allow a program to run with a library which passed the
dnl linker SONAME test and which is not older than the library it was
dnl developed for. Library2 is younger than library1 if:
dnl MAJOR2>MAJOR1 || (MAJOR2==MAJOR1 &&
dnl (MINOR2>MINOR1 || (MINOR2==MINOR1 && MICRO2 > MICRO1)))
dnl major2>major1 || (major2==major1 &&
dnl (minor2>minor1 || (minor2==minor1 && micro2 > micro1)))
dnl
dnl If BURN_*_VERSION changes, be sure to change AC_INIT above to match.
dnl
dnl As said: Only copies. Original in libburn/libburn.h : burn_header_version_*
BURN_MAJOR_VERSION=0
BURN_MINOR_VERSION=4
BURN_MICRO_VERSION=3

View File

@ -2036,7 +2036,9 @@ int burn_track_get_mode(struct burn_track *track);
*/
int burn_session_get_hidefirst(struct burn_session *session);
/** Returns the library's version in its parts
/** Returns the library's version in its parts.
This is the runtime counterpart of the three build time macros
burn_header_version_* below.
@param major The major version number
@param minor The minor version number
@param micro The micro version number
@ -2044,6 +2046,36 @@ int burn_session_get_hidefirst(struct burn_session *session);
void burn_version(int *major, int *minor, int *micro);
/* ts A80129 */
/** These three release version numbers tell the revision of this header file
and of the API it describes. They are memorized by applications at build
time.
An application of libburn can easily memorize the version of the
libisofs.h header in its own code. Immediately after burn_initialize()
it should do this check:
burn_version(&major, &minor, &micro);
if(major > burn_header_version_major
|| (major == burn_header_version_major
&& (minor > burn_header_version_minor
|| (minor == burn_header_version_minor
&& micro >= burn_header_version_micro)))) {
... Young enough. Go on with program run ....
} else {
... Too old. Do not use this libburn version ...
}
*/
#define burn_header_version_major 0
#define burn_header_version_minor 4
#define burn_header_version_micro 3
/** Note:
Above version numbers are also recorded in configure.ac because libtool
wants them as parameters at build time.
For the library compatibility check BURN_*_VERSION in configure.ac
are not decisive. Only the three numbers above do matter.
*/
/* ts A60924 : ticket 74 */
/** Control queueing and stderr printing of messages from libburn.
Severity may be one of "NEVER", "ABORT", "FATAL", "FAILURE", "SORRY",