diff --git a/libisoburn/trunk/ChangeLog b/libisoburn/trunk/ChangeLog index 95e4b90b..17865b51 100644 --- a/libisoburn/trunk/ChangeLog +++ b/libisoburn/trunk/ChangeLog @@ -1,5 +1,6 @@ SVN trunk (to become libisoburn-0.6.4.pl00.tar.gz) =============================================================================== +* Tests for version of libjte, new API call isoburn_libjte_req() * New API calls isoburn_igopt_attach_jte() and isoburn_igopt_detach_jte() * New option -jigdo * New -as mkisofs options -jigdo-* and -md5-list as of genisoimage diff --git a/libisoburn/trunk/libisoburn/burn_wrap.c b/libisoburn/trunk/libisoburn/burn_wrap.c index fc1eab37..48c8b444 100644 --- a/libisoburn/trunk/libisoburn/burn_wrap.c +++ b/libisoburn/trunk/libisoburn/burn_wrap.c @@ -31,6 +31,9 @@ #include #include +#ifdef Xorriso_with_libjtE +#include +#endif #ifndef Xorriso_standalonE @@ -69,10 +72,10 @@ static int isoburn_emulate_toc(struct burn_drive *d, int flag); int isoburn_initialize(char msg[1024], int flag) { - int major, minor, micro, bad_match= 0; + int major, minor, micro, bad_match= 0, no_iso_init= 0; -/* First two ugly compile time checks for header version compatibility. +/* First the ugly compile time checks for header version compatibility. If everthing matches, then they produce no C code. In case of mismatch, intentionally faulty C code will be inserted. */ @@ -108,7 +111,7 @@ int isoburn_initialize(char msg[1024], int flag) #ifdef Isoburn_libisofs_dot_h_too_olD LIBISOFS_MISCONFIGURATION = 0; -INTENTIONAL_ABORT_OF_COMPILATION__HEADERFILE_libisofs_dot_h_TOO_OLD__SEE_libisoburn_dot_h_AND_burn_wrap_dot_h = 0; +INTENTIONAL_ABORT_OF_COMPILATION__HEADERFILE_libisofs_dot_h_TOO_OLD__SEE_libisoburn_dot_h_AND_burn_wrap_dot_c = 0; LIBISOFS_MISCONFIGURATION_ = 0; #endif @@ -149,14 +152,62 @@ INTENTIONAL_ABORT_OF_COMPILATION__HEADERFILE_libburn_dot_h_TOO_OLD__SEE_libisobu LIBBURN_MISCONFIGURATION_ = 0; #endif + +#ifdef Xorriso_with_libjtE + +/* The minimum requirement of libisoburn towards the libjte header + at compile time is the same as the one of a usable libisfs itowards libjte. + So the requirement is defined in libisofs/libisofs.h : + iso_libjte_req_major , iso_libjte_req_minor , iso_libjte_req_micro +*/ + /* The indendation is an advise of man gcc to help old compilers ignoring */ + #if iso_libjte_req_major > LIBJTE_VERSION_MAJOR + #define Libisofs_libjte_dot_h_too_olD 1 + #endif + #if iso_libjte_req_major == LIBJTE_VERSION_MAJOR && iso_libjte_req_minor > LIBJTE_VERSION_MINOR + #define Libisofs_libjte_dot_h_too_olD 1 + #endif + #if iso_libjte_req_minor == LIBJTE_VERSION_MINOR && iso_libjte_req_micro > LIBJTE_VERSION_MICRO + #define Libisofs_libjte_dot_h_too_olD 1 + #endif + +#ifdef Libisofs_libjte_dot_h_too_olD +LIBJTE_MISCONFIGURATION = 0; +INTENTIONAL_ABORT_OF_COMPILATION__HEADERFILE_libjte_dot_h_TOO_OLD__SEE_libisofs_dot_h_AND_burn_wrap.c_c = 0; +LIBJTE_MISCONFIGURATION_ = 0; +#endif + +#endif /* Xorriso_with_libjtE */ + + /* End of ugly compile time tests (scroll up for explanation) */ - msg[0]= 0; - if(iso_init()<0) { - sprintf(msg+strlen(msg), "Cannot initialize libisofs\n"); - return(0); + +#ifdef Xorriso_with_libjtE + + libjte__version(&major, &minor, µ); + sprintf(msg + strlen(msg), "libjte-%d.%d.%d ", major, minor, micro); + if (libjte__is_compatible(LIBJTE_VERSION_MAJOR, LIBJTE_VERSION_MINOR, + LIBJTE_VERSION_MICRO, 0)) { + sprintf(msg+strlen(msg), "ok, "); + } else { + sprintf(msg + strlen(msg), + "- TOO OLD -, need at least libjte-%d.%d.%d ,\n", + LIBJTE_VERSION_MAJOR, LIBJTE_VERSION_MINOR, + LIBJTE_VERSION_MICRO); + bad_match= 1; + no_iso_init= 1; /* iso_init() will fail anyway */ + } + +#endif /* Xorriso_with_libjtE */ + + if(!no_iso_init) { + if(iso_init()<0) { + sprintf(msg+strlen(msg), "Cannot initialize libisofs\n"); + return(0); + } } iso_lib_version(&major, &minor, µ); sprintf(msg+strlen(msg), "libisofs-%d.%d.%d ", major, minor, micro); @@ -233,6 +284,16 @@ int isoburn_libburn_req(int *major, int *minor, int *micro) } +/* API @since 0.6.4 */ +int isoburn_libjte_req(int *major, int *minor, int *micro) +{ + *major= LIBJTE_VERSION_MAJOR; + *minor= LIBJTE_VERSION_MINOR; + *micro= LIBJTE_VERSION_MICRO; + return(1); +} + + int isoburn_set_msgs_submit(int (*msgs_submit)(void *handle, int error_code, char msg_text[], int os_errno, char severity[], int flag), diff --git a/libisoburn/trunk/libisoburn/libisoburn.h b/libisoburn/trunk/libisoburn/libisoburn.h index ba77a521..3d267b61 100644 --- a/libisoburn/trunk/libisoburn/libisoburn.h +++ b/libisoburn/trunk/libisoburn/libisoburn.h @@ -234,6 +234,14 @@ void isoburn_version(int *major, int *minor, int *micro); #define isoburn_libburn_req_minor 8 #define isoburn_libburn_req_micro 7 +/** The minimum compile time requirements of libisoburn towards libjte are + the same as of a suitable libisofs towards libjte. + So use these macros from libisofs.h : + iso_libjte_req_major + iso_libjte_req_minor + iso_libjte_req_micro + @since 0.6.4 +*/ /** The minimum version of libisofs to be used with this version of libisoburn at runtime. This is checked already in isoburn_initialize() which will @@ -248,6 +256,17 @@ void isoburn_version(int *major, int *minor, int *micro); int isoburn_libisofs_req(int *major, int *minor, int *micro); +/** The minimum version of libjte to be used with this version of libisoburn + at runtime. The use of libjte is optional and depends on configure + tests. It can be prevented by ./configure option --disable-libjte . + This is checked already in isoburn_initialize() which will refuse on + outdated version. So this call is for information purposes after + successful startup only. + @since 0.6.4 +*/ +int isoburn_libjte_req(int *major, int *minor, int *micro); + + /** The minimum version of libburn to be used with this version of libisoburn at runtime. This is checked already in isoburn_initialize() which will refuse on outdated version. So this call is for information purposes after diff --git a/libisoburn/trunk/libisoburn/libisoburn.ver b/libisoburn/trunk/libisoburn/libisoburn.ver index d8f92d4a..ed42bc1a 100644 --- a/libisoburn/trunk/libisoburn/libisoburn.ver +++ b/libisoburn/trunk/libisoburn/libisoburn.ver @@ -55,6 +55,7 @@ isoburn_initialize; isoburn_is_compatible; isoburn_libburn_req; isoburn_libisofs_req; +isoburn_libjte_req; isoburn_needs_emulation; isoburn_prepare_blind_grow; isoburn_prepare_disc; diff --git a/libisoburn/trunk/xorriso/xorriso_timestamp.h b/libisoburn/trunk/xorriso/xorriso_timestamp.h index 867dbec3..6a30dc03 100644 --- a/libisoburn/trunk/xorriso/xorriso_timestamp.h +++ b/libisoburn/trunk/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2010.10.04.113140" +#define Xorriso_timestamP "2010.10.04.155110"