pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/www/liferea Replace calls to gmtime() with calls to gm...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/bf974a3f1b93
branches:  trunk
changeset: 537493:bf974a3f1b93
user:      smb <smb%pkgsrc.org@localhost>
date:      Wed Jan 09 20:12:19 2008 +0000

description:
Replace calls to gmtime() with calls to gmtime_r() in a threaded routine.

diffstat:

 www/liferea/Makefile         |   3 +-
 www/liferea/distinfo         |   3 +-
 www/liferea/patches/patch-ae |  52 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 56 insertions(+), 2 deletions(-)

diffs (81 lines):

diff -r 368430910d0a -r bf974a3f1b93 www/liferea/Makefile
--- a/www/liferea/Makefile      Wed Jan 09 20:09:35 2008 +0000
+++ b/www/liferea/Makefile      Wed Jan 09 20:12:19 2008 +0000
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.65 2008/01/08 15:14:25 smb Exp $
+# $NetBSD: Makefile,v 1.66 2008/01/09 20:12:19 smb Exp $
 
 DISTNAME=              liferea-1.4.10
 CATEGORIES=            www
 MASTER_SITES=          ${MASTER_SITE_SOURCEFORGE:=liferea/}
+PKGREVISION=           1
 
 MAINTAINER=            pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=              http://liferea.sourceforge.net/
diff -r 368430910d0a -r bf974a3f1b93 www/liferea/distinfo
--- a/www/liferea/distinfo      Wed Jan 09 20:09:35 2008 +0000
+++ b/www/liferea/distinfo      Wed Jan 09 20:12:19 2008 +0000
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.42 2008/01/06 15:53:44 drochner Exp $
+$NetBSD: distinfo,v 1.43 2008/01/09 20:12:19 smb Exp $
 
 SHA1 (liferea-1.4.10.tar.gz) = 7293e6872149308d0fbfdad57c3aae8ec20b6b63
 RMD160 (liferea-1.4.10.tar.gz) = af7656ef9e89850c5e5b2fcee4b9e1d5312ffaf5
 Size (liferea-1.4.10.tar.gz) = 1609333 bytes
+SHA1 (patch-aa) = 9c9ce0adae109b07ee69422830d35eb09445ec6b
diff -r 368430910d0a -r bf974a3f1b93 www/liferea/patches/patch-ae
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/liferea/patches/patch-ae      Wed Jan 09 20:12:19 2008 +0000
@@ -0,0 +1,52 @@
+$NetBSD: patch-ae,v 1.1 2008/01/09 20:12:19 smb Exp $
+
+--- src/common.c.orig  2008-01-09 11:46:50.000000000 -0500
++++ src/common.c       2008-01-09 11:46:53.000000000 -0500
+@@ -196,7 +196,7 @@
+ 
+ /* converts a ISO 8601 time string to a time_t value */
+ time_t parseISO8601Date(gchar *date) {
+-      struct tm       tm;
++      struct tm       tm, t2buf;
+       time_t          t, t2, offset = 0;
+       gboolean        success = FALSE;
+       gchar *pos;
+@@ -252,7 +252,7 @@
+               if((time_t)(-1) != (t = mktime(&tm))) {
+                       /* Correct for the local timezone*/
+                       t = t - offset;
+-                      t2 = mktime(gmtime(&t));
++                      t2 = mktime(gmtime_r(&t, &t2buf));
+                       t = t - (t2 - t);
+                       
+                       return t;
+@@ -270,9 +270,9 @@
+ gchar *months[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
+ 
+ gchar *createRFC822Date(const time_t *time) {
+-      struct tm *tm;
++      struct tm *tm, tmbuf;
+ 
+-      tm = gmtime(time); /* No need to free because it is statically allocated */
++      tm = gmtime_r(time, &tmbuf); /* No need to free because it is statically allocated */
+       return g_strdup_printf("%s, %2d %s %4d %02d:%02d:%02d GMT", dayofweek[tm->tm_wday], tm->tm_mday,
+                                          months[tm->tm_mon], 1900 + tm->tm_year, tm->tm_hour, tm->tm_min, tm->tm_sec);
+ }
+@@ -322,7 +322,7 @@
+ 
+ /* converts a RFC822 time string to a time_t value */
+ time_t parseRFC822Date(gchar *date) {
+-      struct tm       tm;
++      struct tm       tm, t2buf;
+       time_t          t, t2;
+       char            *oldlocale;
+       char            *pos;
+@@ -370,7 +370,7 @@
+                          correction. (Usually, there is no daylight savings
+                          time since the input is GMT.) */
+                       t = t - common_parse_rfc822_tz(pos);
+-                      t2 = mktime(gmtime(&t));
++                      t2 = mktime(gmtime_r(&t, &t2buf));
+                       t = t - (t2 - t);
+                       return t;
+               } else {



Home | Main Index | Thread Index | Old Index