Skip to content

Commit 32bf3f1

Browse files
author
Moritz Schulte
committed
ChangeLog:
2005-04-23 Moritz Schulte <moritz@g10code.com> * acinclude.m4 (TYPE_SOCKLEN_T): New type definition test; provided by Albert Chin. * configure.ac: Don't use $(CMD) as it's not portable; use `CMD` nstead. Simpler -lnsl/-lsocket test. Use TYPE_SOCKLEN_T test. Don't forget to set `random_modules' correctly. 2005-04-22 Moritz Schulte <moritz@g10code.com> * configure.ac: Added support for pkgconfig; provided by Albert Chin. cipher/ChangeLog: 2005-04-12 Moritz Schulte <moritz@g10code.com> * ac.c (_gcry_ac_io_write, _gcry_ac_io_read): Initialize err to make the compiler happy. Always use errno, now that gcry_malloc() is guaranteed to set errno on failure. (_gcry_ac_data_to_sexp): Don't forget to goto out after error in loop. (_gcry_ac_data_to_sexp): Remove unused variable: mpi_list; (_gcry_ac_data_to_sexp): Always deallocate sexp_buffer. (_gcry_ac_data_from_sexp): Don't forget to initialize data_set_new. (_gcry_ac_data_from_sexp): Handle special case, which is necessary, since gcry_sexp_nth() does not distinguish between "element does not exist" and "element is the empty list". (_gcry_ac_io_init_va): Use assert to make sure that mode and type are correct. Use gcry_error_t types where gcry_err_code_t types have been used before. mpi/ChangeLog: 2005-04-23 Moritz Schulte <moritz@g10code.com> * Makefile.am: Don't assume the compiler will pre-process the .S files. Some compilers, like those from HP and IBM, don't do this. So, we use the same solution gnupg-1.4.0 does. Preprocess first and then compile. * hppa1.1/mpih-mul3.S: Add "level 1.1" directive to disable warning about using PA-RISC1.1 opcodes. * hppa1.1/mpih-mul2.S: Likewise. * hppa1.1/mpih-mul1.S: Likewise. * hppa1.1/udiv-qrnnd.S: Likewise. src/ChangeLog: 2005-04-22 Moritz Schulte <moritz@g10code.com> * Makefile.am (pkgconfigdir, pkgconfig_DATA): New; support for pkgconfig provided by Albert Chin. * libgcrypt.pc.in (Cflags): New file. 2005-04-16 Moritz Schulte <moritz@g10code.com> * g10lib.h (_gcry_ac_init): Declare. * global.c (global_init): Call _gcry_ac_init; don't forget to set err. tests/ChangeLog: 2005-04-22 Moritz Schulte <moritz@g10code.com> * tsexp.c: Include <config.h> in case HAVE_CONFIG_H is defined; thanks to Albert Chin. * testapi.c: Likewise. * register.c: Likewise. * pubkey.c: Likewise. * prime.c: Likewise. * pkbench.c: Likewise. * keygen.c: Likewise. * benchmark.c: Likewise. * basic.c: Likewise. * ac-schemes.c: Likewise. * ac-data.c: Likewise. * ac.c: Likewise. 2005-04-16 Moritz Schulte <moritz@g10code.com> * ac-data.c (check_run): Include new test.
1 parent bad0775 commit 32bf3f1

30 files changed

Lines changed: 202 additions & 41 deletions

ChangeLog

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
2005-04-23 Moritz Schulte <moritz@g10code.com>
2+
3+
* acinclude.m4 (TYPE_SOCKLEN_T): New type definition test;
4+
provided by Albert Chin.
5+
* configure.ac: Don't use $(CMD) as it's not portable; use `CMD` nstead.
6+
Simpler -lnsl/-lsocket test.
7+
Use TYPE_SOCKLEN_T test.
8+
Don't forget to set `random_modules' correctly.
9+
10+
2005-04-22 Moritz Schulte <moritz@g10code.com>
11+
12+
* configure.ac: Added support for pkgconfig; provided by Albert
13+
Chin.
14+
115
2005-04-11 Moritz Schulte <moritz@g10code.com>
216

317
* configure.ac: Integrate Whirlpool.

