diff --git a/acinclude.m4 b/acinclude.m4 index 5551bb8d..b149e34e 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -50,8 +50,9 @@ dnl From Bruno Haible. dnl AC_DEFUN([LIBBURNIA_CHECK_ICONV], [ + dnl Check whether it is allowed to link with -liconv - AC_MSG_CHECKING([for separate -liconv ]) + AC_MSG_CHECKING([for iconv() in separate -liconv ]) libburnia_liconv="no" libburnia_save_LIBS="$LIBS" LIBS="$LIBS -liconv" @@ -65,6 +66,13 @@ AC_DEFUN([LIBBURNIA_CHECK_ICONV], ) AC_MSG_RESULT([$libburnia_liconv]) + if test x"$libburnia_save_LIBS" = x"$LIBS" + then + dnl GNU iconv has no function iconv() but libiconv() and a macro iconv() + dnl It is not tested whether this is detected by above macro. + AC_CHECK_LIB(iconv, libiconv, , ) + fi + dnl Check for iconv(..., const char **inbuf, ...) AC_MSG_CHECKING([for const qualifier with iconv() ]) AC_TRY_COMPILE([ @@ -79,6 +87,50 @@ size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, si ]) +dnl LIBBURNIA_ASSERT_ICONV is by Thomas Schmitt, libburnia project +dnl +AC_DEFUN([LIBBURNIA_ASSERT_ICONV], +[ + if test x$XORRISO_ASSUME_ICONV = x + then + dnl Check for the essential gestures of libisofs/util.c + AC_MSG_CHECKING([for iconv() to be accessible now ]) + AC_TRY_LINK([ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include ], +[iconv_t cd = iconv_open("",""); +iconv(cd,NULL,NULL,NULL,NULL); +iconv_close(cd); +], [iconv_test="yes"], [iconv_test="no"] + ) + AC_MSG_RESULT([$iconv_test]) + if test x$iconv_test = xno + then + echo >&2 + echo "Cannot get function iconv() to work. Configuration aborted." >&2 + echo "Check whether your system needs a separate libiconv installed." >&2 + echo "If it is installed but not found, try something like" >&2 + echo ' export LDFLAGS="$LDFLAGS -L/usr/local/lib"' >&2 + echo ' export CPPFLAGS="$CPPFLAGS -I/usr/local/include"' >&2 + echo ' export LIBS="$LIBS -liconv"' >&2 + echo "You may override this test by exporting variable" >&2 + echo " XORRISO_ASSUME_ICONV=yes" >&2 + echo >&2 + (exit 1); exit 1; + fi + fi +]) + + dnl LIBBURNIA_SET_PKGCONFIG determines the install directory for the *.pc file. dnl Important: Must be performed _after_ TARGET_SHIZZLE dnl diff --git a/test/compare_file.c b/test/compare_file.c index 0e8ebf67..366f8609 100644 --- a/test/compare_file.c +++ b/test/compare_file.c @@ -126,11 +126,13 @@ int Compare_2_files(char *adr1, char *adr2, char *adrc, int flag) differs= 1; } if(s1.st_uid != s2.st_uid) { - printf("%s : st_uid : %d <> %d\n", a, s1.st_uid, s2.st_uid); + printf("%s : st_uid : %d <> %d\n", + a, (int) s1.st_uid, (int) s2.st_uid); differs= 1; } if(s1.st_gid != s2.st_gid) { - printf("%s : st_gid : %d <> %d\n", a, s1.st_gid, s2.st_gid); + printf("%s : st_gid : %d <> %d\n", + a, (int) s1.st_gid, (int) s2.st_gid); differs= 1; } if((S_ISCHR(s1.st_mode) && S_ISCHR(s2.st_mode)) || diff --git a/xorriso/configure_ac.txt b/xorriso/configure_ac.txt index cf762269..34a2041a 100644 --- a/xorriso/configure_ac.txt +++ b/xorriso/configure_ac.txt @@ -55,6 +55,8 @@ then dnl ts B00410 : To detect the need for -liconv and const argument of iconv() LIBBURNIA_CHECK_ICONV +dnl ts B00411 : To abort configuration if iconv() still cannot be compiled +LIBBURNIA_ASSERT_ICONV else diff --git a/xorriso/xorriso.c b/xorriso/xorriso.c index 0a932ad7..9ff53012 100644 --- a/xorriso/xorriso.c +++ b/xorriso/xorriso.c @@ -8093,13 +8093,15 @@ int Xorriso_compare_2_files(struct XorrisO *xorriso, char *disk_adr, } if(s1.st_uid != s2.st_uid) { - sprintf(respt, "%s st_uid : %d <> %d\n", a, s1.st_uid, s2.st_uid); + sprintf(respt, "%s st_uid : %d <> %d\n", a, + (int) s1.st_uid, (int) s2.st_uid); if(!(flag&(1<<31))) Xorriso_result(xorriso,0); (*result)|= 16; } if(s1.st_gid != s2.st_gid) { - sprintf(respt, "%s st_gid : %d <> %d\n", a, s1.st_gid, s2.st_gid); + sprintf(respt, "%s st_gid : %d <> %d\n", a, + (int) s1.st_gid, (int) s2.st_gid); if(!(flag&(1<<31))) Xorriso_result(xorriso,0); (*result)|= 32; diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index fdd59332..ba3d4a5d 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2010.04.11.121418" +#define Xorriso_timestamP "2010.04.11.122253" diff --git a/xorriso/xorrisoburn.c b/xorriso/xorrisoburn.c index 28e801ad..7c79d0dd 100644 --- a/xorriso/xorrisoburn.c +++ b/xorriso/xorrisoburn.c @@ -1698,7 +1698,7 @@ int Xorriso_set_system_area(struct XorrisO *xorriso, char buf[32768], *bufpt= NULL; if(xorriso->system_area_disk_path[0] == 0) - goto do_set; + {ret= 0; goto do_set;} ret= Xorriso_afile_fopen(xorriso, xorriso->system_area_disk_path, "rb", &fp, 0); @@ -1718,10 +1718,12 @@ int Xorriso_set_system_area(struct XorrisO *xorriso, bufpt= buf; do_set:; - sprintf(xorriso->info_text, "Copying to System Area: %d bytes from file ", - ret); - Text_shellsafe(xorriso->system_area_disk_path, xorriso->info_text, 1); - Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0); + if(ret > 0) { + sprintf(xorriso->info_text, "Copying to System Area: %d bytes from file ", + ret); + Text_shellsafe(xorriso->system_area_disk_path, xorriso->info_text, 1); + Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0); + } ret= isoburn_igopt_set_system_area(sopts, bufpt, xorriso->system_area_options); if(ret != ISO_SUCCESS) {