summaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2019-12-06 13:10:00 +0300
committerIgor Pashev <pashev.igor@gmail.com>2019-12-06 13:10:00 +0300
commit8c13fdabc9833ead8afb57f6c4b476fb7a1ab9e6 (patch)
tree6acdbdadfef2a251bb95ef0aed0f673f0f2bbfa9 /config.h
parent45eb26992d9fa4efd74b7b283834dcfc212a403f (diff)
parentabf1f11b61b525aa6b95673e50d4be90505b1d67 (diff)
downloadwhois-master.tar.gz
Merge git://github.com/rfc1036/whoisHEADmaster
Diffstat (limited to 'config.h')
-rw-r--r--config.h45
1 files changed, 39 insertions, 6 deletions
diff --git a/config.h b/config.h
index 4492e4b..d26ffb5 100644
--- a/config.h
+++ b/config.h
@@ -13,7 +13,11 @@
/* autoconf in cpp macros */
-#ifdef linux
+#if defined __NetBSD__ || __OpenBSD__
+# include <sys/param.h>
+#endif
+
+#ifdef __GLIBC__
# define ENABLE_NLS
#endif
@@ -36,6 +40,7 @@
#if defined __APPLE__ && defined __MACH__
# define HAVE_GETOPT_LONG
# define HAVE_GETADDRINFO
+# define HAVE_BSDICRYPT
#endif
#if defined __GLIBC__
@@ -48,25 +53,33 @@
# endif
#endif
+#if defined OpenBSD && OpenBSD < 201405
+# define HAVE_BCRYPT_OBSOLETE
+#elif defined OpenBSD || defined __FreeBSD__ || (defined __SVR4 && defined __sun) || defined _OW_SOURCE
+# define HAVE_BCRYPT
+#endif
+
+#if defined OpenBSD || defined __FreeBSD__ || defined __NetBSD__
+# define HAVE_BSDICRYPT
+#endif
+
/* Unknown versions of Solaris */
#if defined __SVR4 && defined __sun
# define HAVE_SHA_CRYPT
+# define HAVE_CRYPT_H
# define HAVE_SOLARIS_CRYPT_GENSALT
+# define CRYPT_GENSALT_IMPLEMENTS_DEFAULT_PREFIX
#endif
/* FIXME: which systems lack this? */
#define HAVE_GETTIMEOFDAY
-/* FIXME: disabled because it does not parse addresses with a netmask length.
- * The code using it needs to be either fixed or removed.
-#define HAVE_INET_PTON
-*/
/*
* Please send patches to correctly ignore old releases which lack a RNG
* and add more systems which have one.
*/
#ifdef RANDOM_DEVICE
-#elif defined __GLIBC__ \
+#elif defined linux \
|| defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__ \
/* AIX >= 5.2? */ \
|| defined _AIX52 \
@@ -81,6 +94,26 @@
# define RANDOM_DEVICE "/dev/urandom"
#endif
+/* use arc4random_buf instead if it is available */
+#if (defined __FreeBSD__ && __FreeBSD__ >= 9) || \
+ (defined __NetBSD__ && __NetBSD_Version__ >= 600000000) || \
+ (defined OpenBSD && OpenBSD >= 200805) || \
+ (defined __APPLE__ && defined __MACH__ && MAC_OS_X_VERSION_MIN_REQUIRED >= 1070)
+# define HAVE_ARC4RANDOM_BUF
+#endif
+
+/* or else getentropy(2) on Linux */
+#if defined __GLIBC__ && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 25
+# define HAVE_GETENTROPY
+#endif
+
+/* some versions of crypt(3) set errno on error */
+#if defined __GLIBC__ || (defined __SVR4 && defined __sun) || defined OpenBSD || AIX
+# define CRYPT_SETS_ERRNO 1
+#else
+# define CRYPT_SETS_ERRNO 0
+#endif
+
#ifdef ENABLE_NLS
# ifndef NLS_CAT_NAME
# define NLS_CAT_NAME "whois"