gnome-keyring r1304 - in trunk: . gp11
- From: nnielsen svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-keyring r1304 - in trunk: . gp11
- Date: Sun, 7 Sep 2008 15:09:09 +0000 (UTC)
Author: nnielsen
Date: Sun Sep 7 15:09:09 2008
New Revision: 1304
URL: http://svn.gnome.org/viewvc/gnome-keyring?rev=1304&view=rev
Log:
* gp11/gp11-slot.c: Build fix for Solaris.
Fixes bug #550943. Patch by Jeff Cai.
Modified:
trunk/ChangeLog
trunk/gp11/gp11-slot.c
Modified: trunk/gp11/gp11-slot.c
==============================================================================
--- trunk/gp11/gp11-slot.c (original)
+++ trunk/gp11/gp11-slot.c Sun Sep 7 15:09:09 2008
@@ -65,6 +65,39 @@
static guint signals[LAST_SIGNAL] = { 0 };
+#ifndef HAVE_TIMEGM
+
+time_t
+timegm(struct tm *t)
+{
+ time_t tl, tb;
+ struct tm *tg;
+
+ tl = mktime (t);
+ if (tl == -1)
+ {
+ t->tm_hour--;
+ tl = mktime (t);
+ if (tl == -1)
+ return -1;
+ tl += 3600;
+ }
+ tg = gmtime (&tl);
+ tg->tm_isdst = 0;
+ tb = mktime (tg);
+ if (tb == -1)
+ {
+ tg->tm_hour--;
+ tb = mktime (tg);
+ if (tb == -1)
+ return -1;
+ tb += 3600;
+ }
+ return (tl - (tb - tl));
+}
+
+#endif
+
/* ----------------------------------------------------------------------------
* HELPERS
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]