[git] GCRYPT - branch, LIBGCRYPT-1-7-BRANCH, updated. libgcrypt-1.7.8-4-g23f473d

by Werner Koch cvs at cvs.gnupg.org
Wed Jul 5 20:18:03 CEST 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 crypto library".

The branch, LIBGCRYPT-1-7-BRANCH has been updated
       via  23f473d04d16a2ec8dbd2537719c782ae233e7d8 (commit)
       via  a9091d7f72cd9fec1d0f9ac6a56565d9cb3fc518 (commit)
      from  a195d7346a8006f3b6fb77ccd6df8e91833d2b5a (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 23f473d04d16a2ec8dbd2537719c782ae233e7d8
Author: Werner Koch <wk at gnupg.org>
Date:   Wed Jul 5 20:10:56 2017 +0200

    build: Minor API fixes to fix build problems on AIX.
    
    * src/gcrypt.h.in (gcry_error_from_errno): Fix return type.
    * src/visibility.c (gcry_md_extract): Change return type to match the
    prototype.
    --
    
    IBM compiler optimize enums and thus enums may be shorter than an
    unsigned int.  Thus an
    
      assert (sizeof (gpg_error_t) == sizeof (gpg_err_code_t)
    
    would fail.  The deatils seem to depend on the passed compiler options
    which explains that it has been only reported now.
    
    GnuPG-bug-id: 3256
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/src/gcrypt.h.in b/src/gcrypt.h.in
index 34a3cb7..f71e362 100644
--- a/src/gcrypt.h.in
+++ b/src/gcrypt.h.in
@@ -189,7 +189,7 @@ int gcry_err_code_to_errno (gcry_err_code_t code);
 gcry_error_t gcry_err_make_from_errno (gcry_err_source_t source, int err);
 
 /* Return an error value with the system error ERR.  */
-gcry_err_code_t gcry_error_from_errno (int err);
+gcry_error_t gcry_error_from_errno (int err);
 
 

 /* NOTE: Since Libgcrypt 1.6 the thread callbacks are not anymore
diff --git a/src/visibility.c b/src/visibility.c
index 3abbd37..28edaf7 100644
--- a/src/visibility.c
+++ b/src/visibility.c
@@ -1174,10 +1174,10 @@ gcry_md_read (gcry_md_hd_t hd, int algo)
   return _gcry_md_read (hd, algo);
 }
 
-gcry_err_code_t
+gcry_error_t
 gcry_md_extract (gcry_md_hd_t hd, int algo, void *buffer, size_t length)
 {
-  return _gcry_md_extract(hd, algo, buffer, length);
+  return gpg_error (_gcry_md_extract(hd, algo, buffer, length));
 }
 
 void

commit a9091d7f72cd9fec1d0f9ac6a56565d9cb3fc518
Author: Werner Koch <wk at gnupg.org>
Date:   Wed Jul 5 20:05:41 2017 +0200

    tools: Add left shift to mpicalc.
    
    * src/mpicalc.c (do_lshift): New.
    (main): Handle '<'.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/src/mpicalc.c b/src/mpicalc.c
index ebd1bbb..11246f3 100644
--- a/src/mpicalc.c
+++ b/src/mpicalc.c
@@ -232,6 +232,17 @@ do_gcd (void)
 }
 
 static void
+do_lshift (void)
+{
+  if (stackidx < 1)
+    {
+      fputs ("stack underflow\n", stderr);
+      return;
+    }
+  mpi_lshift (stack[stackidx - 1], stack[stackidx - 1], 1);
+}
+
+static void
 do_rshift (void)
 {
   if (stackidx < 1)
@@ -242,7 +253,6 @@ do_rshift (void)
   mpi_rshift (stack[stackidx - 1], stack[stackidx - 1], 1);
 }
 
-
 static void
 do_nbits (void)
 {
@@ -305,6 +315,7 @@ print_help (void)
          "*   multiply      [0] := [1] * [0]          {-1}\n"
          "/   divide        [0] := [1] - [0]          {-1}\n"
          "%   modulo        [0] := [1] % [0]          {-1}\n"
+         "<   left shift    [0] := [0] << 1           {0}\n"
          ">   right shift   [0] := [0] >> 1           {0}\n"
          "++  increment     [0] := [0]++              {0}\n"
          "--  decrement     [0] := [0]--              {0}\n"
@@ -487,6 +498,9 @@ main (int argc, char **argv)
 		case '^':
 		  do_powm ();
 		  break;
+		case '<':
+		  do_lshift ();
+		  break;
 		case '>':
 		  do_rshift ();
 		  break;

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

Summary of changes:
 src/gcrypt.h.in  |  2 +-
 src/mpicalc.c    | 16 +++++++++++++++-
 src/visibility.c |  4 ++--
 3 files changed, 18 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
The GNU crypto library
http://git.gnupg.org




More information about the Gnupg-commits mailing list