summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorMoritz Schulte <mo@g10code.com>2005-04-22 22:39:44 +0000
committerMoritz Schulte <mo@g10code.com>2005-04-22 22:39:44 +0000
commit32bf3f13e8b45497322177645bebf0b5d0c9cb8e (patch)
tree4bf14edee293122a3d50db262e7a6525a4d2fb67 /acinclude.m4
parentbad07754a92175f84971267658220a5ab6a0d05b (diff)
downloadlibgcrypt-32bf3f13e8b45497322177645bebf0b5d0c9cb8e.tar.gz
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.
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m440
1 files changed, 40 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 8f13173d..91ae631f 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -727,3 +727,43 @@ else
fi
])
+dnl Check for socklen_t: historically on BSD it is an int, and in
+dnl POSIX 1g it is a type of its own, but some platforms use different
+dnl types for the argument to getsockopt, getpeername, etc. So we
+dnl have to test to find something that will work.
+AC_DEFUN([TYPE_SOCKLEN_T],
+[
+ AC_CHECK_TYPE([socklen_t], ,[
+ AC_MSG_CHECKING([for socklen_t equivalent])
+ AC_CACHE_VAL([socklen_t_equiv],
+ [
+ # Systems have either "struct sockaddr *" or
+ # "void *" as the second argument to getpeername
+ socklen_t_equiv=
+ for arg2 in "struct sockaddr" void; do
+ for t in int size_t unsigned long "unsigned long"; do
+ AC_TRY_COMPILE([
+ #include <sys/types.h>
+ #include <sys/socket.h>
+
+ int getpeername (int, $arg2 *, $t *);
+ ],[
+ $t len;
+ getpeername(0,0,&len);
+ ],[
+ socklen_t_equiv="$t"
+ break
+ ])
+ done
+ done
+
+ if test "x$socklen_t_equiv" = x; then
+ AC_MSG_ERROR([Cannot find a type to use in place of socklen_t])
+ fi
+ ])
+ AC_MSG_RESULT($socklen_t_equiv)
+ AC_DEFINE_UNQUOTED(socklen_t, $socklen_t_equiv,
+ [type to use in place of socklen_t if not defined])],
+ [#include <sys/types.h>
+#include <sys/socket.h>])
+])