[git] GnuPG - branch, master, updated. gnupg-2.1.17-69-gc99a09f

by Werner Koch cvs at cvs.gnupg.org
Thu Jan 12 10:43:51 CET 2017


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, master has been updated
       via  c99a09f111c5980ae034faaea61a00d9ad60463c (commit)
       via  5c0777e1ca02ff1767755c417b64d6f78e02f475 (commit)
       via  3c00b52f7cb0fbd756c0bbe5134b8f2d69c60dd1 (commit)
      from  97372b39cd9b4c84a083eadbf072fff77799617f (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 c99a09f111c5980ae034faaea61a00d9ad60463c
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Jan 12 10:40:26 2017 +0100

    gpg: Rename a var to avoid a shadowing warning.
    
    * g10/keygen.c (keygen_set_std_prefs): Rename variable.
    --
    
    I consider it better not to use the name of a commonly used function.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/g10/keygen.c b/g10/keygen.c
index b4fddba..98ef29e 100644
--- a/g10/keygen.c
+++ b/g10/keygen.c
@@ -434,9 +434,11 @@ keygen_set_std_prefs (const char *string,int personal)
 
     if(strlen(string))
       {
-	char *dup, *tok, *prefstring;
+	char *prefstringbuf;
+        char *tok, *prefstring;
 
-	dup = prefstring = xstrdup (string); /* need a writable string! */
+        /* We need a writable string. */
+	prefstring = prefstringbuf = xstrdup (string);
 
 	while((tok=strsep(&prefstring," ,")))
 	  {
@@ -470,7 +472,7 @@ keygen_set_std_prefs (const char *string,int personal)
 	      }
 	  }
 
-	xfree (dup);
+	xfree (prefstringbuf);
       }
 
     if(!rc)

commit 5c0777e1ca02ff1767755c417b64d6f78e02f475
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Jan 12 10:39:19 2017 +0100

    tests: Fix t-gettime for a time_t of 64 and a long of 32 bit.
    
    * configure.ac (AC_CHECK_HEADERS): Add stdint.h.
    * common/t-gettime.c: Include stdint.h.
    (UINTMAX_C): Define replacement.
    (test_isotime2epoch): Use UINTMAX_C for the >32 bit constants.
    --
    
    This is for example the case on 32 bit OpenBSD.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/common/t-gettime.c b/common/t-gettime.c
index 9d9881a..13cb1a2 100644
--- a/common/t-gettime.c
+++ b/common/t-gettime.c
@@ -20,9 +20,18 @@
 #include <config.h>
 #include <stdio.h>
 #include <stdlib.h>
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
 
 #include "util.h"
 
+/* In case we do not have stdint.h and no other version of that
+ * conversion macro provide shortcut it.  */
+#ifndef UINTMAX_C
+#define UINTMAX_C (c)  (c)
+#endif
+
 #define pass()  do { ; } while(0)
 #define fail(a)  do { fprintf (stderr, "%s:%d: test %d failed\n",\
                                __FILE__,__LINE__, (a));          \
@@ -55,10 +64,10 @@ test_isotime2epoch (void)
     { "20070629T160000\n", 1183132800 },
     { "20070629T160000.",  INVALID },
 #if SIZEOF_TIME_T > 4
-    { "21060207T062815", (time_t)0x0ffffffff },
-    { "21060207T062816", (time_t)0x100000000 },
-    { "21060207T062817", (time_t)0x100000001 },
-    { "21060711T120001", (time_t)4308292801  },
+    { "21060207T062815", (time_t)UINTMAX_C(0x0ffffffff) },
+    { "21060207T062816", (time_t)UINTMAX_C(0x100000000) },
+    { "21060207T062817", (time_t)UINTMAX_C(0x100000001) },
+    { "21060711T120001", (time_t)UINTMAX_C(4308292801)  },
 #endif /*SIZEOF_TIME_T > 4*/
     { NULL, 0 }
   };
diff --git a/configure.ac b/configure.ac
index fa206c9..f929cb6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1258,7 +1258,7 @@ AC_MSG_NOTICE([checking for header files])
 AC_HEADER_STDC
 AC_CHECK_HEADERS([string.h unistd.h langinfo.h termio.h locale.h getopt.h \
                   pty.h utmp.h pwd.h inttypes.h signal.h sys/select.h     \
-                  signal.h])
+                  stdint.h signal.h])
 AC_HEADER_TIME
 
 

commit 3c00b52f7cb0fbd756c0bbe5134b8f2d69c60dd1
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Jan 12 09:58:57 2017 +0100

    build: Make autogen.sh more POSIX friendly.
    
    * autogen.sh: Replace non POSIX "cp -a" and "head -c".
    --
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/autogen.sh b/autogen.sh
index 92c6df8..f2af5a7 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -225,7 +225,7 @@ if [ "$myhost" = "find-version" ]; then
       fi
       [ -n "$tmp" ] && beta=yes
       rev=$(git rev-parse --short HEAD | tr -d '\n\r')
-      rvd=$((0x$(echo ${rev} | head -c 4)))
+      rvd=$((0x$(echo ${rev} | dd bs=1 count=2 2>/dev/null)))
     else
       ingit=no
       beta=yes
@@ -417,8 +417,11 @@ fi
 
 # Check the git setup.
 if [ -d .git ]; then
-  CP="cp -a"
-  [ -z "${SILENT}" ] && CP="$CP -v"
+  CP="cp -p"
+  # If we have a GNU cp we can add -v
+  if cp --version >/dev/null 2>/dev/null; then
+    [ -z "${SILENT}" ] && CP="$CP -v"
+  fi
   if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then
     [ -z "${SILENT}" ] && cat <<EOF
 *** Activating trailing whitespace git pre-commit hook. ***

-----------------------------------------------------------------------

Summary of changes:
 autogen.sh         |  9 ++++++---
 common/t-gettime.c | 17 +++++++++++++----
 configure.ac       |  2 +-
 g10/keygen.c       |  8 +++++---
 4 files changed, 25 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list