acinclude.m4

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,3 +727,43 @@ else
727727
fi
728728
])
729729
730+
dnl Check for socklen_t: historically on BSD it is an int, and in
731+
dnl POSIX 1g it is a type of its own, but some platforms use different
732+
dnl types for the argument to getsockopt, getpeername, etc. So we
733+
dnl have to test to find something that will work.
734+
AC_DEFUN([TYPE_SOCKLEN_T],
735+
[
736+
AC_CHECK_TYPE([socklen_t], ,[
737+
AC_MSG_CHECKING([for socklen_t equivalent])
738+
AC_CACHE_VAL([socklen_t_equiv],
739+
[
740+
# Systems have either "struct sockaddr *" or
741+
# "void *" as the second argument to getpeername
742+
socklen_t_equiv=
743+
for arg2 in "struct sockaddr" void; do
744+
for t in int size_t unsigned long "unsigned long"; do
745+
AC_TRY_COMPILE([
746+
#include <sys/types.h>
747+
#include <sys/socket.h>
748+
749+
int getpeername (int, $arg2 *, $t *);
750+
],[
751+
$t len;
752+
getpeername(0,0,&len);
753+
],[
754+
socklen_t_equiv="$t"
755+
break
756+
])
757+
done
758+
done
759+
760+
if test "x$socklen_t_equiv" = x; then
761+
AC_MSG_ERROR([Cannot find a type to use in place of socklen_t])
762+
fi
763+
])
764+
AC_MSG_RESULT($socklen_t_equiv)
765+
AC_DEFINE_UNQUOTED(socklen_t, $socklen_t_equiv,
766+
[type to use in place of socklen_t if not defined])],
767+
[#include <sys/types.h>
768+
#include <sys/socket.h>])
769+
])

cipher/ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2005-04-16 Moritz Schulte <moritz@g10code.com>
2+
3+
* ac.c (_gcry_ac_init): New function.
4+
15
2005-04-12 Moritz Schulte <moritz@g10code.com>
26

37
* ac.c (_gcry_ac_io_write, _gcry_ac_io_read): Initialize err to

cipher/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ sha1.c \
6262
sha256.c \
6363
sha512.c \
6464
tiger.c \
65+
whirlpool.c \
6566
twofish.c \
6667
rfc2268.c
6768

cipher/ac.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1321,13 +1321,6 @@ ac_data_construct (const char *identifier, int include_flags,
13211321
return err;
13221322
}
13231323

1324-
1325-
1326-
/*
1327-
* Wrapper macros.
1328-
*/
1329-
1330-
13311324

13321325

13331326
/*
@@ -3475,3 +3468,9 @@ gcry_ac_name_to_id (const char *name, gcry_ac_id_t *algorithm)
34753468

34763469
return gcry_error (err);
34773470
}
3471+
3472+
gcry_err_code_t
3473+
_gcry_ac_init (void)
3474+
{
3475+
return 0;
3476+
}

cipher/md.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ static struct digest_table_entry
6363
#endif
6464
#if USE_TIGER
6565
{ &_gcry_digest_spec_tiger, GCRY_MD_TIGER },
66+
#endif
67+
#if USE_WHIRLPOOL
68+
{ &_gcry_digest_spec_whirlpool, GCRY_MD_WHIRLPOOL },
6669
#endif
6770
{ NULL },
6871
};

configure.ac

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ default_digests="$available_digests"
250250
AC_ARG_ENABLE(ciphers,
251251
AC_HELP_STRING([--enable-ciphers=ciphers],
252252
[select the symmetric ciphers to include]),
253-
[enabled_ciphers=$(echo $enableval | tr , ' ' | tr '[A-Z]' '[a-z]')],
253+
[enabled_ciphers=`echo $enableval | tr , ' ' | tr '[A-Z]' '[a-z]'`],
254254
[enabled_ciphers=""])
255255
if test "x$enabled_ciphers" = "x" \
256256
-o "$enabled_ciphers" = "yes" \
@@ -270,7 +270,7 @@ AC_MSG_RESULT([$enabled_ciphers])
270270
AC_ARG_ENABLE(pubkey-ciphers,
271271
AC_HELP_STRING([--enable-pubkey-ciphers=ciphers],
272272
[select the public-key ciphers to include]),
273-
[enabled_pubkey_ciphers=$(echo $enableval | tr , ' ' | tr '[A-Z]' '[a-z]')],
273+
[enabled_pubkey_ciphers=`echo $enableval | tr , ' ' | tr '[A-Z]' '[a-z]'`],
274274
[enabled_pubkey_ciphers=""])
275275
if test "x$enabled_pubkey_ciphers" = "x" \
276276
-o "$enabled_pubkey_ciphers" = "yes" \
@@ -290,7 +290,7 @@ AC_MSG_RESULT([$enabled_pubkey_ciphers])
290290
AC_ARG_ENABLE(digests,
291291
AC_HELP_STRING([--enable-digests=digests],
292292
[select the message digests to include]),
293-
[enabled_digests=$(echo $enableval | tr , ' ' | tr '[A-Z]' '[a-z]')],
293+
[enabled_digests=`echo $enableval | tr , ' ' | tr '[A-Z]' '[a-z]'`],
294294
[enabled_digests=""])
295295
if test "x$enabled_digests" = "x" \
296296
-o "$enabled_digests" = "yes" \
@@ -310,7 +310,7 @@ AC_MSG_RESULT([$enabled_digests])
310310
AC_ARG_ENABLE(random,
311311
AC_HELP_STRING([--enable-random=name],
312312
[select which random number generator to use]),
313-
[random=$(echo $enableval | tr '[A-Z]' '[a-z]')],
313+
[random=`echo $enableval | tr '[A-Z]' '[a-z]'`],
314314
[])
315315
if test "x$random" = "x" -o "$random" = "yes" -o "$random" = "no"; then
316316
random=default
@@ -428,18 +428,9 @@ AC_DEFINE(GPG_ERR_SOURCE_DEFAULT, GPG_ERR_SOURCE_GCRYPT,
428428

429429
# Solaris needs -lsocket and -lnsl. Unisys system includes
430430
# gethostbyname in libsocket but needs libnsl for socket.
431-
AC_CHECK_LIB(nsl, gethostbyname)
432-
AC_CHECK_LIB(socket, socket, ac_need_libsocket=1, ac_try_nsl=1)
433-
if test x$ac_need_libsocket = x1; then
434-
LIBS="$LIBS -lsocket"
435-
fi
436-
if test x$ac_try_nsl = x1; then
437-
AC_CHECK_LIB(nsl, gethostbyname, ac_need_libnsl=1)
438-
if test x$ac_need_libnsl = x1
439-
then
440-
LIBS="$LIBS -lnsl"
441-
fi
442-
fi
431+
AC_SEARCH_LIBS(setsockopt, [socket], ,
432+
[AC_SEARCH_LIBS(setsockopt, [socket], , , [-lnsl])])
433+
AC_SEARCH_LIBS(setsockopt, [nsl])
443434

444435
##################################
445436
#### Checks for header files. ####
@@ -474,6 +465,8 @@ AC_CHECK_TYPE(socklen_t,,
474465
#include <sys/socket.h>
475466
])
476467

468+
TYPE_SOCKLEN_T
469+
477470
#######################################
478471
#### Checks for library functions. ####
479472
#######################################
@@ -554,6 +547,8 @@ else
554547
if test "$random" = "auto"; then
555548
# Build everything, allow to select at runtime.
556549
random_modules="$auto_random_modules"
550+
else
551+
random_modules="$random"
557552
fi
558553
fi
559554

@@ -788,6 +783,7 @@ cipher/Makefile
788783
doc/Makefile
789784
src/Makefile
790785
src/libgcrypt-config
786+
src/libgcrypt.pc
791787
tests/Makefile
792788
w32-dll/Makefile
793789
])

mpi/ChangeLog

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
2005-04-23 Moritz Schulte <moritz@g10code.com>
2+
3+
* Makefile.am: Don't assume the compiler will pre-process the .S
4+
files. Some compilers, like those from HP and IBM, don't do
5+
this. So, we use the same solution gnupg-1.4.0 does. Preprocess
6+
first and then compile.
7+
8+
* hppa1.1/mpih-mul3.S: Add "level 1.1" directive to disable
9+
warning about using PA-RISC1.1 opcodes.
10+
* hppa1.1/mpih-mul2.S: Likewise.
11+
* hppa1.1/mpih-mul1.S: Likewise.
12+
* hppa1.1/udiv-qrnnd.S: Likewise.
13+
114
2005-02-16 Moritz Schulte <moritz@g10code.com>
215

316
* mpiutil.c (_gcry_mpi_alloc_limb_space): Rewritten, fixed memory

mpi/Makefile.am

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,14 @@ libmpi_la_DEPENDENCIES = @MPI_MOD_LIST_LO@
181181
SUFFIXES = .S .o .obj .lo
182182

183183
.S.o:
184-
$(CCASCOMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
184+
$(CPP) $(INCLUDES) $(DEFS) $< | grep -v '^#' > $*.s
185+
$(CCASCOMPILE) -c `test -f '$*.s' || echo '$(srcdir)/'`$*.s
186+
rm $*.s
185187

186188
.S.obj:
187189
$(CCASCOMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
188190

189191
.S.lo:
190-
$(LTCCASCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
192+
$(CPP) $(INCLUDES) $(DEFS) $< | grep -v '^#' > $*.s
193+
$(LTCCASCOMPILE) -c -o $@ `test -f '$*.s' || echo '$(srcdir)/'`$*.s
194+
rm $*.s

mpi/hppa1.1/mpih-mul1.S

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@
5555
* in the cache.)
5656
*/
5757

58+
.level 1.1
59+
5860
.code
5961
.export _gcry_mpih_mul_1
6062
.label _gcry_mpih_mul_1

0 commit comments

Comments
 (0)