diff options
author | Simon Josefsson <simon@josefsson.org> | 2006-04-04 12:32:50 +0000 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2006-04-04 12:32:50 +0000 |
commit | f9463b7c4c197abddc01c3a7bcd6894cfa2032f3 (patch) | |
tree | d415c0bc90b88d58422582613654ac7abff736e3 | |
parent | 49963d2b72a5d8438c87d494c3e002264e4c3507 (diff) | |
download | gnutls-f9463b7c4c197abddc01c3a7bcd6894cfa2032f3.tar.gz |
Update.
-rw-r--r-- | gl/m4/gc-random.m4 | 24 | ||||
-rw-r--r-- | gl/stdint_.h | 18 |
2 files changed, 29 insertions, 13 deletions
diff --git a/gl/m4/gc-random.m4 b/gl/m4/gc-random.m4 index 516646e17c..40e047106a 100644 --- a/gl/m4/gc-random.m4 +++ b/gl/m4/gc-random.m4 @@ -41,30 +41,36 @@ AC_DEFUN([gl_GC_RANDOM], AC_ARG_ENABLE(random-device, AC_HELP_STRING([--enable-random-device], [device with (strong) randomness (for Nettle)]), - test "$enableval" != "no" && NAME_OF_RANDOM_DEVICE=$enableval) + NAME_OF_RANDOM_DEVICE=$enableval) AC_MSG_RESULT($NAME_OF_RANDOM_DEVICE) AC_MSG_CHECKING([device with pseudo random data...]) AC_ARG_ENABLE(pseudo-random-device, AC_HELP_STRING([--enable-pseudo-random-device], [device with pseudo randomness (for Nettle)]), - test "$enableval" != "no" && NAME_OF_PSEUDO_RANDOM_DEVICE=$enableval) + NAME_OF_PSEUDO_RANDOM_DEVICE=$enableval) AC_MSG_RESULT($NAME_OF_PSEUDO_RANDOM_DEVICE) AC_MSG_CHECKING([device with unpredictable data for nonces...]) AC_ARG_ENABLE(nonce-device, AC_HELP_STRING([--enable-nonce-device], [device with unpredictable nonces (for Nettle)]), - test "$enableval" != "no" && NAME_OF_NONCE_DEVICE=$enableval) + NAME_OF_NONCE_DEVICE=$enableval) AC_MSG_RESULT($NAME_OF_NONCE_DEVICE) if test "$cross_compiling" != yes; then - AC_CHECK_FILE($NAME_OF_RANDOM_DEVICE,, - AC_MSG_WARN([[device for (strong) random data `$NAME_OF_RANDOM_DEVICE' does not exist]])) - AC_CHECK_FILE($NAME_OF_PSEUDO_RANDOM_DEVICE,, - AC_MSG_WARN([[device for pseudo-random data `$NAME_OF_PSEUDO_RANDOM_DEVICE' does not exist]])) - AC_CHECK_FILE($NAME_OF_NONCE_DEVICE,, - AC_MSG_WARN([[device for unpredictable nonces `$NAME_OF_NONCE_DEVICE' does not exist]])) + if test "$NAME_OF_RANDOM_DEVICE" != "no"; then + AC_CHECK_FILE($NAME_OF_RANDOM_DEVICE,, + AC_MSG_WARN([[Device `$NAME_OF_RANDOM_DEVICE' does not exist, consider to use --enable-random-device]])) + fi + if test "$NAME_OF_PSEUDO_RANDOM_DEVICE" != "no"; then + AC_CHECK_FILE($NAME_OF_PSEUDO_RANDOM_DEVICE,, + AC_MSG_WARN([[Device `$NAME_OF_PSEUDO_RANDOM_DEVICE' does not exist, consider to use --enable-pseudo-random-device]])) + fi + if test "$NAME_OF_NONCE_DEVICE" != "no"; then + AC_CHECK_FILE($NAME_OF_NONCE_DEVICE,, + AC_MSG_WARN([[Device `$NAME_OF_NONCE_DEVICE' does not exist, consider to use --enable-nonce-device]])) + fi else AC_MSG_NOTICE([[Cross compiling, assuming random devices exists on the target host...]]) fi diff --git a/gl/stdint_.h b/gl/stdint_.h index 91e9a73d5f..8f6254134f 100644 --- a/gl/stdint_.h +++ b/gl/stdint_.h @@ -33,6 +33,16 @@ #if defined(__FreeBSD__) # include <sys/inttypes.h> #endif +#if defined(__OpenBSD__) + /* In OpenBSD 3.8, <sys/types.h> includes <machine/types.h>, which defines + int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__. + <inttypes.h> includes <machine/types.h> and also defines intptr_t and + uintptr_t. */ +# include <sys/types.h> +# if HAVE_INTTYPES_H +# include <inttypes.h> +# endif +#endif #if defined(__linux__) && HAVE_SYS_BITYPES_H /* Linux libc4 >= 4.6.7 and libc5 have a <sys/bitypes.h> that defines int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is @@ -62,7 +72,7 @@ /* 7.18.1.1. Exact-width integer types */ -#if !defined(__FreeBSD__) +#if !(defined(__FreeBSD__) || defined(__OpenBSD__)) #ifdef _STDINT_H_NEED_SIGNED_INT_TYPES typedef signed char int8_t; @@ -97,7 +107,7 @@ typedef unsigned __int64 uint64_t; #define _STDINT_H_HAVE_INT64 #endif -#endif /* !FreeBSD */ +#endif /* !(FreeBSD || OpenBSD) */ /* 7.18.1.2. Minimum-width integer types */ @@ -127,14 +137,14 @@ typedef uint64_t uint_fast64_t; /* 7.18.1.4. Integer types capable of holding object pointers */ -#if !defined(__FreeBSD__) +#if !(defined(__FreeBSD__) || (defined(__OpenBSD__) && HAVE_INTTYPES_H)) /* On some platforms (like IRIX6 MIPS with -n32) sizeof(void*) < sizeof(long), but this doesn't matter here. */ typedef long intptr_t; typedef unsigned long uintptr_t; -#endif /* !FreeBSD */ +#endif /* !(FreeBSD || (OpenBSD && HAVE_INTTYPES_H)) */ /* 7.18.1.5. Greatest-width integer types */ |