[git] GnuPG - branch, STABLE-BRANCH-1-4, updated. gnupg-1.4.11-28-gdccdcef
by Werner Koch
cvs at cvs.gnupg.org
Tue Jan 10 12:46:42 CET 2012
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".
The branch, STABLE-BRANCH-1-4 has been updated
via dccdcef319014d3a0ec43c77017cd65a09240f0c (commit)
via 667ba59ec52d169902d7ef244cdcdde1bcc30681 (commit)
via b5b6cb57db47dc892b74c9e24caae7099b274a9f (commit)
from 6fe25e5602fabe92c68e5ba30e4777221e8612df (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit dccdcef319014d3a0ec43c77017cd65a09240f0c
Author: Werner Koch <wk at gnupg.org>
Date: Tue Jan 10 11:51:19 2012 +0100
Update copyright years.
* util/argparse.c (default_strusage): Update printed copyright year.
diff --git a/Makefile.am b/Makefile.am
index 144c16a..900cc9f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,5 @@
-# Copyright (C) 1998,1999,2000,2001,2003,2011 Free Software Foundation, Inc.
+# Copyright (C) 1998,1999,2000,2001,2003,2010,2011,
+# 2012 Free Software Foundation, Inc.
#
# This file is part of GnuPG.
#
diff --git a/README b/README
index cc55549..7ea6b71 100644
--- a/README
+++ b/README
@@ -1,11 +1,11 @@
GnuPG - The GNU Privacy Guard
-------------------------------
- Version 1.4.11
+ Version 1.4.12
- Copyright 1998, 1999, 2000, 2001, 2002, 2003,
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003,
2004, 2005, 2006, 2007, 2008, 2009,
- 2010 Free Software Foundation, Inc.
+ 2010, 2012 Free Software Foundation, Inc.
This file is free software; as a special exception the author
gives unlimited permission to copy and/or distribute it, with or
@@ -142,7 +142,7 @@
http://www.gnupg.org/documentation/howtos.html
A man page with a description of all commands and options gets installed
- along with the program.
+ along with the program.
Introduction
@@ -467,13 +467,13 @@
detailed information about the errors.
- Configure options
+ Configure options
-----------------
- Here is a list of configure options which are sometime useful
+ Here is a list of configure options which are sometime useful
for installation.
- --enable-static-rnd=<name>
+ --enable-static-rnd=<name>
Force the use of the random byte gathering
module <name>. Default is either to use /dev/random
or the auto mode. Value for name:
@@ -485,9 +485,9 @@
linux - Use the module which accesses /dev/random.
This is the first choice and the default one
for GNU/Linux or *BSD.
- auto - Compile linux, egd and unix in and
+ auto - Compile linux, egd and unix in and
automagically select at runtime.
-
+
--with-egd-socket=<name>
This is only used when EGD is used as random
gatherer. GnuPG uses by default "~/.gnupg/entropy"
@@ -497,13 +497,13 @@
"~/" uses the socket in the home directory of the user
and one starting with a "=" uses a socket in the
GnuPG home directory which is "~/.gnupg" by default.
-
+
--without-readline
Do not include support for the readline library
even if it is available. The default is to check
whether the readline library is a available and
use it to allow fancy command line editing.
-
+
--with-included-zlib
Forces usage of the local zlib sources. Default is
to use the (shared) library of the system.
@@ -530,15 +530,15 @@
(e.g. SunOS 5.7 on UltraSparc-2) and might give
you a bus error.
- --disable-dynload
+ --disable-dynload
If you have problems with dynamic loading, this
option disables all dynamic loading stuff. Note
that the use of dynamic linking is very limited.
--disable-asm
- Do not use assembler modules. It is not possible
+ Do not use assembler modules. It is not possible
to use this on some CPU types.
-
+
--disable-exec
Disable all remote program execution. This
disables photo ID viewing as well as all keyserver
@@ -595,14 +595,14 @@
--disable-cast5, --disable-blowfish,
--disable-aes, --disable-twofish,
--disable-sha256, --disable-sha512,
- --without-bzip2, --disable-exec,
+ --without-bzip2, --disable-exec,
--disable-card-support and
--disable-agent-support.
Configure command lines are read from left to
right, so if you want to have an "almost minimal"
configuration, you can do (for example)
"--enable-minimal --enable-rsa" to have RSA added
- to the minimal build. Adding the option
+ to the minimal build. Adding the option
--disable-nls may be useful too.
--enable-key-cache=SIZE
@@ -623,7 +623,7 @@
--enable-selinux-support
This prevents access to certain files and won't
- allow import or export of secret keys.
+ allow import or export of secret keys.
--enable-noexecstack
Pass option --noexecstack to as. Autdetect wether
@@ -719,7 +719,7 @@
Random devices are available in Linux, FreeBSD and OpenBSD.
Operating systems without a random devices must use another
- entropy collector.
+ entropy collector.
This collector works by running a lot of commands that yield more
or less unpredictable output and feds this as entropy into the
diff --git a/configure.ac b/configure.ac
index 5b64ba7..8570daa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
# configure.ac script for GnuPG
# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-# 2008, 2009 Free Software Foundation, Inc.
+# 2008, 2009, 2010, 2012 Free Software Foundation, Inc.
#
# This file is part of GnuPG.
#
diff --git a/g10/gpg.c b/g10/gpg.c
index 0190790..3106d29 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -1,6 +1,6 @@
/* gpg.c - The GnuPG utility (main for gpg)
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- * 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+ * 2007, 2008, 2009, 2010, 2012 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
diff --git a/scripts/git-log-footer b/scripts/git-log-footer
index fed8f90..7975b9d 100644
--- a/scripts/git-log-footer
+++ b/scripts/git-log-footer
@@ -7,8 +7,8 @@
-----
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008, 2009, 2010,
- 2011 Free Software Foundation, Inc.
+ 2006, 2007, 2008, 2009, 2010, 2011,
+ 2012 Free Software Foundation, Inc.
Copying and distribution of this file and/or the original GIT
commit log messages, with or without modification, are
diff --git a/util/argparse.c b/util/argparse.c
index cc4b212..e28a181 100644
--- a/util/argparse.c
+++ b/util/argparse.c
@@ -1,6 +1,6 @@
/* [argparse.c wk 17.06.97] Argument Parser for option handling
* Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007,
- * 2008 Free Software Foundation, Inc.
+ * 2008, 2010, 2012 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
@@ -917,10 +917,10 @@ default_strusage( int level )
break;
case 11: p = "foo"; break;
case 13: p = "0.0"; break;
- case 14: p = "Copyright (C) 2010 Free Software Foundation, Inc."; break;
+ case 14: p = "Copyright (C) 2012 Free Software Foundation, Inc."; break;
case 15: p =
"This is free software: you are free to change and redistribute it.\n"
-"There is NO WARRANTY, to the extent permitted by law.\n";
+"There is NO WARRANTY, to the extent permitted by law.\n";
break;
case 16: p =
"This is free software; you can redistribute it and/or modify\n"
commit 667ba59ec52d169902d7ef244cdcdde1bcc30681
Author: Werner Koch <wk at gnupg.org>
Date: Tue Jan 10 11:31:00 2012 +0100
Use gcc pragmas to suppress some warnings.
* configure.ac (AH_BOTTOM): Add GNUPG_GCC_VERSION macro.
* util/estream-printf.c (pr_float): Use new gcc pragma to ignore a
warning about a non-literal format.
* util/miscutil.c (asctimestamp): Ditto.
* cipher/md.c (md_stop_debug): Use new gcc pragme to ignore a warning
* about a set but unused variable.
diff --git a/cipher/md.c b/cipher/md.c
index 9ee0fa7..ab36d17 100644
--- a/cipher/md.c
+++ b/cipher/md.c
@@ -65,7 +65,7 @@ new_list_item (int algo,
r->name = (*get_info)( algo, &r->contextsize,
&r->asnoid, &r->asnlen, &r->mdlen,
&r->init, &r->write, &r->final, &r->read );
- if (!r->name )
+ if (!r->name )
{
xfree(r);
r = NULL;
@@ -82,7 +82,7 @@ new_list_item (int algo,
/*
Load all available hash algorithms and return true. Subsequent
- calls will return 0.
+ calls will return 0.
*/
static int
load_digest_module (void)
@@ -96,26 +96,26 @@ load_digest_module (void)
/* We load them in reverse order so that the most
frequently used are the first in the list. */
#ifdef USE_SHA512
- if (!new_list_item (DIGEST_ALGO_SHA512, sha512_get_info))
+ if (!new_list_item (DIGEST_ALGO_SHA512, sha512_get_info))
BUG ();
- if (!new_list_item (DIGEST_ALGO_SHA384, sha384_get_info))
+ if (!new_list_item (DIGEST_ALGO_SHA384, sha384_get_info))
BUG ();
#endif
#ifdef USE_SHA256
- if (!new_list_item (DIGEST_ALGO_SHA256, sha256_get_info))
+ if (!new_list_item (DIGEST_ALGO_SHA256, sha256_get_info))
BUG ();
- if (!new_list_item (DIGEST_ALGO_SHA224, sha224_get_info))
+ if (!new_list_item (DIGEST_ALGO_SHA224, sha224_get_info))
BUG ();
#endif
- if (!new_list_item (DIGEST_ALGO_MD5, md5_get_info))
+ if (!new_list_item (DIGEST_ALGO_MD5, md5_get_info))
BUG ();
- if (!new_list_item (DIGEST_ALGO_RMD160, rmd160_get_info))
+ if (!new_list_item (DIGEST_ALGO_RMD160, rmd160_get_info))
BUG ();
- if (!new_list_item (DIGEST_ALGO_SHA1, sha1_get_info))
+ if (!new_list_item (DIGEST_ALGO_SHA1, sha1_get_info))
BUG ();
return 1;
-}
+}
/****************
@@ -317,7 +317,7 @@ md_write( MD_HANDLE a, const byte *inbuf, size_t inlen)
}
for(r=a->list; r; r = r->next ) {
(*r->write)( &r->context.c, a->buffer, a->bufcount );
- /* Fixme: all ->write fnc should take a const byte* */
+ /* Fixme: all ->write fnc should take a const byte* */
(*r->write)( &r->context.c, (byte*)inbuf, inlen );
}
a->bufcount = 0;
@@ -508,6 +508,7 @@ md_start_debug( MD_HANDLE md, const char *suffix )
log_debug("md debug: can't open %s\n", buf );
}
+
void
md_stop_debug( MD_HANDLE md )
{
@@ -519,6 +520,9 @@ md_stop_debug( MD_HANDLE md )
}
#ifdef HAVE_U64_TYPEDEF
{ /* a kludge to pull in the __muldi3 for Solaris */
+#if GNUPG_GCC_VERSION >= 40600
+# pragma GCC diagnostic ignored "-Wunused-but-set-variable"
+#endif
volatile u32 a = (u32)(ulong)md;
volatile u64 b = 42;
volatile u64 c;
diff --git a/configure.ac b/configure.ac
index 1349c18..5b64ba7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -446,6 +446,13 @@ is intended for making fat binary builds on OS X. */
# define EXEC_TEMPFILE_ONLY
#endif
+/* A macro to help checking the GCC version. */
+#ifdef __GNUC__
+# define GNUPG_GCC_VERSION (__GNUC__ * 10000 \
+ + __GNUC_MINOR__ * 100 \
+ + __GNUC_PATCHLEVEL__)
+#endif /*__GNUC__*/
+
/* Please note that the string version must not contain more
than one character because the using code assumes strlen()==1 */
#ifdef HAVE_DOSISH_SYSTEM
diff --git a/util/estream-printf.c b/util/estream-printf.c
index 54ecb23..ca5556c 100644
--- a/util/estream-printf.c
+++ b/util/estream-printf.c
@@ -52,7 +52,7 @@
#if defined(HAVE_INTMAX_T) || defined(HAVE_UINTMAX_T)
# ifdef HAVE_STDINT_H
# include <stdint.h>
-# endif
+# endif
#endif
#ifdef HAVE_LANGINFO_THOUSANDS_SEP
#include <langinfo.h>
@@ -67,12 +67,12 @@
/* Allow redefinition of asprintf used malloc functions. */
#if defined(_ESTREAM_PRINTF_MALLOC)
-#define my_printf_malloc(a) _ESTREAM_PRINTF_MALLOC((a))
+#define my_printf_malloc(a) _ESTREAM_PRINTF_MALLOC((a))
#else
#define my_printf_malloc(a) malloc((a))
#endif
#if defined(_ESTREAM_PRINTF_FREE)
-#define my_printf_free(a) _ESTREAM_PRINTF_FREE((a))
+#define my_printf_free(a) _ESTREAM_PRINTF_FREE((a))
#else
#define my_printf_free(a) free((a))
#endif
@@ -182,7 +182,7 @@ typedef enum
/* A union used to store the actual values. */
-typedef union
+typedef union
{
char a_char;
signed char a_schar;
@@ -266,7 +266,7 @@ dump_argspecs (argspec_t arg, size_t argcount)
int idx;
for (idx=0; argcount; argcount--, arg++, idx++)
- fprintf (stderr,
+ fprintf (stderr,
"%2d: len=%u flags=%u width=%d prec=%d mod=%d "
"con=%d vt=%d pos=%d-%d-%d\n",
idx,
@@ -290,8 +290,8 @@ compute_type (argspec_t arg)
{
switch (arg->conspec)
{
- case CONSPEC_UNKNOWN:
- arg->vt = VALTYPE_UNSUPPORTED;
+ case CONSPEC_UNKNOWN:
+ arg->vt = VALTYPE_UNSUPPORTED;
break;
case CONSPEC_DECIMAL:
@@ -302,7 +302,7 @@ compute_type (argspec_t arg)
case LENMOD_LONG: arg->vt = VALTYPE_LONG; break;
case LENMOD_LONGLONG: arg->vt = VALTYPE_LONGLONG; break;
case LENMOD_INTMAX: arg->vt = VALTYPE_INTMAX; break;
- case LENMOD_SIZET: arg->vt = VALTYPE_SIZE; break;
+ case LENMOD_SIZET: arg->vt = VALTYPE_SIZE; break;
case LENMOD_PTRDIFF: arg->vt = VALTYPE_PTRDIFF; break;
default: arg->vt = VALTYPE_INT; break;
}
@@ -319,12 +319,12 @@ compute_type (argspec_t arg)
case LENMOD_LONG: arg->vt = VALTYPE_ULONG; break;
case LENMOD_LONGLONG: arg->vt = VALTYPE_ULONGLONG; break;
case LENMOD_INTMAX: arg->vt = VALTYPE_UINTMAX; break;
- case LENMOD_SIZET: arg->vt = VALTYPE_SIZE; break;
+ case LENMOD_SIZET: arg->vt = VALTYPE_SIZE; break;
case LENMOD_PTRDIFF: arg->vt = VALTYPE_PTRDIFF; break;
default: arg->vt = VALTYPE_UINT; break;
}
break;
-
+
case CONSPEC_FLOAT:
case CONSPEC_FLOAT_UP:
case CONSPEC_EXP:
@@ -340,9 +340,9 @@ compute_type (argspec_t arg)
default: arg->vt = VALTYPE_DOUBLE; break;
}
break;
-
+
case CONSPEC_CHAR:
- arg->vt = VALTYPE_INT;
+ arg->vt = VALTYPE_INT;
break;
case CONSPEC_STRING:
@@ -365,12 +365,12 @@ compute_type (argspec_t arg)
case LENMOD_LONG: arg->vt = VALTYPE_LONG_PTR; break;
case LENMOD_LONGLONG: arg->vt = VALTYPE_LONGLONG_PTR; break;
case LENMOD_INTMAX: arg->vt = VALTYPE_INTMAX_PTR; break;
- case LENMOD_SIZET: arg->vt = VALTYPE_SIZE_PTR; break;
+ case LENMOD_SIZET: arg->vt = VALTYPE_SIZE_PTR; break;
case LENMOD_PTRDIFF: arg->vt = VALTYPE_PTRDIFF_PTR; break;
default: arg->vt = VALTYPE_INT_PTR; break;
}
break;
-
+
}
}
@@ -395,7 +395,7 @@ parse_format (const char *format,
if (!format)
goto leave_einval;
-
+
for (; *format; format++)
{
unsigned int flags;
@@ -403,7 +403,7 @@ parse_format (const char *format,
lenmod_t lenmod;
conspec_t conspec;
int arg_pos, width_pos, precision_pos;
-
+
if (*format != '%')
continue;
s = ++format;
@@ -417,7 +417,7 @@ parse_format (const char *format,
if (*s >= '1' && *s <= '9')
{
const char *save_s = s;
-
+
arg_pos = (*s++ - '0');
for (; *s >= '0' && *s <= '9'; s++)
arg_pos = 10*arg_pos + (*s - '0');
@@ -431,7 +431,7 @@ parse_format (const char *format,
s = save_s;
}
}
-
+
/* Parse the flags. */
flags = 0;
for ( ; *s; s++)
@@ -449,7 +449,7 @@ parse_format (const char *format,
}
}
flags_parsed:
-
+
/* Parse the field width. */
width_pos = 0;
if (*s == '*')
@@ -532,11 +532,11 @@ parse_format (const char *format,
if (ignore_value)
precision = NO_FIELD_VALUE;
}
-
+
/* Parse the length modifiers. */
switch (*s)
{
- case 'h':
+ case 'h':
if (s[1] == 'h')
{
lenmod = LENMOD_CHAR;
@@ -562,7 +562,7 @@ parse_format (const char *format,
case 'L': lenmod = LENMOD_LONGDBL; s++; break;
default: lenmod = LENMOD_NONE; break;
}
-
+
/* Parse the conversion specifier. */
switch (*s)
{
@@ -632,7 +632,7 @@ parse_format (const char *format,
*argspecs_addr = argspecs;
*r_argspecs_count = argcount;
return 0; /* Success. */
-
+
leave_einval:
errno = EINVAL;
leave:
@@ -663,14 +663,14 @@ read_values (valueitem_t valuetable, size_t valuetable_len, va_list vaargs)
value->a_char_ptr = va_arg (vaargs, char *);
break;
case VALTYPE_SCHAR: value->a_schar = va_arg (vaargs, int); break;
- case VALTYPE_SCHAR_PTR:
- value->a_schar_ptr = va_arg (vaargs, signed char *);
+ case VALTYPE_SCHAR_PTR:
+ value->a_schar_ptr = va_arg (vaargs, signed char *);
break;
case VALTYPE_UCHAR: value->a_uchar = va_arg (vaargs, int); break;
case VALTYPE_SHORT: value->a_short = va_arg (vaargs, int); break;
case VALTYPE_USHORT: value->a_ushort = va_arg (vaargs, int); break;
- case VALTYPE_SHORT_PTR:
- value->a_short_ptr = va_arg (vaargs, short *);
+ case VALTYPE_SHORT_PTR:
+ value->a_short_ptr = va_arg (vaargs, short *);
break;
case VALTYPE_INT:
value->a_int = va_arg (vaargs, int);
@@ -684,20 +684,20 @@ read_values (valueitem_t valuetable, size_t valuetable_len, va_list vaargs)
case VALTYPE_LONG:
value->a_long = va_arg (vaargs, long);
break;
- case VALTYPE_ULONG:
+ case VALTYPE_ULONG:
value->a_ulong = va_arg (vaargs, unsigned long);
break;
- case VALTYPE_LONG_PTR:
- value->a_long_ptr = va_arg (vaargs, long *);
+ case VALTYPE_LONG_PTR:
+ value->a_long_ptr = va_arg (vaargs, long *);
break;
#ifdef HAVE_LONG_LONG_INT
case VALTYPE_LONGLONG:
value->a_longlong = va_arg (vaargs, long long int);
break;
- case VALTYPE_ULONGLONG:
- value->a_ulonglong = va_arg (vaargs, unsigned long long int);
+ case VALTYPE_ULONGLONG:
+ value->a_ulonglong = va_arg (vaargs, unsigned long long int);
break;
- case VALTYPE_LONGLONG_PTR:
+ case VALTYPE_LONGLONG_PTR:
value->a_longlong_ptr = va_arg (vaargs, long long *);
break;
#endif
@@ -712,31 +712,31 @@ read_values (valueitem_t valuetable, size_t valuetable_len, va_list vaargs)
case VALTYPE_STRING:
value->a_string = va_arg (vaargs, const char *);
break;
- case VALTYPE_POINTER:
+ case VALTYPE_POINTER:
value->a_void_ptr = va_arg (vaargs, void *);
break;
#ifdef HAVE_INTMAX_T
case VALTYPE_INTMAX:
value->a_intmax = va_arg (vaargs, intmax_t);
break;
- case VALTYPE_INTMAX_PTR:
- value->a_intmax_ptr = va_arg (vaargs, intmax_t *);
+ case VALTYPE_INTMAX_PTR:
+ value->a_intmax_ptr = va_arg (vaargs, intmax_t *);
break;
#endif
#ifdef HAVE_UINTMAX_T
- case VALTYPE_UINTMAX:
- value->a_uintmax = va_arg (vaargs, uintmax_t);
+ case VALTYPE_UINTMAX:
+ value->a_uintmax = va_arg (vaargs, uintmax_t);
break;
#endif
case VALTYPE_SIZE:
value->a_size = va_arg (vaargs, size_t);
break;
- case VALTYPE_SIZE_PTR:
- value->a_size_ptr = va_arg (vaargs, size_t *);
+ case VALTYPE_SIZE_PTR:
+ value->a_size_ptr = va_arg (vaargs, size_t *);
break;
#ifdef HAVE_PTRDIFF_T
case VALTYPE_PTRDIFF:
- value->a_ptrdiff = va_arg (vaargs, ptrdiff_t);
+ value->a_ptrdiff = va_arg (vaargs, ptrdiff_t);
break;
case VALTYPE_PTRDIFF_PTR:
value->a_ptrdiff_ptr = va_arg (vaargs, ptrdiff_t *);
@@ -771,7 +771,7 @@ pad_out (estream_printf_out_t outfnc, void *outfncarg,
*nbytes += n;
count -= n;
}
-
+
return 0;
}
@@ -808,18 +808,18 @@ pr_integer (estream_printf_out_t outfnc, void *outfncarg,
{
case VALTYPE_SHORT: along = value.a_short; break;
case VALTYPE_INT: along = value.a_int; break;
- case VALTYPE_LONG: along = value.a_long; break;
+ case VALTYPE_LONG: along = value.a_long; break;
#ifdef HAVE_LONG_LONG_INT
- case VALTYPE_LONGLONG: along = value.a_longlong; break;
- case VALTYPE_SIZE: along = value.a_size; break;
+ case VALTYPE_LONGLONG: along = value.a_longlong; break;
+ case VALTYPE_SIZE: along = value.a_size; break;
# ifdef HAVE_INTMAX_T
- case VALTYPE_INTMAX: along = value.a_intmax; break;
+ case VALTYPE_INTMAX: along = value.a_intmax; break;
# endif
# ifdef HAVE_PTRDIFF_T
- case VALTYPE_PTRDIFF: along = value.a_ptrdiff; break;
+ case VALTYPE_PTRDIFF: along = value.a_ptrdiff; break;
# endif
#endif /*HAVE_LONG_LONG_INT*/
- default:
+ default:
return -1;
}
if (along < 0)
@@ -836,18 +836,18 @@ pr_integer (estream_printf_out_t outfnc, void *outfncarg,
{
case VALTYPE_USHORT: aulong = value.a_ushort; break;
case VALTYPE_UINT: aulong = value.a_uint; break;
- case VALTYPE_ULONG: aulong = value.a_ulong; break;
+ case VALTYPE_ULONG: aulong = value.a_ulong; break;
#ifdef HAVE_LONG_LONG_INT
- case VALTYPE_ULONGLONG: aulong = value.a_ulonglong; break;
- case VALTYPE_SIZE: aulong = value.a_size; break;
+ case VALTYPE_ULONGLONG: aulong = value.a_ulonglong; break;
+ case VALTYPE_SIZE: aulong = value.a_size; break;
# ifdef HAVE_UINTMAX_T
- case VALTYPE_UINTMAX: aulong = value.a_uintmax; break;
+ case VALTYPE_UINTMAX: aulong = value.a_uintmax; break;
# endif
# ifdef HAVE_PTRDIFF_T
- case VALTYPE_PTRDIFF: aulong = value.a_ptrdiff; break;
+ case VALTYPE_PTRDIFF: aulong = value.a_ptrdiff; break;
# endif
#endif /*HAVE_LONG_LONG_INT*/
- default:
+ default:
return -1;
}
}
@@ -878,7 +878,7 @@ pr_integer (estream_printf_out_t outfnc, void *outfncarg,
do
{
- if ((arg->flags & FLAG_GROUPING)
+ if ((arg->flags & FLAG_GROUPING)
&& (++grouping == 3) && *grouping_string)
{
*--p = *grouping_string;
@@ -913,7 +913,7 @@ pr_integer (estream_printf_out_t outfnc, void *outfncarg,
if ((arg->flags & FLAG_ALT_CONV))
n_extra += 2;
}
-
+
n = pend - p;
if ((arg->flags & FLAG_ZERO_PAD)
@@ -958,7 +958,7 @@ pr_integer (estream_printf_out_t outfnc, void *outfncarg,
if (rc)
return rc;
}
-
+
rc = outfnc (outfncarg, p, pend - p);
if (rc)
return rc;
@@ -1011,7 +1011,7 @@ pr_float (estream_printf_out_t outfnc, void *outfncarg,
adblfloat = value.a_longdouble;
use_dbl=1; break;
#endif
- default:
+ default:
return -1;
}
@@ -1051,12 +1051,23 @@ pr_float (estream_printf_out_t outfnc, void *outfncarg,
if ((arg->flags & FLAG_ALT_CONV))
*--p = '#';
*--p = '%';
+
+#if GNUPG_GCC_VERSION >= 40600
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wformat-nonliteral"
+#endif
+
#ifdef HAVE_LONG_DOUBLE
if (use_dbl)
sprintf (numbuf, p, adblfloat);
else
#endif /*HAVE_LONG_DOUBLE*/
sprintf (numbuf, p, afloat);
+
+#if GNUPG_GCC_VERSION >= 40600
+# pragma GCC diagnostic pop
+#endif
+
p = numbuf;
n = strlen (numbuf);
pend = p + n;
@@ -1122,7 +1133,7 @@ pr_char (estream_printf_out_t outfnc, void *outfncarg,
if(rc)
return rc;
*nbytes += 1;
-
+
return 0;
}
@@ -1143,7 +1154,7 @@ pr_string (estream_printf_out_t outfnc, void *outfncarg,
string = "(null)";
if (arg->precision >= 0)
{
- for (n=0,s=string; *s && n < arg->precision; s++)
+ for (n=0,s=string; *s && n < arg->precision; s++)
n++;
}
else
@@ -1169,7 +1180,7 @@ pr_string (estream_printf_out_t outfnc, void *outfncarg,
if (rc)
return rc;
}
-
+
return 0;
}
@@ -1210,7 +1221,7 @@ pr_pointer (estream_printf_out_t outfnc, void *outfncarg,
*--p = '0';
*--p = 'x';
*--p = '0';
-
+
rc = outfnc (outfncarg, p, pend - p);
if (rc)
return rc;
@@ -1229,14 +1240,14 @@ pr_bytes_so_far (estream_printf_out_t outfnc, void *outfncarg,
switch (arg->vt)
{
- case VALTYPE_SCHAR_PTR:
- *value.a_schar_ptr = (signed char)(unsigned int)(*nbytes);
+ case VALTYPE_SCHAR_PTR:
+ *value.a_schar_ptr = (signed char)(unsigned int)(*nbytes);
break;
- case VALTYPE_SHORT_PTR:
+ case VALTYPE_SHORT_PTR:
*value.a_short_ptr = (short)(unsigned int)(*nbytes);
break;
- case VALTYPE_LONG_PTR:
- *value.a_long_ptr = (long)(*nbytes);
+ case VALTYPE_LONG_PTR:
+ *value.a_long_ptr = (long)(*nbytes);
break;
#ifdef HAVE_LONG_LONG_INT
case VALTYPE_LONGLONG_PTR:
@@ -1244,12 +1255,12 @@ pr_bytes_so_far (estream_printf_out_t outfnc, void *outfncarg,
break;
#endif
#ifdef HAVE_INTMAX_T
- case VALTYPE_INTMAX_PTR:
+ case VALTYPE_INTMAX_PTR:
*value.a_intmax_ptr = (intmax_t)(*nbytes);
break;
#endif
case VALTYPE_SIZE_PTR:
- *value.a_size_ptr = (*nbytes);
+ *value.a_size_ptr = (*nbytes);
break;
#ifdef HAVE_PTRDIFF_T
case VALTYPE_PTRDIFF_PTR:
@@ -1274,8 +1285,8 @@ pr_bytes_so_far (estream_printf_out_t outfnc, void *outfncarg,
holds the values and may be directly addressed using the position
arguments given by ARGSPECS. MYERRNO is used for the "%m"
conversion. NBYTES well be updated to reflect the number of bytes
- send to the output function. */
-static int
+ send to the output function. */
+static int
do_format (estream_printf_out_t outfnc, void *outfncarg,
const char *format, argspec_t argspecs, size_t argspecs_len,
valueitem_t valuetable, int myerrno, size_t *nbytes)
@@ -1319,7 +1330,7 @@ do_format (estream_printf_out_t outfnc, void *outfncarg,
/* Save the next start. */
s += arg->length;
format = s;
-
+
assert (argidx < argspecs_len);
argidx++;
@@ -1387,9 +1398,9 @@ do_format (estream_printf_out_t outfnc, void *outfncarg,
}
if (rc)
return rc;
- arg++;
+ arg++;
}
-
+
/* Print out any trailing stuff. */
n = s - format;
rc = n? outfnc (outfncarg, format, n) : 0;
@@ -1407,7 +1418,7 @@ do_format (estream_printf_out_t outfnc, void *outfncarg,
output of the formatted stuff. FORMAT is the format specification
and VAARGS a variable argumemt list matching the arguments of
FORMAT. */
-int
+int
estream_format (estream_printf_out_t outfnc,
void *outfncarg,
const char *format, va_list vaargs)
@@ -1442,7 +1453,7 @@ estream_format (estream_printf_out_t outfnc,
/* Check that all ARG_POS fields are set. */
for (argidx=0,max_pos=0; argidx < argspecs_len; argidx++)
{
- if (argspecs[argidx].arg_pos != -1
+ if (argspecs[argidx].arg_pos != -1
&& argspecs[argidx].arg_pos > max_pos)
max_pos = argspecs[argidx].arg_pos;
if (argspecs[argidx].width_pos > max_pos)
@@ -1523,13 +1534,13 @@ estream_format (estream_printf_out_t outfnc,
valuetable[validx].vt = VALTYPE_INT;
}
}
-
+
/* Read all the arguments. This will error out for unsupported
types and for not given positional arguments. */
rc = read_values (valuetable, max_pos, vaargs);
if (rc)
- goto leave_einval;
-
+ goto leave_einval;
+
/* for (validx=0; validx < max_pos; validx++) */
/* fprintf (stderr, "%2d: vt=%d\n", validx, valuetable[validx].vt); */
@@ -1538,7 +1549,7 @@ estream_format (estream_printf_out_t outfnc,
argspecs, argspecs_len, valuetable, myerrno, &nbytes);
goto leave;
-
+
leave_einval:
errno = EINVAL;
leave_error:
@@ -1572,11 +1583,11 @@ estream_printf (const char *format, ...)
{
int rc;
va_list arg_ptr;
-
+
va_start (arg_ptr, format);
rc = estream_format (plain_stdio_out, stderr, format, arg_ptr);
va_end (arg_ptr);
-
+
return rc;
}
@@ -1586,16 +1597,16 @@ estream_fprintf (FILE *fp, const char *format, ...)
{
int rc;
va_list arg_ptr;
-
+
va_start (arg_ptr, format);
rc = estream_format (plain_stdio_out, fp, format, arg_ptr);
va_end (arg_ptr);
-
+
return rc;
}
/* A replacement for vfprintf. */
-int
+int
estream_vfprintf (FILE *fp, const char *format, va_list arg_ptr)
{
return estream_format (plain_stdio_out, fp, format, arg_ptr);
@@ -1642,7 +1653,7 @@ fixed_buffer_out (void *outfncarg, const char *buf, size_t buflen)
/* A replacement for vsnprintf. */
-int
+int
estream_vsnprintf (char *buf, size_t bufsize,
const char *format, va_list arg_ptr)
{
@@ -1667,7 +1678,7 @@ estream_vsnprintf (char *buf, size_t bufsize,
}
/* A replacement for snprintf. */
-int
+int
estream_snprintf (char *buf, size_t bufsize, const char *format, ...)
{
int rc;
@@ -1676,7 +1687,7 @@ estream_snprintf (char *buf, size_t bufsize, const char *format, ...)
va_start (arg_ptr, format);
rc = estream_vsnprintf (buf, bufsize, format, arg_ptr);
va_end (arg_ptr);
-
+
return rc;
}
@@ -1686,7 +1697,7 @@ estream_snprintf (char *buf, size_t bufsize, const char *format, ...)
dynamic_buffer_out. */
struct dynamic_buffer_parm_s
{
- int error_flag; /* Internal helper. */
+ int error_flag; /* Internal helper. */
size_t alloced; /* Allocated size of the buffer. */
size_t used; /* Used size of the buffer. */
char *buffer; /* Malloced buffer. */
@@ -1709,7 +1720,7 @@ dynamic_buffer_out (void *outfncarg, const char *buf, size_t buflen)
if (parm->used + buflen >= parm->alloced)
{
char *p;
-
+
parm->alloced += buflen + 512;
p = realloc (parm->buffer, parm->alloced);
if (!p)
@@ -1732,7 +1743,7 @@ dynamic_buffer_out (void *outfncarg, const char *buf, size_t buflen)
/* A replacement for vasprintf. As with the BSD of vasprintf version -1
will be returned on error and NULL stored at BUFP. On success the
number of bytes printed will be returned. */
-int
+int
estream_vasprintf (char **bufp, const char *format, va_list arg_ptr)
{
struct dynamic_buffer_parm_s parm;
@@ -1747,7 +1758,7 @@ estream_vasprintf (char **bufp, const char *format, va_list arg_ptr)
*bufp = NULL;
return -1;
}
-
+
rc = estream_format (dynamic_buffer_out, &parm, format, arg_ptr);
if (!rc)
rc = dynamic_buffer_out (&parm, "", 1); /* Print terminating Nul. */
@@ -1772,7 +1783,7 @@ estream_vasprintf (char **bufp, const char *format, va_list arg_ptr)
/* A replacement for asprintf. As with the BSD of asprintf version -1
will be returned on error and NULL stored at BUFP. On success the
number of bytes printed will be returned. */
-int
+int
estream_asprintf (char **bufp, const char *format, ...)
{
int rc;
@@ -1781,7 +1792,7 @@ estream_asprintf (char **bufp, const char *format, ...)
va_start (arg_ptr, format);
rc = estream_vasprintf (bufp, format, arg_ptr);
va_end (arg_ptr);
-
+
return rc;
}
diff --git a/util/miscutil.c b/util/miscutil.c
index 16c2b2b..f82c4d9 100644
--- a/util/miscutil.c
+++ b/util/miscutil.c
@@ -33,7 +33,7 @@
#ifdef HAVE_UNSIGNED_TIME_T
# define INVALID_TIME_CHECK(a) ((a) == (time_t)(-1))
-#else
+#else
/* Error or 32 bit time_t and value after 2038-01-19. */
# define INVALID_TIME_CHECK(a) ((a) < 0)
#endif
@@ -146,7 +146,7 @@ isotimestamp (u32 stamp)
static char buffer[25+5];
struct tm *tp;
time_t atime = stamp;
-
+
if (INVALID_TIME_CHECK (atime)) {
strcpy (buffer, "????" "-??" "-??" " " "??" ":" "??" ":" "??");
}
@@ -232,17 +232,24 @@ asctimestamp( u32 stamp )
tp = localtime( &atime );
#ifdef HAVE_STRFTIME
#if defined(HAVE_NL_LANGINFO)
+# if GNUPG_GCC_VERSION >= 40600
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wformat-nonliteral"
+# endif
mem2str( fmt, nl_langinfo(D_T_FMT), DIM(fmt)-3 );
if( strstr( fmt, "%Z" ) == NULL )
strcat( fmt, " %Z");
strftime( buffer, DIM(buffer)-1, fmt, tp );
+# if GNUPG_GCC_VERSION >= 40600
+# pragma GCC diagnostic pop
+# endif
#else
/* fixme: we should check whether the locale appends a " %Z"
* These locales from glibc don't put the " %Z":
* fi_FI hr_HR ja_JP lt_LT lv_LV POSIX ru_RU ru_SU sv_FI sv_SE zh_CN
*/
- strftime( buffer, DIM(buffer)-1,
-#ifdef HAVE_W32_SYSTEM
+ strftime( buffer, DIM(buffer)-1,
+#ifdef HAVE_W32_SYSTEM
"%c"
#else
"%c %Z"
@@ -264,7 +271,7 @@ void
print_string2( FILE *fp, const byte *p, size_t n, int delim, int delim2 )
{
for( ; n; n--, p++ )
- if (*p < 0x20
+ if (*p < 0x20
|| *p == 0x7f
|| *p == delim || *p == delim2
|| ((delim || delim2) && *p=='\\'))
@@ -456,7 +463,7 @@ answer_is_yes_no_quit( const char *s )
}
/*
- Return 1 for okay, 0 for for cancel or DEF_ANSWER for default.
+ Return 1 for okay, 0 for for cancel or DEF_ANSWER for default.
*/
int
answer_is_okay_cancel (const char *s, int def_answer)
@@ -467,7 +474,7 @@ answer_is_okay_cancel (const char *s, int def_answer)
const char *long_cancel = _("cancel|cancel");
const char *short_okay = _("oO");
const char *short_cancel = _("cC");
-
+
/* Note: We have to use the locale dependent strcasecmp */
if ( match_multistr(long_okay,s) )
return 1;
commit b5b6cb57db47dc892b74c9e24caae7099b274a9f
Author: Werner Koch <wk at gnupg.org>
Date: Tue Jan 10 11:25:23 2012 +0100
Update gitlog-to-changelog.
* scripts/gitlog-to-changelog: Update from gnupg master.
* Makefile.am (gen-ChangeLog): Add new options.
* scripts/autogen.sh: Fix typo in URL. Reported by Gilles Espinasse.
diff --git a/Makefile.am b/Makefile.am
index 09ed58a..144c16a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -75,10 +75,10 @@ gen-ChangeLog:
if test -d $(top_srcdir)/.git; then \
(cd $(top_srcdir) && \
./scripts/gitlog-to-changelog \
+ --append-dot --tear-off \
--amend=scripts/git-log-fix \
--since=$(gen_start_date) ) > $(distdir)/cl-t; \
cat $(top_srcdir)/scripts/git-log-footer >> $(distdir)/cl-t; \
rm -f $(distdir)/ChangeLog; \
mv $(distdir)/cl-t $(distdir)/ChangeLog; \
fi
-
diff --git a/scripts/autogen.sh b/scripts/autogen.sh
index c58afbf..408f760 100755
--- a/scripts/autogen.sh
+++ b/scripts/autogen.sh
@@ -268,7 +268,7 @@ if [ -d .git ]; then
cat <<EOF >&2
*** Activating trailing whitespace git pre-commit hook. ***
For more information see this thread:
- http://mail.gnome.org/archives/desktop-devel-list/2009-May/msg00084html
+ http://mail.gnome.org/archives/desktop-devel-list/2009-May/msg00084.html
To deactivate this pre-commit hook again move .git/hooks/pre-commit
and .git/hooks/pre-commit.sample out of the way.
EOF
diff --git a/scripts/gitlog-to-changelog b/scripts/gitlog-to-changelog
index 40a8035..d9f594f 100755
--- a/scripts/gitlog-to-changelog
+++ b/scripts/gitlog-to-changelog
@@ -64,6 +64,7 @@ OPTIONS:
makes a change to SHA1's commit log text or metadata.
--append-dot append a dot to the first line of each commit message if
there is no other punctuation or blank at the end.
+ --tear-off tear off all commit log lines after a '--' line.
--since=DATE convert only the logs since DATE;
the default is to convert all log entries.
--format=FMT set format string for commit subject and body;
@@ -175,6 +176,7 @@ sub parse_amend_file($)
my $format_string = '%s%n%b%n';
my $amend_file;
my $append_dot = 0;
+ my $tear_off = 0;
GetOptions
(
help => sub { usage 0 },
@@ -183,6 +185,7 @@ sub parse_amend_file($)
'format=s' => \$format_string,
'amend=s' => \$amend_file,
'append-dot' => \$append_dot,
+ 'tear-off' => \$tear_off,
) or usage 1;
@@ -281,6 +284,18 @@ sub parse_amend_file($)
@line = grep !/^Signed-off-by: .*>$/, @line;
@line = grep !/^Co-authored-by: /, @line;
+ # Remove everything after a line with 2 dashes at the beginning.
+ if ($tear_off)
+ {
+ my @tmpline;
+ foreach (@line)
+ {
+ last if /^--\s*$/;
+ push @tmpline,$_;
+ }
+ @line = @tmpline;
+ }
+
# Remove leading and trailing blank lines.
if (@line)
{
-----------------------------------------------------------------------
Summary of changes:
Makefile.am | 5 +-
README | 36 ++++----
cipher/md.c | 26 +++---
configure.ac | 9 ++-
g10/gpg.c | 2 +-
scripts/autogen.sh | 2 +-
scripts/git-log-footer | 4 +-
scripts/gitlog-to-changelog | 15 +++
util/argparse.c | 6 +-
util/estream-printf.c | 199 +++++++++++++++++++++++--------------------
util/miscutil.c | 21 +++--
11 files changed, 185 insertions(+), 140 deletions(-)
hooks/post-receive
--
The GNU Privacy Guard
http://git.gnupg.org
More information about the Gnupg-commits
mailing list