summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoris <is@pkgsrc.org>2013-01-09 17:22:14 +0000
committeris <is@pkgsrc.org>2013-01-09 17:22:14 +0000
commit22e0a3a878b23fe67b8c2008b39ee56926be3156 (patch)
treebc6374d00efa229b3be89560516fa0b30227041b
parent8f1a029134db494ee0aba9129d9e5f5d3f0ad16b (diff)
downloadpkgsrc-22e0a3a878b23fe67b8c2008b39ee56926be3156.tar.gz
Upgrade from the no-longer-maintained 2.x to 3.0.2. This fixes pkg/47421
-rw-r--r--time/ical/Makefile18
-rw-r--r--time/ical/PLIST145
-rw-r--r--time/ical/distinfo13
-rw-r--r--time/ical/patches/patch-aa82
-rw-r--r--time/ical/patches/patch-ab33
-rw-r--r--time/ical/patches/patch-ac15
-rw-r--r--time/ical/patches/patch-calendar_Item.C24
-rw-r--r--time/ical/patches/patch-time_Time.C72
8 files changed, 196 insertions, 206 deletions
diff --git a/time/ical/Makefile b/time/ical/Makefile
index 61101ef5993..7737f69990e 100644
--- a/time/ical/Makefile
+++ b/time/ical/Makefile
@@ -1,12 +1,15 @@
-# $NetBSD: Makefile,v 1.24 2013/01/08 15:26:09 wiz Exp $
+# $NetBSD: Makefile,v 1.25 2013/01/09 17:22:14 is Exp $
-DISTNAME= ical-2.3.1
-PKGREVISION= 4
+VER= 3.0.2
+DISTNAME= ical-${VER}
+EXTRACT_SUFFIX= .tar.gz
+#PKGREVISION= 1
CATEGORIES= time
-MASTER_SITES= # http://www.annexia.org/_file/
+MASTER_SITES= https://launchpad.net/ical-tcl/3.x/${VER}/+download/
+FETCH_USING= curl
MAINTAINER= pkgsrc-users@NetBSD.org
-#HOMEPAGE= http://www.annexia.org/freeware/ical
+HOMEPAGE= https://launchpad.net/ical-tcl/
COMMENT= Calendar application
PKG_INSTALLATION_TYPES= overwrite pkgviews
@@ -18,10 +21,13 @@ CONFIGURE_ARGS+= --prefix=${PREFIX:Q} \
--with-tclsh=${BUILDLINK_PREFIX.tcl}/bin/tclsh \
--with-tkconfig=${BUILDLINK_PREFIX.tk}/lib
+USE_TOOLS+= gmake gsed
+
+PLIST_SUBS+= "PKGVERSION=${VER}"
+
post-configure:
${TOUCH} ${WRKDIR}/${DISTNAME}/Makefile \
${WRKDIR}/${DISTNAME}/calendar/Makefile \
- ${WRKDIR}/${DISTNAME}/startup.tcl \
${WRKDIR}/${DISTNAME}/time/Makefile
.include "../../lang/tcl/buildlink3.mk"
diff --git a/time/ical/PLIST b/time/ical/PLIST
index eb69c492ac0..28a4a986458 100644
--- a/time/ical/PLIST
+++ b/time/ical/PLIST
@@ -1,65 +1,84 @@
-@comment $NetBSD: PLIST,v 1.3 2009/06/14 18:17:58 joerg Exp $
+@comment $NetBSD: PLIST,v 1.4 2013/01/09 17:22:14 is Exp $
bin/ical
-bin/ical-2.3
-lib/ical/v2.3/actions.tcl
-lib/ical/v2.3/alarm.tcl
-lib/ical/v2.3/apptlist.tcl
-lib/ical/v2.3/canvsup.tcl
-lib/ical/v2.3/contrib/README
-lib/ical/v2.3/contrib/ical.spec
-lib/ical/v2.3/contrib/ical.xbm
-lib/ical/v2.3/contrib/ical.xpm
-lib/ical/v2.3/contrib/ical2calendar
-lib/ical/v2.3/contrib/ical2html
-lib/ical/v2.3/contrib/ical2zsh
-lib/ical/v2.3/contrib/icaladd
-lib/ical/v2.3/contrib/icaladdlines
-lib/ical/v2.3/contrib/icalexpire
-lib/ical/v2.3/contrib/icalweekly
-lib/ical/v2.3/contrib/iconwindow.tcl
-lib/ical/v2.3/contrib/timeofday.tcl
-lib/ical/v2.3/contrib/weeknumber.tcl
-lib/ical/v2.3/dateeditor.tcl
-lib/ical/v2.3/dayview.tcl
-lib/ical/v2.3/dg_alarms.tcl
-lib/ical/v2.3/dg_item.tcl
-lib/ical/v2.3/dg_key.tcl
-lib/ical/v2.3/dg_monthr.tcl
-lib/ical/v2.3/dg_print.tcl
-lib/ical/v2.3/dg_range.tcl
-lib/ical/v2.3/dg_wdays.tcl
-lib/ical/v2.3/help.tcl
-lib/ical/v2.3/ical_text.tcl
-lib/ical/v2.3/ical_x.tcl
-lib/ical/v2.3/io.tcl
-lib/ical/v2.3/itemlist.tcl
-lib/ical/v2.3/itemwindow.tcl
-lib/ical/v2.3/link.tcl
-lib/ical/v2.3/listing.tcl
-lib/ical/v2.3/notelist.tcl
-lib/ical/v2.3/parse.tcl
-lib/ical/v2.3/pref.tcl
-lib/ical/v2.3/print.tcl
-lib/ical/v2.3/support.tcl
-lib/ical/v2.3/tclIndex
-lib/ical/v2.3/tcllib/canvas.tcl
-lib/ical/v2.3/tcllib/class.tcl
-lib/ical/v2.3/tcllib/dg_bug.tcl
-lib/ical/v2.3/tcllib/dg_error.tcl
-lib/ical/v2.3/tcllib/dg_file.tcl
-lib/ical/v2.3/tcllib/dg_num.tcl
-lib/ical/v2.3/tcllib/dg_string.tcl
-lib/ical/v2.3/tcllib/dg_yn.tcl
-lib/ical/v2.3/tcllib/dg_ync.tcl
-lib/ical/v2.3/tcllib/filesel.tcl
-lib/ical/v2.3/tcllib/hooks.tcl
-lib/ical/v2.3/tcllib/key.tcl
-lib/ical/v2.3/tcllib/label.tcl
-lib/ical/v2.3/tcllib/menus.tcl
-lib/ical/v2.3/tcllib/ruler.tcl
-lib/ical/v2.3/tcllib/support.tcl
-lib/ical/v2.3/tcllib/tclIndex
-lib/ical/v2.3/tcllib/textwin.tcl
-lib/ical/v2.3/timerange.tcl
-lib/ical/v2.3/trigger.tcl
+lib/ical/v${PKGVERSION}/actions.tcl
+lib/ical/v${PKGVERSION}/alarm.tcl
+lib/ical/v${PKGVERSION}/apptlist.tcl
+lib/ical/v${PKGVERSION}/canvsup.tcl
+lib/ical/v${PKGVERSION}/contrib/README
+lib/ical/v${PKGVERSION}/contrib/calicon.tcl
+lib/ical/v${PKGVERSION}/contrib/ical-2.2-duplicates.patch
+lib/ical/v${PKGVERSION}/contrib/ical-2.2-no-locincpth.patch
+lib/ical/v${PKGVERSION}/contrib/ical-2.3.1-filesel_slash_fix.patch
+lib/ical/v${PKGVERSION}/contrib/ical-2.3.1-item_mouseover_expansion-1.patch
+lib/ical/v${PKGVERSION}/contrib/ical-2.3.1-item_mouseover_expansion-2.patch
+lib/ical/v${PKGVERSION}/contrib/ical-2.3.2-earlywarning_notice.patch
+lib/ical/v${PKGVERSION}/contrib/ical-2.3.3-tcl8.6.patch
+lib/ical/v${PKGVERSION}/contrib/ical-fedora1.patch
+lib/ical/v${PKGVERSION}/contrib/ical-script
+lib/ical/v${PKGVERSION}/contrib/ical.spec
+lib/ical/v${PKGVERSION}/contrib/ical.xbm
+lib/ical/v${PKGVERSION}/contrib/ical.xpm
+lib/ical/v${PKGVERSION}/contrib/ical2calendar
+lib/ical/v${PKGVERSION}/contrib/ical2html
+lib/ical/v${PKGVERSION}/contrib/ical2ics
+lib/ical/v${PKGVERSION}/contrib/ical2zsh
+lib/ical/v${PKGVERSION}/contrib/icaladd
+lib/ical/v${PKGVERSION}/contrib/icaladdlines
+lib/ical/v${PKGVERSION}/contrib/icalexpire
+lib/ical/v${PKGVERSION}/contrib/icalweekly
+lib/ical/v${PKGVERSION}/contrib/icon.png
+lib/ical/v${PKGVERSION}/contrib/iconwindow.tcl
+lib/ical/v${PKGVERSION}/contrib/oster_termine
+lib/ical/v${PKGVERSION}/contrib/public_item.tcl
+lib/ical/v${PKGVERSION}/contrib/publical
+lib/ical/v${PKGVERSION}/contrib/timeofday.tcl
+lib/ical/v${PKGVERSION}/contrib/weeknumber.tcl
+lib/ical/v${PKGVERSION}/dateeditor.tcl
+lib/ical/v${PKGVERSION}/dayview.tcl
+lib/ical/v${PKGVERSION}/dg_alarms.tcl
+lib/ical/v${PKGVERSION}/dg_colors.tcl
+lib/ical/v${PKGVERSION}/dg_item.tcl
+lib/ical/v${PKGVERSION}/dg_key.tcl
+lib/ical/v${PKGVERSION}/dg_monthr.tcl
+lib/ical/v${PKGVERSION}/dg_print.tcl
+lib/ical/v${PKGVERSION}/dg_range.tcl
+lib/ical/v${PKGVERSION}/dg_wdays.tcl
+lib/ical/v${PKGVERSION}/help.tcl
+lib/ical/v${PKGVERSION}/ical_doc.tcl
+lib/ical/v${PKGVERSION}/ical_text.tcl
+lib/ical/v${PKGVERSION}/ical_x.tcl
+lib/ical/v${PKGVERSION}/interface_doc.tcl
+lib/ical/v${PKGVERSION}/io.tcl
+lib/ical/v${PKGVERSION}/itemlist.tcl
+lib/ical/v${PKGVERSION}/itemwindow.tcl
+lib/ical/v${PKGVERSION}/link.tcl
+lib/ical/v${PKGVERSION}/listing.tcl
+lib/ical/v${PKGVERSION}/notelist.tcl
+lib/ical/v${PKGVERSION}/parse.tcl
+lib/ical/v${PKGVERSION}/pref.tcl
+lib/ical/v${PKGVERSION}/print.tcl
+lib/ical/v${PKGVERSION}/ps_header.tcl
+lib/ical/v${PKGVERSION}/startup.tcl
+lib/ical/v${PKGVERSION}/support.tcl
+lib/ical/v${PKGVERSION}/tclIndex
+lib/ical/v${PKGVERSION}/tcllib/canvas.tcl
+lib/ical/v${PKGVERSION}/tcllib/class.tcl
+lib/ical/v${PKGVERSION}/tcllib/dg_bug.tcl
+lib/ical/v${PKGVERSION}/tcllib/dg_error.tcl
+lib/ical/v${PKGVERSION}/tcllib/dg_file.tcl
+lib/ical/v${PKGVERSION}/tcllib/dg_num.tcl
+lib/ical/v${PKGVERSION}/tcllib/dg_string.tcl
+lib/ical/v${PKGVERSION}/tcllib/dg_yn.tcl
+lib/ical/v${PKGVERSION}/tcllib/dg_ync.tcl
+lib/ical/v${PKGVERSION}/tcllib/filesel.tcl
+lib/ical/v${PKGVERSION}/tcllib/hooks.tcl
+lib/ical/v${PKGVERSION}/tcllib/key.tcl
+lib/ical/v${PKGVERSION}/tcllib/label.tcl
+lib/ical/v${PKGVERSION}/tcllib/menus.tcl
+lib/ical/v${PKGVERSION}/tcllib/ruler.tcl
+lib/ical/v${PKGVERSION}/tcllib/support.tcl
+lib/ical/v${PKGVERSION}/tcllib/tclIndex
+lib/ical/v${PKGVERSION}/tcllib/textwin.tcl
+lib/ical/v${PKGVERSION}/timerange.tcl
+lib/ical/v${PKGVERSION}/trigger.tcl
man/man1/ical.1
diff --git a/time/ical/distinfo b/time/ical/distinfo
index 22395d71112..bc44dd649a5 100644
--- a/time/ical/distinfo
+++ b/time/ical/distinfo
@@ -1,8 +1,7 @@
-$NetBSD: distinfo,v 1.10 2011/01/29 22:53:29 markd Exp $
+$NetBSD: distinfo,v 1.11 2013/01/09 17:22:14 is Exp $
-SHA1 (ical-2.3.1.tar.gz) = 98649b7e1fbad9c13356eb5dded693d81b2252f2
-RMD160 (ical-2.3.1.tar.gz) = 98642da1ef330ca3a5cf099508fb09dcdeb208be
-Size (ical-2.3.1.tar.gz) = 264576 bytes
-SHA1 (patch-aa) = 29d06f928f67165f5579aa87487b88f1aa2e0031
-SHA1 (patch-ab) = ccfdc593988195128c837bac36d706150b5a7df6
-SHA1 (patch-ac) = 31e9d5dbb205065b146276ebde7a1a4207418477
+SHA1 (ical-3.0.2.tar.gz) = 8a0c2f132979320cb2c24b187cb7238698161e5d
+RMD160 (ical-3.0.2.tar.gz) = e66326edf0cc562e601770959df3a415126ae8c5
+Size (ical-3.0.2.tar.gz) = 308788 bytes
+SHA1 (patch-calendar_Item.C) = 66fbf2c57829188ca9ae0456ef13c1bc8bba8702
+SHA1 (patch-time_Time.C) = 8e2452a91f81884d6fd99487f81c35108e7d9023
diff --git a/time/ical/patches/patch-aa b/time/ical/patches/patch-aa
deleted file mode 100644
index 4205be04fc0..00000000000
--- a/time/ical/patches/patch-aa
+++ /dev/null
@@ -1,82 +0,0 @@
-$NetBSD: patch-aa,v 1.3 2009/07/07 20:12:01 joerg Exp $
-
---- Makefile.in.orig 2004-03-11 12:26:55.000000000 +0100
-+++ Makefile.in
-@@ -76,13 +76,13 @@ OBJS = cal_tcl.o dateeditor.o dispatch.o
- all: $(CONFIGURED) ical
-
- ical: $(LIB3) $(LIB2) $(LIB1) $(OBJS) main.o
-- $(CXXLINKER) -o $@ $(OBJS) main.o $(LIBS)
-+ $(CXXLINKER) -o $@ $(OBJS) main.o -Wl,-R${LOCALBASE}/lib -Wl,-R${X11BASE}/lib $(LIBS)
-
- ical-bundle: $(LIB3) $(LIB2) $(LIB1) $(OBJS) mbundle.o
-- $(CXXLINKER) -o $@ $(OBJS) mbundle.o $(BLIBS)
-+ $(CXXLINKER) -o $@ $(OBJS) mbundle.o -Wl,-R${LOCALBASE}/lib -Wl,-R${X11BASE}/lib $(BLIBS)
-
- ical-tiny: $(LIB3) $(LIB2) $(LIB1) $(OBJS) mbundle.o
-- $(CXXLINKER) -o $@ $(OBJS) mbundle.o $(TINY_BLIBS)
-+ $(CXXLINKER) -o $@ $(OBJS) mbundle.o -Wl,-R${LOCALBASE}/lib -Wl,-R${X11BASE}/lib $(TINY_BLIBS)
-
- $(LIB1): FRC
- @echo making in calendar
-@@ -153,39 +153,39 @@ install: instbin instman instlib instcon
- @echo installation finished
-
- instbin: ical
-- -$(MKDIR) $(BINDIR)
-- $(INSTALL) ical $(BINDIR)/ical-@ICAL_VERSION@
-- $(RM) -f $(BINDIR)/ical
-- $(LN_S) ical-@ICAL_VERSION@ $(BINDIR)/ical
-+ -$(MKDIR) ${DESTDIR}$(BINDIR)
-+ $(INSTALL) ical ${DESTDIR}$(BINDIR)/ical-@ICAL_VERSION@
-+ $(RM) -f ${DESTDIR}$(BINDIR)/ical
-+ $(LN_S) ical-@ICAL_VERSION@ ${DESTDIR}$(BINDIR)/ical
-
- instman:
-- -$(MKDIR) $(MANDIR)
-- -$(MKDIR) $(MANDIR)/man1
-- -$(INSTALL_DATA) $(srcdir)/doc/ical.man $(MANDIR)/man1/ical.1
-+ -$(MKDIR) ${DESTDIR}$(MANDIR)
-+ -$(MKDIR) ${DESTDIR}$(MANDIR)/man1
-+ -$(INSTALL_DATA) $(srcdir)/doc/ical.man ${DESTDIR}$(MANDIR)/man1/ical.1
-
- instlib:
-- -$(MKDIR) $(LIBDIR)
-- -$(MKDIR) $(LIBDIR)/ical
-- -$(MKDIR) $(ILIBDIR)
-- -$(MKDIR) $(ILIBDIR)/tcllib
-+ -$(MKDIR) ${DESTDIR}$(LIBDIR)
-+ -$(MKDIR) ${DESTDIR}$(LIBDIR)/ical
-+ -$(MKDIR) ${DESTDIR}$(ILIBDIR)
-+ -$(MKDIR) ${DESTDIR}$(ILIBDIR)/tcllib
- @for f in $(LIB_FILES) $(srcdir)/tcllib/tclIndex ; do\
-- echo $(INSTALL_DATA) $$f $(ILIBDIR)/tcllib/`basename $$f`;\
-- $(INSTALL_DATA) $$f $(ILIBDIR)/tcllib/`basename $$f`;\
-+ echo $(INSTALL_DATA) $$f ${DESTDIR}$(ILIBDIR)/tcllib/`basename $$f`;\
-+ $(INSTALL_DATA) $$f ${DESTDIR}$(ILIBDIR)/tcllib/`basename $$f`;\
- done
- @for f in $(ICAL_FILES) $(srcdir)/tclIndex ; do\
-- echo $(INSTALL_DATA) $$f $(ILIBDIR)/`basename $$f`;\
-- $(INSTALL_DATA) $$f $(ILIBDIR)/`basename $$f`;\
-+ echo $(INSTALL_DATA) $$f ${DESTDIR}$(ILIBDIR)/`basename $$f`;\
-+ $(INSTALL_DATA) $$f ${DESTDIR}$(ILIBDIR)/`basename $$f`;\
- done
-
- instcontrib:
-- -$(MKDIR) $(LIBDIR)
-- -$(MKDIR) $(LIBDIR)/ical
-- -$(MKDIR) $(ILIBDIR)
-- -$(MKDIR) $(ILIBDIR)/contrib
-+ -$(MKDIR) ${DESTDIR}$(LIBDIR)
-+ -$(MKDIR) ${DESTDIR}$(LIBDIR)/ical
-+ -$(MKDIR) ${DESTDIR}$(ILIBDIR)
-+ -$(MKDIR) ${DESTDIR}$(ILIBDIR)/contrib
- @for f in $(srcdir)/contrib/* ; do\
- if test -f $$f ; then\
-- echo $(INSTALL_DATA) $$f $(ILIBDIR)/contrib/`basename $$f`;\
-- $(INSTALL_DATA) $$f $(ILIBDIR)/contrib/`basename $$f`;\
-+ echo $(INSTALL_DATA) $$f ${DESTDIR}$(ILIBDIR)/contrib/`basename $$f`;\
-+ $(INSTALL_DATA) $$f ${DESTDIR}$(ILIBDIR)/contrib/`basename $$f`;\
- fi;\
- done
-
diff --git a/time/ical/patches/patch-ab b/time/ical/patches/patch-ab
deleted file mode 100644
index d17ef234c3f..00000000000
--- a/time/ical/patches/patch-ab
+++ /dev/null
@@ -1,33 +0,0 @@
-$NetBSD: patch-ab,v 1.4 2008/02/03 19:36:33 markd Exp $
-
---- dateeditor.C.orig 2004-03-12 00:26:56.000000000 +1300
-+++ dateeditor.C
-@@ -148,12 +148,12 @@ int Cmd_HiliteLoop(ClientData, Tcl_Inter
- char buffer[20];
- sprintf(buffer, "%d", list[i].date.EpochDays());
- if (Tcl_SetVar(tcl, dvar, buffer, 0) == NULL) {
-- free((char*) strlist);
-+ Tcl_Free((char*) strlist);
- TCL_Error(tcl, "could not set loop variable");
- }
-
- if (Tcl_SetVar(tcl, hvar, (char*)hilite, 0) == NULL) {
-- free((char*) strlist);
-+ Tcl_Free((char*) strlist);
- TCL_Error(tcl, "could not set loop variable");
- }
-
-@@ -165,11 +165,11 @@ int Cmd_HiliteLoop(ClientData, Tcl_Inter
- if (result == TCL_BREAK) break;
-
- // Error of some sort
-- free((char*) strlist);
-+ Tcl_Free((char*) strlist);
- return result;
- }
-
-- free((char*) strlist);
-+ Tcl_Free((char*) strlist);
- TCL_Return(tcl, "");
- }
-
diff --git a/time/ical/patches/patch-ac b/time/ical/patches/patch-ac
deleted file mode 100644
index 6536b335d96..00000000000
--- a/time/ical/patches/patch-ac
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-ac,v 1.4 2011/01/29 22:53:29 markd Exp $
-
-Fix build with gcc4.5
-
---- calendar/calfile.C.orig 2004-03-11 11:26:56.000000000 +0000
-+++ calendar/calfile.C
-@@ -58,7 +58,7 @@ CalFile::CalFile(int ro, const char* nam
- backupName = tmp;
-
- // Get directory name for access checks
-- char* lastSlash = strrchr(name, '/');
-+ const char* lastSlash = strrchr(name, '/');
- if (lastSlash == 0) {
- /* Calendar is in current directory */
- tmp = new char[3];
diff --git a/time/ical/patches/patch-calendar_Item.C b/time/ical/patches/patch-calendar_Item.C
new file mode 100644
index 00000000000..c2a4cdad480
--- /dev/null
+++ b/time/ical/patches/patch-calendar_Item.C
@@ -0,0 +1,24 @@
+$NetBSD: patch-calendar_Item.C,v 1.1 2013/01/09 17:22:14 is Exp $
+
+--- calendar/item.C.orig 2009-07-28 19:09:43.000000000 +0000
++++ calendar/item.C
+@@ -388,8 +388,8 @@ void Appointment::convert_tz(Date &d, in
+ cache.from_d=d;
+ cache.to_tz=to_tz;
+
+- const char* old=getenv("TZ");
+- if (old) old=strdupa(old);
++ char* old=getenv("TZ");
++ if (old) old=strdup(old);
+
+ struct tm t;
+ WeekDay wd;
+@@ -427,6 +427,8 @@ void Appointment::convert_tz(Date &d, in
+ min=t1->tm_min+t1->tm_hour*60;
+ cache.to_d=d;
+ cache.to_min=min;
++
++ if (old) free(old);
+ }
+
+ int Appointment::contains(Date d) const {
diff --git a/time/ical/patches/patch-time_Time.C b/time/ical/patches/patch-time_Time.C
new file mode 100644
index 00000000000..c0fdfc2500c
--- /dev/null
+++ b/time/ical/patches/patch-time_Time.C
@@ -0,0 +1,72 @@
+$NetBSD: patch-time_Time.C,v 1.1 2013/01/09 17:22:14 is Exp $
+
+--- time/Time.C.orig 2009-01-18 13:18:20.000000000 +0000
++++ time/Time.C
+@@ -4,7 +4,6 @@
+ #include <sys/types.h>
+ #include <math.h>
+ #include <string.h>
+-#include <alloca.h>
+ #include <stdlib.h>
+
+ #include "config.h"
+@@ -54,13 +53,13 @@ void Time::BreakDown(int& mday, WeekDay&
+ int& hour, int& min, int& sec, int& milli,
+ const char *tz) const
+ {
+- const char *old;
++ char *old;
+ if (! initialized) Initialize();
+
+ time_t clock = (time_t) round(rep + offset);
+
+ if (tz) {
+- if ((old=getenv("TZ"))) old=strdupa(old);
++ if ((old=getenv("TZ"))) old=strdup(old);
+ setenv("TZ", tz, 1);
+ tzset();
+ }
+@@ -80,6 +79,8 @@ void Time::BreakDown(int& mday, WeekDay&
+ min = t->tm_min;
+ sec = t->tm_sec;
+ milli = (int)round((rep - floor(rep)) * 1000);
++
++ if(tz) free(old);
+ }
+
+ Time::Time(const struct timeval& tv) {
+@@ -96,8 +97,8 @@ void Time::Convert(struct timeval& tv) c
+
+ #if 0
+ time_t timezone_to_local(time_t clock, const char *tz) {
+- const char *old=getenv("TZ");
+- if (old) old=strdupa(old);
++ char *old=getenv("TZ");
++ if (old) old=strdup(old);
+
+ struct tm* t = localtime(&clock);
+ setenv("TZ", tz, 1);
+@@ -107,12 +108,13 @@ time_t timezone_to_local(time_t clock, c
+ if (old) setenv("TZ", old, 1); else unsetenv("TZ");
+ tzset();
+
++ if(old) free(old);
+ return clock;
+ }
+
+ time_t local_to_timezone(time_t clock, const char *tz) {
+- const char *old=getenv("TZ");
+- if (old) old=strdupa(old);
++ char *old=getenv("TZ");
++ if (old) old=strdup(old);
+
+ setenv("TZ", tz, 1);
+ tzset();
+@@ -122,6 +124,7 @@ time_t local_to_timezone(time_t clock, c
+ tzset();
+ clock = mktime(t);
+
++ if (old) free(old);
+ return clock;
+ }
+ #endif