1 /* Configurable features */
2 
3 /* Always hide legal disclaimers */
4 #undef ALWAYS_HIDE_DISCL
5 
6 /* Default server */
7 #define DEFAULTSERVER   "whois.arin.net"
8 
9 /* Configuration file */
10 #define CONFIG_FILE "/usr/local/etc/mwhois.conf"
11 
12 
13 /* autoconf in cpp macros */
14 #if defined __NetBSD__ || __OpenBSD__
15 # include <sys/param.h>
16 #endif
17 
18 #ifdef __FreeBSD__
19 /* which versions? */
20 # define HAVE_GETOPT_LONG
21 # define HAVE_GETADDRINFO
22 # ifndef LOCALEDIR
23 #  define LOCALEDIR "/usr/local/share/locale"
24 # endif
25 #endif
26 
27 /* needs unistd.h */
28 #if defined _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 200112L
29 # define HAVE_GETADDRINFO
30 # define HAVE_REGEXEC
31 #endif
32 
33 #if defined __APPLE__ && defined __MACH__
34 # define HAVE_GETOPT_LONG
35 # define HAVE_GETADDRINFO
36 # define HAVE_BSDICRYPT
37 #endif
38 
39 #if defined __GLIBC__
40 # define HAVE_GETOPT_LONG
41 # if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
42 #  define HAVE_GETADDRINFO
43 # endif
44 # if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 7
45 #  define HAVE_SHA_CRYPT
46 # endif
47 #endif
48 
49 #if defined OpenBSD && OpenBSD < 201405
50 # define HAVE_BCRYPT_OBSOLETE
51 #elif defined OpenBSD || defined __FreeBSD__ || (defined __SVR4 && defined __sun) || defined _OW_SOURCE
52 # define HAVE_BCRYPT
53 #endif
54 
55 #if defined OpenBSD || defined __FreeBSD__ || defined __NetBSD__
56 # define HAVE_BSDICRYPT
57 #endif
58 
59 /* Unknown versions of Solaris */
60 #if defined __SVR4 && defined __sun
61 # define HAVE_SHA_CRYPT
62 # define HAVE_CRYPT_H
63 # define HAVE_SOLARIS_CRYPT_GENSALT
64 # define CRYPT_GENSALT_IMPLEMENTS_DEFAULT_PREFIX
65 #endif
66 
67 /* FIXME: which systems lack this? */
68 #define HAVE_GETTIMEOFDAY
69 
70 /*
71  * Please send patches to correctly ignore old releases which lack a RNG
72  * and add more systems which have one.
73  */
74 #ifdef RANDOM_DEVICE
75 #elif defined linux \
76 	|| defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__ \
77 	/* AIX >= 5.2? */ \
78 	|| defined _AIX52 \
79 	/* HP-UX >= B.11.11.09? */ \
80 	|| defined  __hpux \
81 	/* OS X: */ \
82 	|| (defined __APPLE__ && defined __MACH__) \
83 	/* Solaris >= 9 (this is >= 7): */ \
84 	|| (defined __SVR4 && defined __sun && defined SUSv2) \
85 	/* Tru64 UNIX >= 5.1B? */ \
86 	|| defined __osf
87 # define RANDOM_DEVICE "/dev/urandom"
88 #endif
89 
90 /* use arc4random_buf instead if it is available */
91 #if (defined __FreeBSD__ && __FreeBSD__ >= 9) || \
92     (defined __NetBSD__  && __NetBSD_Version__ >= 600000000) || \
93     (defined OpenBSD && OpenBSD >= 200805) || \
94     (defined __APPLE__ && defined __MACH__ && MAC_OS_X_VERSION_MIN_REQUIRED >= 1070)
95 # define HAVE_ARC4RANDOM_BUF
96 #endif
97 
98 /* or else getentropy(2) on Linux */
99 #if defined __GLIBC__ && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 25
100 # define HAVE_GETENTROPY
101 #endif
102 
103 /* some versions of crypt(3) set errno on error */
104 #if defined __GLIBC__ || (defined __SVR4 && defined __sun) || defined OpenBSD || AIX
105 # define CRYPT_SETS_ERRNO 1
106 #else
107 # define CRYPT_SETS_ERRNO 0
108 #endif
109 
110 #ifdef ENABLE_NLS
111 # ifndef NLS_CAT_NAME
112 #  define NLS_CAT_NAME   "%%MWHOIS%%"
113 # endif
114 # ifndef LOCALEDIR
115 #  define LOCALEDIR     "/usr/share/locale"
116 # endif
117 #endif
118 
119