[svn] gcry - r1270 - in branches/LIBGCRYPT-1-2-BRANCH: . cipher doc m4 mpi src

svn author wk cvs at cvs.gnupg.org
Tue Nov 13 09:53:32 CET 2007


Author: wk
Date: 2007-11-13 09:53:21 +0100 (Tue, 13 Nov 2007)
New Revision: 1270

Modified:
   branches/LIBGCRYPT-1-2-BRANCH/ChangeLog
   branches/LIBGCRYPT-1-2-BRANCH/cipher/ChangeLog
   branches/LIBGCRYPT-1-2-BRANCH/cipher/ac.c
   branches/LIBGCRYPT-1-2-BRANCH/cipher/md.c
   branches/LIBGCRYPT-1-2-BRANCH/configure.ac
   branches/LIBGCRYPT-1-2-BRANCH/doc/ChangeLog
   branches/LIBGCRYPT-1-2-BRANCH/doc/Makefile.am
   branches/LIBGCRYPT-1-2-BRANCH/doc/gcrypt.texi
   branches/LIBGCRYPT-1-2-BRANCH/m4/socklen.m4
   branches/LIBGCRYPT-1-2-BRANCH/mpi/ChangeLog
   branches/LIBGCRYPT-1-2-BRANCH/mpi/mpi-bit.c
   branches/LIBGCRYPT-1-2-BRANCH/src/ChangeLog
Log:
Collected fixes.


Modified: branches/LIBGCRYPT-1-2-BRANCH/ChangeLog
===================================================================
--- branches/LIBGCRYPT-1-2-BRANCH/ChangeLog	2007-11-13 08:51:23 UTC (rev 1269)
+++ branches/LIBGCRYPT-1-2-BRANCH/ChangeLog	2007-11-13 08:53:21 UTC (rev 1270)
@@ -1,3 +1,7 @@
+2007-02-02  Werner Koch  <wk at g10code.com>
+
+	* configure.ac (FALLBACK_SOCKLEN_T): Special case for mingw32.
+
 2007-02-01  Werner Koch  <wk at g10code.com>
 
 	Released 1.2.4.

Modified: branches/LIBGCRYPT-1-2-BRANCH/cipher/ChangeLog
===================================================================
--- branches/LIBGCRYPT-1-2-BRANCH/cipher/ChangeLog	2007-11-13 08:51:23 UTC (rev 1269)
+++ branches/LIBGCRYPT-1-2-BRANCH/cipher/ChangeLog	2007-11-13 08:53:21 UTC (rev 1270)
@@ -1,3 +1,10 @@
+2007-02-04  Werner Koch  <wk at g10code.com>
+
+	* md.c (md_copy): Use cast for the string in md_start_debug.
+
+	* ac.c (gcry_ac_data_copy_internal): Take care of strict aliasing
+	when calling _gcry_malloc. 
+
 2007-02-01  Werner Koch  <wk at g10code.com>
 
 	* serpent.c: Add some missing struct element inits.  Also for all

Modified: branches/LIBGCRYPT-1-2-BRANCH/cipher/ac.c
===================================================================
--- branches/LIBGCRYPT-1-2-BRANCH/cipher/ac.c	2007-11-13 08:51:23 UTC (rev 1269)
+++ branches/LIBGCRYPT-1-2-BRANCH/cipher/ac.c	2007-11-13 08:53:21 UTC (rev 1270)
@@ -137,9 +137,12 @@
     data_new->data_n = data->data_n;
 
   if (! err)
-    /* Allocate space for named MPIs.  */
-    err = _gcry_malloc (sizeof (gcry_ac_mpi_t) * data->data_n, 0,
-			(void **) &data_new->data);
+    {
+      /* Allocate space for named MPIs.  */
+      err = _gcry_malloc (sizeof (gcry_ac_mpi_t) * data->data_n, 0, &p);
+      if (!err)
+        data_new->data = p;
+    }
 
   if (! err)
     {

Modified: branches/LIBGCRYPT-1-2-BRANCH/cipher/md.c
===================================================================
--- branches/LIBGCRYPT-1-2-BRANCH/cipher/md.c	2007-11-13 08:51:23 UTC (rev 1269)
+++ branches/LIBGCRYPT-1-2-BRANCH/cipher/md.c	2007-11-13 08:53:21 UTC (rev 1270)
@@ -131,7 +131,7 @@
 static int md_get_algo( gcry_md_hd_t a );
 static int md_digest_length( int algo );
 static const byte *md_asn_oid( int algo, size_t *asnlen, size_t *mdlen );
-static void md_start_debug( gcry_md_hd_t a, char *suffix );
+static void md_start_debug ( gcry_md_hd_t a, char *suffix );
 static void md_stop_debug( gcry_md_hd_t a );
 
 
@@ -623,8 +623,11 @@
 	ath_mutex_unlock (&digests_registered_lock);
        }
 
