*: test for daylight and timezone
configure.ac: test for stdbool.h
This commit is contained in:
25
configure.ac
25
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.102 2004/10/28 11:13:40 rocky Exp $])dnl
|
||||
AC_REVISION([$Id: configure.ac,v 1.103 2004/10/30 00:38:43 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)
|
||||
AC_CHECK_HEADERS(glob.h stdbool.h)
|
||||
|
||||
dnl compiler
|
||||
AC_C_BIGENDIAN
|
||||
@@ -325,6 +325,27 @@ AC_CHECK_MEMBER([struct tm.tm_gmtoff],
|
||||
,
|
||||
[#include <time.h>])
|
||||
|
||||
if test $ac_cv_member_struct_tm_tm_gmtoff = yes ; then
|
||||
AC_MSG_CHECKING([whether time.h defines daylight and timezone variables])
|
||||
AC_TRY_RUN([
|
||||
#include <time.h>
|
||||
|
||||
|
||||
extern char *tzname[2];
|
||||
extern long timezone;
|
||||
extern int daylight;
|
||||
|
||||
int
|
||||
main() {
|
||||
return (timezone != 0) + daylight;
|
||||
}
|
||||
],[AC_DEFINE(HAVE_DAYLIGHT, 1,
|
||||
[Define if time.h defines extern long timezone and int daylight vars.])
|
||||
has_daylight=yes
|
||||
],[has_daylight=no])
|
||||
AC_MSG_RESULT($has_daylight)
|
||||
fi
|
||||
|
||||
if test x$enable_joliet = x; then
|
||||
AC_ARG_ENABLE(joliet,
|
||||
[ --disable-joliet don't include Joliet extension support],
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: iso9660.c,v 1.22 2004/10/26 06:33:49 rocky Exp $
|
||||
$Id: iso9660.c,v 1.23 2004/10/30 00:38:43 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.22 2004/10/26 06:33:49 rocky Exp $";
|
||||
static const char _rcsid[] = "$Id: iso9660.c,v 1.23 2004/10/30 00:38:43 rocky Exp $";
|
||||
|
||||
/* some parameters... */
|
||||
#define SYSTEM_ID "CD-RTOS CD-BRIDGE"
|
||||
@@ -101,9 +101,11 @@ iso9660_get_dtime (const iso9660_dtime_t *idr_date, bool b_localtime,
|
||||
#if defined(HAVE_TM_GMTOFF) && defined(HAVE_TZSET)
|
||||
if (b_localtime) {
|
||||
tzset();
|
||||
p_tm->tm_zone = (char *) tzname;
|
||||
#if defined(HAVE_DAYLIGHT)
|
||||
p_tm->tm_isdst = daylight;
|
||||
p_tm->tm_gmtoff = timezone;
|
||||
p_tm->tm_zone = (char *) tzname;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user