diff --git a/TODO b/TODO index def9e7b11..472a7e0b3 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,9 @@ + * localize asctime() + + * if --libdir is used, the extensions are put in a wrong place. + How does GNOME handle this or make a new option for this directory. + * Should we use the ElGamal subkey if the DSA keyid is given? What about an option --loose-keyid-match? diff --git a/VERSION b/VERSION index c2c0004f0..3b3812a78 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.3.5 +0.3.5a diff --git a/configure.in b/configure.in index 0ee39a5df..49bcf43fb 100644 --- a/configure.in +++ b/configure.in @@ -182,7 +182,7 @@ dnl Checks for library functions. AC_FUNC_VPRINTF AC_CHECK_FUNCS(strerror stpcpy strlwr tcgetattr rand strtoul mlock mmap) AC_CHECK_FUNCS(memmove gettimeofday getrusage gethrtime setrlimit) -AC_CHECK_FUNCS(atexit raise getpagesize) +AC_CHECK_FUNCS(atexit raise getpagesize strftime) WK_CHECK_IPC if test "$ac_cv_header_sys_shm_h" = "yes"; then diff --git a/g10/ChangeLog b/g10/ChangeLog index a6c769728..3a4c2911e 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,7 @@ +Tue Sep 15 17:52:55 1998 Werner Koch (wk@(none)) + + * mainproc.c (check_sig_and_print): Replaced ascime by asctimestamp. + Mon Sep 14 11:40:52 1998 Werner Koch (wk@(none)) * seskey.c (make_session_key): Now detects weak keys. diff --git a/g10/g10.c b/g10/g10.c index a41ecb335..a13abd7ba 100644 --- a/g10/g10.c +++ b/g10/g10.c @@ -382,6 +382,7 @@ i18n_init(void) #ifdef ENABLE_NLS #ifdef HAVE_LC_MESSAGES setlocale( LC_MESSAGES, "" ); + setlocale( LC_TIME, "" ); #else setlocale( LC_ALL, "" ); #endif diff --git a/g10/mainproc.c b/g10/mainproc.c index ccc529693..1e8af7e21 100644 --- a/g10/mainproc.c +++ b/g10/mainproc.c @@ -829,7 +829,6 @@ static int check_sig_and_print( CTX c, KBNODE node ) { PKT_signature *sig = node->pkt->pkt.signature; - time_t stamp = sig->timestamp; const char *astr, *tstr; int rc; @@ -838,7 +837,7 @@ check_sig_and_print( CTX c, KBNODE node ) return 0; } - tstr = asctime(localtime (&stamp)); + tstr = asctimestamp(sig->timestamp); astr = pubkey_algo_to_string( sig->pubkey_algo ); log_info(_("Signature made %.*s using %s key ID %08lX\n"), (int)strlen(tstr)-1, tstr, astr? astr: "?", (ulong)sig->keyid[1] ); diff --git a/include/util.h b/include/util.h index cd4d488ca..05610452c 100644 --- a/include/util.h +++ b/include/util.h @@ -134,7 +134,8 @@ const char *print_fname_stdout( const char *s ); /*-- miscutil.c --*/ u32 make_timestamp(void); u32 add_days_to_timestamp( u32 stamp, u16 days ); -const char *strtimestamp( u32 stamp ); +const char *strtimestamp( u32 stamp ); /* GMT */ +const char *asctimestamp( u32 stamp ); /* localized */ void print_string( FILE *fp, byte *p, size_t n, int delim ); int answer_is_yes( const char *s ); diff --git a/util/ChangeLog b/util/ChangeLog index edcbb5ca3..d282d9a3e 100644 --- a/util/ChangeLog +++ b/util/ChangeLog @@ -1,3 +1,7 @@ +Tue Sep 15 17:52:21 1998 Werner Koch (wk@(none)) + + * miscutil.c (asctimestamp): New. + Mon Sep 14 09:38:18 1998 Werner Koch (wk@(none)) * secmem.c (init_pool): Now mmaps /dev/zero if we do not have MAP_ANON. diff --git a/util/miscutil.c b/util/miscutil.c index 041c6faa5..00293089d 100644 --- a/util/miscutil.c +++ b/util/miscutil.c @@ -39,6 +39,9 @@ add_days_to_timestamp( u32 stamp, u16 days ) return stamp + days*86400L; } +/**************** + * Note: this function returns GMT + */ const char * strtimestamp( u32 stamp ) { @@ -52,6 +55,26 @@ strtimestamp( u32 stamp ) return buffer; } +/**************** + * Note: this function returns local time + */ +const char * +asctimestamp( u32 stamp ) +{ + static char buffer[30]; + struct tm *tp; + time_t atime = stamp; + + tp = localtime( &atime ); + #ifdef HAVE_STRFTIME + mem2str( buffer, asctime(tp), DIM(buffer) ); + #else + strftime( buffer, DIM(buffer)-1, "%c", tp ); + buffer[DIM(buffer)-1] = 0; + #endif + return buffer; +} + /**************** * Print a string to FP, but filter all control characters out. */ diff --git a/zlib/Makefile b/zlib/Makefile index 26c6aa6d2..d63ebb229 100644 --- a/zlib/Makefile +++ b/zlib/Makefile @@ -66,13 +66,13 @@ host_alias = i586-pc-linux-gnu host_triplet = i586-pc-linux-gnu target_alias = i586-pc-linux-gnu target_triplet = i586-pc-linux-gnu -CATALOGS = en.mo de.mo it.mo fr.mo -CATOBJEXT = .mo +CATALOGS = en.gmo de.gmo it.gmo fr.gmo +CATOBJEXT = .gmo CC = gcc CPP = gcc -E -DATADIRNAME = lib +DATADIRNAME = share DYNLINK_LDFLAGS = -rdynamic -G10_LOCALEDIR = /usr/local/lib/locale +G10_LOCALEDIR = /usr/local/share/locale GENCAT = GMOFILES = en.gmo de.gmo it.gmo fr.gmo GMSGFMT = /usr/local/bin/msgfmt @@ -80,9 +80,9 @@ GT_NO = GT_YES = #YES# INCLUDE_LOCALE_H = #include INSTOBJEXT = .mo -INTLDEPS = -INTLLIBS = -INTLOBJS = +INTLDEPS = $(top_builddir)/intl/libintl.a +INTLLIBS = $(top_builddir)/intl/libintl.a +INTLOBJS = $(GETTOBJS) MKINSTALLDIRS = scripts/mkinstalldirs MPI_EXTRA_ASM_OBJS = MSGFMT = /usr/local/bin/msgfmt @@ -90,9 +90,9 @@ PACKAGE = gnupg POFILES = en.po de.po it.po fr.po POSUB = po RANLIB = ranlib -USE_INCLUDED_LIBINTL = no +USE_INCLUDED_LIBINTL = yes USE_NLS = yes -VERSION = 0.3.5 +VERSION = 0.3.5a ZLIBS = l = @@ -122,7 +122,7 @@ LIBRARIES = $(noinst_LIBRARIES) DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I.. CPPFLAGS = LDFLAGS = -LIBS = -ldl -lz +LIBS = -ldl -lz libzlib_a_LIBADD = libzlib_a_OBJECTS = adler32.o compress.o crc32.o gzio.o uncompr.o \ deflate.o trees.o zutil.o inflate.o infblock.o inftrees.o infcodes.o \