+  /* (The cast is required to silent the gcc warning. md_start-debug
+     should actually take a const string but that may conflict wity
+     gcry_md_ctl.)  */
   if (a->debug)
-    md_start_debug (bhd, "unknown");
+    md_start_debug (bhd, (char*)"unknown");
 
   if (! err)
     *b_hd = bhd;
@@ -1113,7 +1116,7 @@
 
 
 static void
-md_start_debug( gcry_md_hd_t md, char *suffix )
+md_start_debug ( gcry_md_hd_t md, char *suffix )
 {
   static int idx=0;
   char buf[50];

Modified: branches/LIBGCRYPT-1-2-BRANCH/configure.ac
===================================================================
--- branches/LIBGCRYPT-1-2-BRANCH/configure.ac	2007-11-13 08:51:23 UTC (rev 1269)
+++ branches/LIBGCRYPT-1-2-BRANCH/configure.ac	2007-11-13 08:53:21 UTC (rev 1270)
@@ -39,6 +39,8 @@
 #   (Interfaces removed:    CURRENT++, AGE=0, REVISION=0)
 #   (Interfaces added:      CURRENT++, AGE++, REVISION=0)
 #   (No interfaces changed:                   REVISION++)
+# WARNING: This is the stable branch: Never change any interface; thus
+#          only bump up revision.
 LIBGCRYPT_LT_CURRENT=13
 LIBGCRYPT_LT_AGE=2
 LIBGCRYPT_LT_REVISION=3
@@ -479,12 +481,21 @@
 GNUPG_CHECK_TYPEDEF(u16, HAVE_U16_TYPEDEF)
 GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF)
 
+
 gl_TYPE_SOCKLEN_T
-if test ".$gl_cv_socklen_t_equiv" = "."; then
-  FALLBACK_SOCKLEN_T="typedef socklen_t gcry_socklen_t;"
-else
-  FALLBACK_SOCKLEN_T="typedef ${gl_cv_socklen_t_equiv} gcry_socklen_t;"
-fi
+case "${host}" in
+  *-*-mingw32*)
+    # socklen_t may or may not be defined depending on what headers
+    # are included.  To be safe we use int as this is the actual type.
+    FALLBACK_SOCKLEN_T="typedef int gcry_socklen_t;"
+    ;;
+  *)
+    if test ".$gl_cv_socklen_t_equiv" = "."; then
+      FALLBACK_SOCKLEN_T="typedef socklen_t gcry_socklen_t;"
+    else
+      FALLBACK_SOCKLEN_T="typedef ${gl_cv_socklen_t_equiv} gcry_socklen_t;"
+    fi
+esac
 AC_SUBST(FALLBACK_SOCKLEN_T)
 
 
@@ -635,8 +646,8 @@
        test "$more_gcc_warnings" = "yes"; then
         CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes"
         if test "$more_gcc_warnings" = "yes"; then
-            CFLAGS="$CFLAGS -W -Wpointer-arith -Wbad-function-cast"
-            CFLAGS="$CFLAGS -Wwrite-strings -Wunreachable-code"
+            CFLAGS="$CFLAGS -Wpointer-arith -Wbad-function-cast"
+            CFLAGS="$CFLAGS -Wwrite-strings"
             CFLAGS="$CFLAGS -Wno-sign-compare"
         fi
     else

Modified: branches/LIBGCRYPT-1-2-BRANCH/doc/ChangeLog
===================================================================
--- branches/LIBGCRYPT-1-2-BRANCH/doc/ChangeLog	2007-11-13 08:51:23 UTC (rev 1269)
+++ branches/LIBGCRYPT-1-2-BRANCH/doc/ChangeLog	2007-11-13 08:53:21 UTC (rev 1270)
@@ -1,3 +1,9 @@
+2007-02-22  Werner Koch  <wk at g10code.com>
+
+	* gcrypt.texi: For HTML move the content section behind tghe menu.
+
+	* Makefile.am (online): New target.
+
 2006-11-03  Werner Koch  <wk at g10code.com>
 
 	* gcrypt.texi (Available ciphers): Fixed typo.

Modified: branches/LIBGCRYPT-1-2-BRANCH/doc/Makefile.am
===================================================================
--- branches/LIBGCRYPT-1-2-BRANCH/doc/Makefile.am	2007-11-13 08:51:23 UTC (rev 1269)
+++ branches/LIBGCRYPT-1-2-BRANCH/doc/Makefile.am	2007-11-13 08:53:21 UTC (rev 1270)
@@ -22,3 +22,13 @@
 info_TEXINFOS = gcrypt.texi
 gcrypt_TEXINFOS = lgpl.texi gpl.texi
 
