1
0
mirror of https://git.code.sf.net/p/fuse-emulator/fuse-utils synced 2025-08-09 00:42:13 +03:00

Fix the build of rzxcheck and enable some bits of rzxdump if libgcrypt is present (bug #268).

Legacy-ID: 4767
This commit is contained in:
Sergio Baldoví
2012-11-18 18:49:54 +00:00
parent 710b05c225
commit fc6e7c7ea7
3 changed files with 13 additions and 12 deletions

View File

@@ -112,10 +112,9 @@ if test "$withval" = no; then libgcrypt=no; else libgcrypt=yes; fi,
libgcrypt=yes) libgcrypt=yes)
AC_MSG_RESULT($libgcrypt) AC_MSG_RESULT($libgcrypt)
if test "$libgcrypt" = yes; then if test "$libgcrypt" = yes; then
AC_CHECK_HEADERS(gcrypt.h,LIBS="$LIBS -lgcrypt") AC_CHECK_HEADERS(gcrypt.h,LIBS="$LIBS -lgcrypt",libgcrypt=no)
fi fi
AC_SUBST(GCRYPT_LIBS) AM_CONDITIONAL(BUILD_RZXCHECK, test "$libgcrypt" = yes)
AM_CONDITIONAL(BUILD_RZXCHECK, test "$gcrypt" = yes)
dnl Do we want lots of warning messages? dnl Do we want lots of warning messages?
AC_MSG_CHECKING(whether lots of warnings requested) AC_MSG_CHECKING(whether lots of warnings requested)

View File

@@ -35,7 +35,7 @@
20030821 rzxtool.c: free any snapshot we're using at program exit. 20030821 rzxtool.c: free any snapshot we're using at program exit.
20030822 rzxcheck.c: free signature memory. 20030822 rzxcheck.c: free signature memory.
20030824 rzxtool.c: free snapshot after writing it rather than before. 20030824 rzxtool.c: free snapshot after writing it rather than before.
20030901 Build rzxcheck iff libgcrypt is present. 20030901 Build rzxcheck if libgcrypt is present.
20030901 Remove the find an <n>-bit type stuff as that's now done by 20030901 Remove the find an <n>-bit type stuff as that's now done by
libspectrum. libspectrum.
20030912 man/: update man pages for the 0.6.1 release. 20030912 man/: update man pages for the 0.6.1 release.
@@ -351,10 +351,12 @@
20120923 tapeconv.c: remove potential memory leak (Fred). 20120923 tapeconv.c: remove potential memory leak (Fred).
20121021 Makefile.am,acinclude.m4,autogen.sh,compat/amiga/Makefile.am, 20121021 Makefile.am,acinclude.m4,autogen.sh,compat/amiga/Makefile.am,
compat/unix/Makefile.am,compat/win32/Makefile.am,configure.[ac|in], compat/unix/Makefile.am,compat/win32/Makefile.am,configure.[ac|in],
m4/{audiofile.m4,m4/glib-1.0.m4,m4/glib-2.0.m4,m4/iconv.m4}: m4/{audiofile.m4,glib-1.0.m4,glib-2.0.m4,iconv.m4}: modernise autoconf
modernise autoconf support (more from patch #3575831) (Sergio). support (more from patch #3575831) (Sergio).
20121026 compat/win32/osname.c,fmfconv.[ch],fmfconv_aiff.c,fmfconv_au.c, 20121026 compat/win32/osname.c,fmfconv.[ch],fmfconv_aiff.c,fmfconv_au.c,
fmfconv_ff.c,fmfconv_ppm.c,fmfconv_scr.c,fmfconv_wav.c,fmfconv_yuv.c, fmfconv_ff.c,fmfconv_ppm.c,fmfconv_scr.c,fmfconv_wav.c,fmfconv_yuv.c,
snap2tzx.c: fix various warnings (patch #3579248) (Sergio). snap2tzx.c: fix various warnings (patch #3579248) (Sergio).
20121111 Makefile.am,configure.ac: enhance win32 installation and distribution 20121111 Makefile.am,configure.ac: enhance win32 installation and distribution
(patch #3580843) (Sergio). (patch #3580843) (Sergio).
20121118 configure.ac,rzxdump.c: fix the build of rzxcheck and enable some bits
of rzxdump if libgcrypt is present (bug #3582043) (Sergio).

View File

@@ -34,9 +34,9 @@
#include <unistd.h> #include <unistd.h>
#include <errno.h> #include <errno.h>
#ifdef HAVE_LIBGCRYPT #ifdef HAVE_GCRYPT_H
#include <gcrypt.h> #include <gcrypt.h>
#endif /* #ifdef HAVE_LIBGCRYPT */ #endif /* #ifdef HAVE_GCRYPT_H */
#include <libspectrum.h> #include <libspectrum.h>
@@ -319,10 +319,10 @@ static int
read_sign_end_block( unsigned char **ptr, unsigned char *end ) read_sign_end_block( unsigned char **ptr, unsigned char *end )
{ {
size_t length; size_t length;
#ifdef HAVE_LIBGCRYPT #ifdef HAVE_GCRYPT_H
gcry_mpi_t a; int error; size_t length2; gcry_mpi_t a; int error; size_t length2;
unsigned char *buffer; unsigned char *buffer;
#endif /* #ifdef HAVE_LIBGCRYPT */ #endif /* #ifdef HAVE_GCRYPT_H */
if( end - *ptr < 4 ) { if( end - *ptr < 4 ) {
fprintf( stderr, "%s: not enough bytes for sign end block\n", progname ); fprintf( stderr, "%s: not enough bytes for sign end block\n", progname );
@@ -341,7 +341,7 @@ read_sign_end_block( unsigned char **ptr, unsigned char *end )
return 1; return 1;
} }
#ifdef HAVE_LIBGCRYPT #ifdef HAVE_GCRYPT_H
error = gcry_mpi_scan( &a, GCRYMPI_FMT_PGP, *ptr, length, &length2 ); error = gcry_mpi_scan( &a, GCRYMPI_FMT_PGP, *ptr, length, &length2 );
if( error ) { if( error ) {
@@ -367,7 +367,7 @@ read_sign_end_block( unsigned char **ptr, unsigned char *end )
printf( " s: %s\n", buffer ); printf( " s: %s\n", buffer );
free( buffer ); gcry_mpi_release( a ); free( buffer ); gcry_mpi_release( a );
#endif #endif /* #ifdef HAVE_GCRYPT_H */
(*ptr) += length; (*ptr) += length;