patches/gnome-keyring-02-bad-ifdef-timegm.diff
author yippi
Mon, 27 Sep 2010 21:07:51 +0000
changeset 20108 51df67ca9307
parent 18290 ef9add352f94
permissions -rw-r--r--
I had these modules listed as being owned by me, but they are really owned by wangke, correcting.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
18290
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
     1
diff -ruN gnome-keyring-2.31.4.orig/egg/egg-asn1.c gnome-keyring-2.31.4/egg/egg-asn1.c
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
     2
--- gnome-keyring-2.31.4.orig/egg/egg-asn1.c	2010-07-26 12:13:40.278228000 +0100
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
     3
+++ gnome-keyring-2.31.4/egg/egg-asn1.c	2010-07-26 12:14:07.789561900 +0100
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
     4
@@ -440,36 +440,6 @@
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
     5
 		return century + year;
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
     6
 }
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
     7
 
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
     8
-#ifndef HAVE_TIMEGM
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
     9
-time_t timegm(struct tm *t)
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    10
-{
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    11
-	time_t tl, tb;
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    12
-	struct tm *tg;
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    13
-
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    14
-	tl = mktime (t);
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    15
-	if (tl == -1)
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    16
-	{
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    17
-		t->tm_hour--;
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    18
-		tl = mktime (t);
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    19
-		if (tl == -1)
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    20
-			return -1; /* can't deal with output from strptime */
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    21
-		tl += 3600;
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    22
-	}
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    23
-	tg = gmtime (&tl);
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    24
-	tg->tm_isdst = 0;
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    25
-	tb = mktime (tg);
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    26
-	if (tb == -1)
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    27
-	{
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    28
-		tg->tm_hour--;
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    29
-		tb = mktime (tg);
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    30
-		if (tb == -1)
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    31
-			return -1; /* can't deal with output from gmtime */
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    32
-		tb += 3600;
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    33
-	}
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    34
-	return (tl - (tb - tl));
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    35
-}
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    36
-#endif //NOT_HAVE_TIMEGM
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    37
-
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    38
 static gboolean
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    39
 parse_utc_time (const gchar *time, gsize n_time,
ef9add352f94 2010-07-29 Christian Kelly <[email protected]>
chrisk
parents:
diff changeset
    40
                 struct tm* when, gint *offset)