gnupg (7 files)

cvs user wk cvs at cvs.gnupg.org
Mon Mar 14 21:28:05 CET 2005


    Date: Monday, March 14, 2005 @ 21:41:20
  Author: wk
    Path: /cvs/gnupg/gnupg

   Added: scripts/conf-w32/README scripts/conf-w32/bzip2-1.diff
Modified: g10/ChangeLog g10/card-util.c include/util.h util/ChangeLog
          util/miscutil.c

* card-util.c (card_status): Use isotimestamp and not the
localized asctimestamp to match the timezone used in the key
information.

* miscutil.c (isotimestamp): New.


-------------------------------+
 g10/ChangeLog                 |    4 ++++
 g10/card-util.c               |    6 +++---
 include/util.h                |    1 +
 scripts/conf-w32/README       |    2 ++
 scripts/conf-w32/bzip2-1.diff |   39 +++++++++++++++++++++++++++++++++++++++
 util/ChangeLog                |    4 ++++
 util/miscutil.c               |   25 ++++++++++++++++++++++++-
 7 files changed, 77 insertions(+), 4 deletions(-)


Index: gnupg/g10/ChangeLog
diff -u gnupg/g10/ChangeLog:1.704 gnupg/g10/ChangeLog:1.705
--- gnupg/g10/ChangeLog:1.704	Mon Mar 14 20:19:20 2005
+++ gnupg/g10/ChangeLog	Mon Mar 14 21:41:20 2005
@@ -1,5 +1,9 @@
 2005-03-14  Werner Koch  <wk at g10code.com>
 
+	* card-util.c (card_status): Use isotimestamp and not the
+	localized asctimestamp to match the timezone used in the key
+	information.
+
 	* cardglue.c (pin_cb): Disable debug output.
 
 2005-03-11  Werner Koch  <wk at g10code.com>
