[PATCH] 1.4.22 historical gcc compatibility

Dario Niedermann dario at darioniedermann.it
Thu Oct 19 02:38:28 CEST 2017


The enclosed patch enables gnupg-1.4.22 to compile with gcc-2.95.3.

An accomplishment which - while probably not very high on most people's
priority lists - did allow me to build it on OpenBSD 3.3 (2001 vintage,
not quite ancient).

The patch is of my own doing and just removes what the old compiler
sees as a syntax error.

Regards,
Dario Niedermann


=====BEGIN PATCH=====
--- cipher/rsa.c.orig	Mon Jul 10 10:48:39 2017
+++ cipher/rsa.c	Wed Oct 18 14:34:21 2017
@@ -304,6 +304,9 @@
 #if 0
     mpi_powm( output, input, skey->d, skey->n );
 #else
+    MPI D_blind;
+    MPI rr;
+    unsigned int rr_nbits;
     int nlimbs = mpi_get_nlimbs (skey->n)+1;
     MPI m1   = mpi_alloc_secure (nlimbs);
     MPI m2   = mpi_alloc_secure (nlimbs);
@@ -326,9 +329,7 @@
 # endif /* USE_BLINDING */
 
     /* RSA secret operation:  */
-    MPI D_blind = mpi_alloc_secure (nlimbs);
-    MPI rr;
-    unsigned int rr_nbits;
+    D_blind = mpi_alloc_secure (nlimbs);
 
     rr_nbits = mpi_get_nbits (skey->p) / 4;
     if (rr_nbits < 96)
=====END PATCH=====

-- 
Dario Niedermann.                 Also on the Internet at:

gopher://darioniedermann.it/  <>  https://www.darioniedermann.it/



More information about the Gnupg-devel mailing list