1 #ifndef SLRN_NON_UNIX_CONFIG_H
2 #define SLRN_NON_UNIX_CONFIG_H
3 /*
4  * This file is for NON-Unix systems.
5  * Use config.h (generated by configure) for Unix!!!
6  *
7  * This file is used to indicate capabilities of the C compiler and
8  * operating system.  Additionally, you can set optional features
9  * here that are under autoconf control on Unix.
10  *
11  * See also slrnfeat.h for the rest of slrn features.
12  */
13 
14 /* hostname of a default NNTP server to use */
15 /* #define NNTPSERVER_NAME	"my.server.name" */
16 
17 /* file that contains the hostname of a default NNTP server */
18 /* #define NNTPSERVER_FILE	"/usr/local/lib/news/nntp_server" */
19 
20 /* End of features section. See slrnfeat.h for the rest. */
21 
22 /* Does your compiler support vsnprintf()? */
23 #if defined(__MINGW32__)
24 # define HAVE_VSNPRINTF 1
25 #endif
26 
27 /* SLTCP_HAS_SSL_SUPPORT gets turned on whenever we use SSL
28  * SLTCP_HAS_GNUTLS_SUPPORT gets turned on when we use GNU TLS for it. */
29 #define SLRN_HAS_SSL_SUPPORT	0
30 #define SLRN_HAS_GNUTLS_SUPPORT	0
31 
32 #define SLTCP_HAS_SSL_SUPPORT (SLRN_HAS_SSL_SUPPORT || SLRN_HAS_GNUTLS_SUPPORT)
33 #define SLTCP_HAS_GNUTLS_SUPPORT SLRN_HAS_GNUTLS_SUPPORT
34 #define SLTCP_HAS_NSS_COMPAT	0
35 
36 #if defined (__USE_SVID) || defined (__USE_XOPEN) || (defined (__MSVCRT__) && !defined (_NO_OLDNAMES))
37 # define HAVE_TIMEZONE 1
38 #endif
39 
40 #ifdef __USE_BSD
41 # define HAVE_TM_GMTOFF 1
42 #endif
43 
44 #ifdef VMS
45 # ifndef MAIL_PROTOCOL
46 #   if defined(UCX) || defined(MULTINET)
47 #     define MAIL_PROTOCOL "SMTP%"
48 #   else
49 #     define MAIL_PROTOCOL "IN%"
50 #   endif
51 # endif
52 #endif
53 
54 #ifdef __GO32__
55 # ifdef REAL_UNIX_SYSTEM
56 #  undef REAL_UNIX_SYSTEM
57 # endif
58 # ifndef __DJGPP__
59 #  define __DJGPP__ 1
60 # endif
61 #endif
62 
63 #if defined(__MSDOS__) || defined(__DOS__)
64 # ifndef __MSDOS__
65 #  define __MSDOS__
66 # endif
67 # ifndef IBMPC_SYSTEM
68 #  define IBMPC_SYSTEM
69 # endif
70 #endif
71 
72 #if defined(OS2) || defined(__OS2__)
73 # ifndef IBMPC_SYSTEM
74 #   define IBMPC_SYSTEM
75 # endif
76 # ifndef __os2__
77 #  define __os2__
78 # endif
79 #endif
80 
81 #if defined(__MINGW32__) || defined(__WATCOMC__)
82 # ifndef __WIN32__
83 #  define __WIN32__
84 # endif
85 #endif
86 
87 #if defined(WIN32) || defined(__WIN32__)
88 # ifndef IBMPC_SYSTEM
89 #  define IBMPC_SYSTEM
90 # endif
91 # ifndef __WIN32__
92 #  define __WIN32__
93 # endif
94 #endif
95 
96 #if defined(__MSDOS__) && !defined(__GO32__) && !defined(DOS386) && !defined(__WIN32__)
97 # ifndef __MSDOS_16BIT__
98 #  define __MSDOS_16BIT__	1
99 # endif
100 #endif
101 
102 #if defined(__NT__)
103 # ifndef IBMPC_SYSTEM
104 #  define IBMPC_SYSTEM
105 # endif
106 #endif
107 
108 #if defined(IBMPC_SYSTEM) || defined (__DECC) || defined(VAXC)
109 # define HAVE_STDLIB_H 1
110 #else
111 # define HAVE_MALLOC_H 1
112 #endif
113 
114 #if defined (__os2__)
115 # define HAVE_UNISTD_H 1
116 # define HAVE_MEMORY_H 1
117 # define HAVE_SYS_SOCKET_H 1
118 # define HAVE_NETINET_IN_H 1
119 # define HAVE_ARPA_INET_H 1
120 # define HAVE_DIRENT_H 1
121 # define HAVE_FCNTL_H 1
122 #endif
123 
124 #if defined(__NT__) || defined(__WIN32__)
125 # define HAVE_UNISTD_H 1
126 # define HAVE_MEMORY_H 1
127 # define HAVE_FCNTL_H 1
128 # define HAVE_LOCALE_H 1
129 # define HAVE_SETLOCALE 1
130 # if defined(__MINGW32__)
131 #  define HAVE_DIRENT_H 1
132 # else
133 #  define HAVE_DIRECT_H 1
134 # endif
135 # define popen _popen
136 # define pclose _pclose
137 #endif
138 
139 #if defined(__MINGW32__)
140 # define HAVE_SYS_TIME_H 1
141 #endif
142 
143 #if defined(__WIN32__)
144 # if !defined(__MINGW32__)
145 #  define HAVE_WINSPOOL_H
146 # endif
147 #endif
148 
149 #ifdef VMS
150 # if __VMS_VER >= 60200000
151 #  define HAVE_UNISTD_H
152 # endif
153 # if __VMS_VER >= 70000000
154 #  define HAVE_GETTIMEOFDAY 1
155 # endif
156 #endif
157 
158 #ifdef __MINGW32__
159 # define HAVE_GETTIMEOFDAY 1
160 #endif
161 
162 /* Does VMS have these?  Do *all* VMS version have them? */
163 #ifndef VMS
164 # define HAVE_ISALPHA 1
165 # define HAVE_ISSPACE 1
166 # define HAVE_ISDIGIT 1
167 # define HAVE_ISALNUM 1
168 # define HAVE_ISPUNCT 1
169 #endif
170 
171 #if defined(VMS) || defined(__os2__)
172 # define USE_NOTEPAD_PRINT_CODE
173 #endif
174 
175 #ifdef __WIN32__
176 /* # define USE_NOTEPAD_PRINT_CODE */
177 #endif
178 
179 /*
180  * Basic C library functions.
181  */
182 
183 #define VA_COPY va_copy
184 
185 #if defined(__os2__) || defined(__NT__)
186 # define HAVE_PUTENV 1
187 #endif
188 
189 #define HAVE_GETCWD 1
190 #define HAVE_MEMSET 1
191 #define HAVE_MEMCPY 1
192 #define HAVE_MEMCHR 1
193 
194 /* undefine if your sprintf does not return an int */
195 #define HAVE_ANSI_SPRINTF 1
196 
197 #define SLRN_SERVER_ID_NNTP 1
198 #define SLRN_SERVER_ID_SPOOL 2
199 
200 #define SLRN_POST_ID_NNTP 1
201 #define SLRN_POST_ID_INEWS 2
202 #define SLRN_POST_ID_PULL 3
203 
204 #if defined(IBMPC_SYSTEM)
205 # define SLRN_PATH_SLASH_CHAR	'\\'
206 #endif
207 
208 #ifndef SLRN_PATH_SLASH_CHAR
209 /* I have no idea whether or not this will work on VMS.
210  * Using ']' is probably better.
211  */
212 # define SLRN_PATH_SLASH_CHAR	'/'
213 #endif
214 
215 #if defined(__os2__)
216 /* Uncomment for no FAT code */
217 # define SLRN_USE_OS2_FAT
218 #endif
219 
220 /* gettext is currently only supported on unix */
221 #define _(a) (a)
222 #define N_(a) a
223 
224 #define SIZEOF_SHORT		2
225 #define SIZEOF_INT		4
226 #define SIZEOF_LONG		4
227 #define SIZEOF_FLOAT		4
228 #define SIZEOF_DOUBLE		8
229 #define SIZEOF_LONG_LONG	8
230 
231 /* If your system has long long integers and you want to use 64 bit article
232  * numbers, then be sure to define HAVE_LONG_LONG.
233  */
234 #if defined(__MINGW32__)
235 # define HAVE_LONG_LONG	1
236 # define HAVE_STRTOLL	1
237 # define HAVE_ATOLL	1
238 #else
239 # undef HAVE_LONG_LONG
240 # undef HAVE_ATOLL
241 # undef HAVE_STRTOLL
242 #endif
243 
244 #if defined(HAVE_LONG_LONG) && (SIZEOF_LONG < SIZEOF_LONG_LONG)
245 typedef long long NNTP_Artnum_Type;
246 # ifdef IBMPC_SYSTEM
247 #  define NNTP_FMT_ARTNUM "%I64d"
248 #  define NNTP_FMT_ARTNUM_2 "%I64d %I64d"
249 #  define NNTP_FMT_ARTNUM_3 "%I64d %I64d %I64d"
250 #  define NNTP_FMT_ARTRANGE "%I64d-%I64d"
251 # else
252 #  define NNTP_FMT_ARTNUM "%lld"
253 #  define NNTP_FMT_ARTNUM_2 "%lld %lld"
254 #  define NNTP_FMT_ARTNUM_3 "%lld %lld %lld"
255 #  define NNTP_FMT_ARTRANGE "%lld-%lld"
256 # endif
257 # ifdef HAVE_ATOLL
258 #  define NNTP_STR_TO_ARTNUM(x) atoll(x)
259 # else
260 #  define NNTP_STR_TO_ARTNUM(x) strtoll((x),NULL,10)
261 # endif
262 # define NNTP_ARTNUM_TYPE_MAX 9223372036854775807LL
263 #else
264 typedef long NNTP_Artnum_Type;
265 # define NNTP_FMT_ARTNUM "%ld"
266 # define NNTP_FMT_ARTNUM_2 "%ld %ld"
267 # define NNTP_FMT_ARTNUM_3 "%ld %ld %ld"
268 # define NNTP_FMT_ARTRANGE "%ld-%ld"
269 # define NNTP_STR_TO_ARTNUM atol
270 # define NNTP_ARTNUM_TYPE_MAX LONG_MAX
271 #endif
272 
273 #endif				       /* SLRN_NON_UNIX_CONFIG_H */
274