+
+online: gcrypt.html gcrypt.pdf gcrypt.info
+	set -e; \
+	echo "Uploading current manuals to www.gnupg.org ..."; \
+        user=werner ; dir="webspace/manuals/gcrypt/" ; \
+	(cd gcrypt.html && rsync -vr --exclude='.svn' .  \
+	  $${user}@cvs.gnupg.org:$${dir} ); \
+        rsync -v gcrypt.pdf gcrypt.info $${user}@cvs.gnupg.org:$${dir}
+
+

Modified: branches/LIBGCRYPT-1-2-BRANCH/doc/gcrypt.texi
===================================================================
--- branches/LIBGCRYPT-1-2-BRANCH/doc/gcrypt.texi	2007-11-13 08:51:23 UTC (rev 1269)
+++ branches/LIBGCRYPT-1-2-BRANCH/doc/gcrypt.texi	2007-11-13 08:53:21 UTC (rev 1270)
@@ -46,10 +46,11 @@
 @insertcopying
 @end titlepage
 
-
+ at ifnothtml
 @summarycontents
 @contents
 @page
+ at end ifnothtml
 
 
 @ifnottex
@@ -162,6 +163,11 @@
 
 @end menu
 
+ at ifhtml
+ at page
+ at summarycontents
+ at contents
+ at end ifhtml
 
 
 @c **********************************************************

Modified: branches/LIBGCRYPT-1-2-BRANCH/m4/socklen.m4
===================================================================
--- branches/LIBGCRYPT-1-2-BRANCH/m4/socklen.m4	2007-11-13 08:51:23 UTC (rev 1269)
+++ branches/LIBGCRYPT-1-2-BRANCH/m4/socklen.m4	2007-11-13 08:53:21 UTC (rev 1270)
@@ -19,7 +19,7 @@
   [AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl
    AC_CHECK_TYPE([socklen_t], ,
      [AC_MSG_CHECKING([for socklen_t equivalent])
-      AC_CACHE_VAL([gl_cv_gl_cv_socklen_t_equiv],
+      AC_CACHE_VAL([gl_cv_socklen_t_equiv],
 	[# Systems have either "struct sockaddr *" or
 	 # "void *" as the second argument to getpeername
 	 gl_cv_socklen_t_equiv=

Modified: branches/LIBGCRYPT-1-2-BRANCH/mpi/ChangeLog
===================================================================
--- branches/LIBGCRYPT-1-2-BRANCH/mpi/ChangeLog	2007-11-13 08:51:23 UTC (rev 1269)
+++ branches/LIBGCRYPT-1-2-BRANCH/mpi/ChangeLog	2007-11-13 08:53:21 UTC (rev 1270)
@@ -1,3 +1,7 @@
+2007-03-23  Werner Koch  <wk at g10code.com>
+
+	* mpi-bit.c (_gcry_mpi_lshift_limbs): Assign AP after the resize.
+
 2007-02-02  Werner Koch  <wk at g10code.com>
 
 	* config.links (mpi_optional_modules): Make sure that powerpc64 is

Modified: branches/LIBGCRYPT-1-2-BRANCH/mpi/mpi-bit.c
===================================================================
--- branches/LIBGCRYPT-1-2-BRANCH/mpi/mpi-bit.c	2007-11-13 08:51:23 UTC (rev 1269)
+++ branches/LIBGCRYPT-1-2-BRANCH/mpi/mpi-bit.c	2007-11-13 08:53:21 UTC (rev 1270)
@@ -276,7 +276,7 @@
 void
 _gcry_mpi_lshift_limbs( gcry_mpi_t a, unsigned int count )
 {
-    mpi_ptr_t ap = a->d;
+    mpi_ptr_t ap;
     int n = a->nlimbs;
     int i;
 
@@ -285,6 +285,7 @@
 
     RESIZE_IF_NEEDED( a, n+count );
 
+    ap = a->d;
     for( i = n-1; i >= 0; i-- )
 	ap[i+count] = ap[i];
     for(i=0; i < count; i++ )

Modified: branches/LIBGCRYPT-1-2-BRANCH/src/ChangeLog
===================================================================
--- branches/LIBGCRYPT-1-2-BRANCH/src/ChangeLog	2007-11-13 08:51:23 UTC (rev 1269)
+++ branches/LIBGCRYPT-1-2-BRANCH/src/ChangeLog	2007-11-13 08:53:21 UTC (rev 1270)
@@ -1,3 +1,8 @@
+2007-11-13  Werner Koch  <wk at g10code.com>
+
+	* gcrypt.h (_GCRY_GCC_ATTR_MALLOC): Fixed gcc version check.
+	Reported by Gabriele Monti.
+
 2007-02-12  Werner Koch  <wk at g10code.com>
 
 	* gcrypt.h.in: Include stdlib.h for the sake fo the trheading




More information about the Gnupg-commits mailing list