Index: gnupg/g10/card-util.c
diff -u gnupg/g10/card-util.c:1.29 gnupg/g10/card-util.c:1.30
--- gnupg/g10/card-util.c:1.29	Mon Mar 14 20:19:20 2005
+++ gnupg/g10/card-util.c	Mon Mar 14 21:41:20 2005
@@ -426,17 +426,17 @@
       print_sha1_fpr (fp, info.fpr1valid? info.fpr1:NULL);
       if (info.fpr1valid && info.fpr1time)
         tty_fprintf (fp, "      created ....: %s\n",
-                     asctimestamp (info.fpr1time));
+                     isotimestamp (info.fpr1time));
       tty_fprintf (fp, "Encryption key....:");
       print_sha1_fpr (fp, info.fpr2valid? info.fpr2:NULL);
       if (info.fpr2valid && info.fpr2time)
         tty_fprintf (fp, "      created ....: %s\n",
-                     asctimestamp (info.fpr2time));
+                     isotimestamp (info.fpr2time));
       tty_fprintf (fp, "Authentication key:");
       print_sha1_fpr (fp, info.fpr3valid? info.fpr3:NULL);
       if (info.fpr3valid && info.fpr3time)
         tty_fprintf (fp, "      created ....: %s\n",
-                     asctimestamp (info.fpr3time));
+                     isotimestamp (info.fpr3time));
       tty_fprintf (fp, "General key info..: "); 
 
       thefpr = (info.fpr1valid? info.fpr1 : info.fpr2valid? info.fpr2 : 
Index: gnupg/include/util.h
diff -u gnupg/include/util.h:1.78 gnupg/include/util.h:1.79
--- gnupg/include/util.h:1.78	Thu Oct 21 18:56:22 2004
+++ gnupg/include/util.h	Mon Mar 14 21:41:20 2005
@@ -152,6 +152,7 @@
 u32 add_days_to_timestamp( u32 stamp, u16 days );
 const char *strtimevalue( u32 stamp );
 const char *strtimestamp( u32 stamp ); /* GMT */
+const char *isotimestamp( u32 stamp ); /* GMT with hh:mm:ss */
 const char *asctimestamp( u32 stamp ); /* localized */
 void print_string( FILE *fp, const byte *p, size_t n, int delim );
 void print_string2( FILE *fp, const byte *p, size_t n, int delim, int delim2 );
Index: gnupg/scripts/conf-w32/README
diff -u /dev/null gnupg/scripts/conf-w32/README:1.1
--- /dev/null	Mon Mar 14 21:41:21 2005
+++ gnupg/scripts/conf-w32/README	Mon Mar 14 21:41:20 2005
@@ -0,0 +1,2 @@
+Files useful for building W32 versions.
+
Index: gnupg/scripts/conf-w32/bzip2-1.diff
diff -u /dev/null gnupg/scripts/conf-w32/bzip2-1.diff:1.1
--- /dev/null	Mon Mar 14 21:41:21 2005
+++ gnupg/scripts/conf-w32/bzip2-1.diff	Mon Mar 14 21:41:20 2005
@@ -0,0 +1,39 @@
+To include support for BZIP2 compression in GunPG for W32, the patch
+below should be applied to a stock bzip2-1.0.2 source.  The Build as
+usual using the mingw32 cross compiler package from Debian and install
+the library and header file on top of the cross compiler installation
+(/usr/i586-mingw32msvc/lib/).  Note that for ease of maintenance we
+don't used a DLL.                                      [wk 2005-03-14]
+
+
+diff -u orig/bzip2-1.0.2/Makefile bzip2-1.0.2/Makefile
+--- orig/bzip2-1.0.2/Makefile	2002-01-26 00:34:53.000000000 +0100
++++ bzip2-1.0.2/Makefile	2004-11-03 14:10:45.000000000 +0100
+@@ -2,9 +2,9 @@
+ SHELL=/bin/sh
+ 
+ # To assist in cross-compiling
+-CC=gcc
+-AR=ar
+-RANLIB=ranlib
++CC=i586-mingw32msvc-gcc
++AR=i586-mingw32msvc-ar
++RANLIB=i586-mingw32msvc-ranlib
+ LDFLAGS=
+ 
+ # Suitably paranoid flags to avoid bugs in gcc-2.7
+diff -u orig/bzip2-1.0.2/bzlib.h bzip2-1.0.2/bzlib.h
+--- orig/bzip2-1.0.2/bzlib.h	2001-12-30 03:19:45.000000000 +0100
++++ bzip2-1.0.2/bzlib.h	2004-11-03 14:32:41.000000000 +0100
+@@ -113,7 +114,7 @@
+ /* Need a definitition for FILE */
+ #include <stdio.h>
+ 
+-#ifdef _WIN32
++#if defined( _WIN32 ) && 0
+ #   include <windows.h>
+ #   ifdef small
+       /* windows.h define small to char */
+
+
+
Index: gnupg/util/ChangeLog
diff -u gnupg/util/ChangeLog:1.182 gnupg/util/ChangeLog:1.183
--- gnupg/util/ChangeLog:1.182	Thu Mar 10 10:52:05 2005
+++ gnupg/util/ChangeLog	Mon Mar 14 21:41:20 2005
@@ -1,3 +1,7 @@
+2005-03-14  Werner Koch  <wk at g10code.com>
+
+	* miscutil.c (isotimestamp): New.
+
 2005-03-10  Werner Koch  <wk at g10code.com>
 
 	* secmem.c (secmem_realloc): Take control information into account
Index: gnupg/util/miscutil.c
diff -u gnupg/util/miscutil.c:1.34 gnupg/util/miscutil.c:1.35
--- gnupg/util/miscutil.c:1.34	Thu Mar 10 10:52:05 2005
+++ gnupg/util/miscutil.c	Mon Mar 14 21:41:20 2005
@@ -1,6 +1,6 @@
 /* miscutil.c -  miscellaneous utilities
  * Copyright (C) 1998, 1999, 2000, 2001, 2003,
- *               2004 Free Software Foundation, Inc.
+ *               2004, 2005 Free Software Foundation, Inc.
  *
  * This file is part of GnuPG.
  *
@@ -137,6 +137,29 @@
     return buffer;
 }
 
+
+/****************
+ * Note: this function returns GMT
+ */
+const char *
+isotimestamp (u32 stamp)
+{
+    static char buffer[25+5];
+    struct tm *tp;
+    time_t atime = stamp;
+    
+    if (atime < 0) {
+        strcpy (buffer, "????" "-??" "-??" " " "??" ":" "??" ":" "??");
+    }
+    else {
+        tp = gmtime( &atime );
+        sprintf(buffer,"%04d-%02d-%02d %02d:%02d:%02d",
+                1900+tp->tm_year, tp->tm_mon+1, tp->tm_mday,
+                tp->tm_hour, tp->tm_min, tp->tm_sec);
+    }
+    return buffer;
+}
+
 /****************
  * Note: this function returns local time
  */




More information about the Gnupg-commits mailing list