configure.ac, iso9660.c: test for tzname variable.
configure.ac, iso9660_fs.c: test for nls_langinfo() and #include <langinfo.h> iso-info.c: some OS's need 2 args for multi-arg defines.
This commit is contained in:
22
configure.ac
22
configure.ac
@@ -19,7 +19,7 @@ define(RELEASE_NUM, 71)
|
||||
define(CDIO_VERSION_STR, 0.$1cvs)
|
||||
|
||||
AC_PREREQ(2.52)
|
||||
AC_REVISION([$Id: configure.ac,v 1.103 2004/10/30 00:38:43 rocky Exp $])dnl
|
||||
AC_REVISION([$Id: configure.ac,v 1.104 2004/10/30 02:55:17 rocky Exp $])dnl
|
||||
AC_INIT(libcdio, CDIO_VERSION_STR(RELEASE_NUM))
|
||||
AC_CONFIG_SRCDIR(src/cd-info.c)
|
||||
AM_INIT_AUTOMAKE
|
||||
@@ -114,7 +114,7 @@ AM_PATH_LIBPOPT(,
|
||||
dnl headers
|
||||
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(glob.h stdbool.h)
|
||||
AC_CHECK_HEADERS(glob.h stdbool.h langinfo.h)
|
||||
|
||||
dnl compiler
|
||||
AC_C_BIGENDIAN
|
||||
@@ -317,7 +317,7 @@ AC_DEFINE_UNQUOTED(LICDIO_SOURCE_PATH, "$LIBCDIO_SOURCE_PATH",
|
||||
[Full path to libcdio top_sourcedir.])
|
||||
AC_SUBST(LIBCDIO_SOURCE_PATH)
|
||||
|
||||
AC_CHECK_FUNCS( memset bzero memcpy tzset )
|
||||
AC_CHECK_FUNCS( memset bzero memcpy tzset nl_langinfo )
|
||||
|
||||
AC_CHECK_MEMBER([struct tm.tm_gmtoff],
|
||||
[AC_DEFINE(HAVE_TM_GMTOFF, 1,
|
||||
@@ -344,6 +344,22 @@ int
|
||||
has_daylight=yes
|
||||
],[has_daylight=no])
|
||||
AC_MSG_RESULT($has_daylight)
|
||||
AC_MSG_CHECKING([whether time.h defines tzname variable])
|
||||
AC_TRY_RUN([
|
||||
#include <time.h>
|
||||
|
||||
|
||||
extern char *tzname[2];
|
||||
|
||||
int
|
||||
main() {
|
||||
return (tzname != NULL);
|
||||
}
|
||||
],[AC_DEFINE(HAVE_TZNAME, 1,
|
||||
[Define if time.h defines extern extern char *tzname[2] variable])
|
||||
has_tzname=yes
|
||||
],[has_tzname=no])
|
||||
AC_MSG_RESULT($has_tzname)
|
||||
fi
|
||||
|
||||
if test x$enable_joliet = x; then
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: iso9660.c,v 1.23 2004/10/30 00:38:43 rocky Exp $
|
||||
$Id: iso9660.c,v 1.24 2004/10/30 02:55:17 rocky Exp $
|
||||
|
||||
Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
|
||||
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
|
||||
@@ -37,7 +37,7 @@
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
static const char _rcsid[] = "$Id: iso9660.c,v 1.23 2004/10/30 00:38:43 rocky Exp $";
|
||||
static const char _rcsid[] = "$Id: iso9660.c,v 1.24 2004/10/30 02:55:17 rocky Exp $";
|
||||
|
||||
/* some parameters... */
|
||||
#define SYSTEM_ID "CD-RTOS CD-BRIDGE"
|
||||
@@ -101,7 +101,9 @@ iso9660_get_dtime (const iso9660_dtime_t *idr_date, bool b_localtime,
|
||||
#if defined(HAVE_TM_GMTOFF) && defined(HAVE_TZSET)
|
||||
if (b_localtime) {
|
||||
tzset();
|
||||
#if defined(HAVE_TZNAME)
|
||||
p_tm->tm_zone = (char *) tzname;
|
||||
#endif
|
||||
#if defined(HAVE_DAYLIGHT)
|
||||
p_tm->tm_isdst = daylight;
|
||||
p_tm->tm_gmtoff = timezone;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: iso9660_fs.c,v 1.37 2004/10/29 02:11:48 rocky Exp $
|
||||
$Id: iso9660_fs.c,v 1.38 2004/10/30 02:55:17 rocky Exp $
|
||||
|
||||
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
|
||||
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
|
||||
@@ -35,7 +35,9 @@
|
||||
# include <iconv.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LANGINFO
|
||||
#include <langinfo.h>
|
||||
#endif
|
||||
|
||||
#include <cdio/cdio.h>
|
||||
#include <cdio/bytesex.h>
|
||||
@@ -49,7 +51,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
static const char _rcsid[] = "$Id: iso9660_fs.c,v 1.37 2004/10/29 02:11:48 rocky Exp $";
|
||||
static const char _rcsid[] = "$Id: iso9660_fs.c,v 1.38 2004/10/30 02:55:17 rocky Exp $";
|
||||
|
||||
/* Implementation of iso9660_t type */
|
||||
struct _iso9660 {
|
||||
@@ -144,7 +146,11 @@ static bool
|
||||
ucs2be_to_locale(ICONV_CONST char *psz_ucs2be, size_t i_inlen,
|
||||
char **p_psz_out, size_t i_outlen)
|
||||
{
|
||||
#ifdef HAVE_NL_LANGINFO
|
||||
iconv_t ic = iconv_open(nl_langinfo(CODESET), "UCS-2BE");
|
||||
#else
|
||||
iconv_t ic = iconv_open("ASCII", "UCS-2BE");
|
||||
#endif
|
||||
int rc;
|
||||
char *psz_buf = NULL;
|
||||
char *psz_buf2;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: iso-info.c,v 1.15 2004/10/29 02:11:48 rocky Exp $
|
||||
$Id: iso-info.c,v 1.16 2004/10/30 02:55:17 rocky Exp $
|
||||
|
||||
Copyright (C) 2004 Rocky Bernstein <rocky@panix.com>
|
||||
|
||||
@@ -288,7 +288,7 @@ main(int argc, const char *argv[])
|
||||
}
|
||||
|
||||
if (source_name==NULL) {
|
||||
err_exit("No input device given/found\n");
|
||||
err_exit("No input device given/found%s\n", "");
|
||||
}
|
||||
|
||||
if (opts.no_joliet) {
|
||||
@@ -299,7 +299,7 @@ main(int argc, const char *argv[])
|
||||
|
||||
if (p_iso==NULL) {
|
||||
free(source_name);
|
||||
err_exit("Error in opening ISO-9660 image\n");
|
||||
err_exit("Error in opening ISO-9660 image%s\n", "");
|
||||
}
|
||||
|
||||
if (opts.silent == 0) {
|
||||
|
||||
Reference in New Issue
Block a user