chiark / gitweb /
merge
[inn-innduct.git] / include / acconfig.h
1 /*  $Id: acconfig.h 6717 2004-05-16 20:48:51Z rra $
2 **
3 **  Here be configuration data used by various InterNetNews programs.  This
4 **  file is used as source for the autoheader script, which from it and
5 **  configure.in generates a config.h.in file that will be used by autoconf
6 **  as the repository of all wisdom.
7 **
8 **  Stuff before TOP and after BOTTOM is copied verbatim to config.h.in;
9 **  the rest of this file is in the desired form for autoconfiscation.
10 **  Only stuff that autoconf 2.13 couldn't figure out for itself or that
11 **  needs a larger comment is included here.
12 */
13
14 #ifndef CONFIG_H
15 #define CONFIG_H 1
16
17 /* Portable defines that don't rely on autoconf results come from here. */
18 #include "inn/defines.h"
19
20 /*
21 **  GENERAL SETTINGS
22 **
23 **  Look over these settings and make sure they're correct for your site.
24 **  These values don't come from configure and therefore may need manual
25 **  editing.  The defaults normally should be fine.
26 **
27 **  For boolean #defines, uncomment and change #undef to #define to enable,
28 **  do the reverse to disable.
29 */
30
31 /* A null-terminated list of uwildmat(3) patterns matching illegal
32    distributions.  inews and nnrpd will reject posts with a distribution
33    matching one of these patterns. */
34 #define BAD_DISTRIBS            "*.*", NULL
35
36 /* Default timeout period for ctlinnd, overridden by the -t flag.  If set to
37    zero, ctlinnd will never time out, but will check every two minutes to
38    see if the server is still running so it won't hang forever on a dead
39    server. */
40 #define CTLINND_TIMEOUT         0
41
42 /* Reject articles posted more than this many seconds in the future. */
43 #define DATE_FUZZ               (24L * 60L * 60L)
44
45 /* innd will flush the history and active file after this many seconds. */
46 #define DEFAULT_TIMEOUT         300
47
48 /* Define if inews should put hostnames into the Path header itself. */
49 #define DO_INEWS_PATH
50
51 /* Define if inews should munge the GECOS entry of the passwd file when
52    attempting to determine a poster's real name.  Use this if your GECOS
53    entries have other stuff after trailing commas or before dashes, things
54    in parentheses that aren't part of the name, etc.  See frontends/inews.c
55    for the full algorithm. */
56 #define DO_MUNGE_GECOS
57
58 /* Define if rnews should try to connect to the local host. */
59 #define DO_RNEWSLOCALCONNECT
60
61 /* Define if rnews should syslog articles rejected as duplicates. */
62 /* #undef DO_RNEWS_LOG_DUPS */
63
64 /* Define if rnews should look in _PATH_RNEWSPROGS for batch unpackers. */
65 #define DO_RNEWSPROGS
66
67 /* Define if rnews should save articles rejected by the server. */
68 /* #undef DO_RNEWS_SAVE_BAD */
69
70 /* Value to pass to dbzincore() inside innd.  Under some bizarre low memory
71    circumstance you may want this not to be 1, but normally you always want
72    to load the full history indexes into innd's memory.  Has no effect if
73    using tagged hash (which is always in core). */
74 #define INND_DBZINCORE          1
75
76 /* A null-terminated list of unknown commands that, when seen by innd,
77    shouldn't be logged to syslog.  Normally innd logs all unknown commands,
78    but sometimes some are so frequent that it's not worth it. */
79 #define INND_QUIET_BADLIST      NULL
80
81 /* innd will throttle itself after this many I/O errors.  The count is reset
82    on a ctlinnd go.  (ENOSPC is special and will always cause an immediate
83    throttle.) */
84 #define IO_ERROR_COUNT          50
85
86 /* Length of listen queue for innd. */
87 #define MAXLISTEN               25
88
89 /* The standard NNTP port. */
90 #define NNTP_PORT               119
91
92 /* What to use for a Path tail for local posts. */
93 #define PATHMASTER              "not-for-mail"
94
95
96 /*
97 **  CONFIGURE RESULTS
98 **
99 **  Things determined automatically by autoconf.  Nothing below this point
100 **  should require manual editing; if anything here is wrong, see if you
101 **  should be passing a flag to configure to set it correctly for your
102 **  system.
103 **
104 **  Be aware that success of some tests will cause other tests to be skipped
105 **  since their results aren't then needed.  For example, if you have
106 **  standard C headers, INN won't bother looking for stdlib.h, and
107 **  HAVE_STDLIB_H will be false whether you have it or not.  This is normal.
108 **
109 **  Fodder for autoheader is provided in sort -df order (alphabetical,
110 **  case-insensitive, ignoring punctuation) to make it easier to check
111 **  whether a given entry is in the file.
112 */
113 @TOP@
114
115 /* Define to a suitable 32-bit type if standard headers don't define.  */
116 #undef int32_t
117
118 /* Define to `long' if <sys/types.h> doesn't define.  */
119 #undef ptrdiff_t
120
121 /* Define to `int' if <signal.h> doesn't define.  */
122 #undef sig_atomic_t
123
124 /* Define to `int' if <sys/socket.h> doesn't define.  */
125 #undef socklen_t
126
127 /* Define to `int' if <sys/types.h> doesn't define.  */
128 #undef ssize_t
129
130 /* Define to a suitable 32-bit type if standard headers don't define.  */
131 #undef uint32_t
132
133 @BOTTOM@
134
135
136 /*
137 **  BUFFER SIZES AND DATA LENGTHS
138 **
139 **  You shouldn't need to change any of the following, and changing some of
140 **  them may cause other things to break.  Some standard buffer sizes and
141 **  lengths of data types for various different things.
142 */
143
144 /* The data type to use for article numbers.  This probably can't be
145    increased without a lot of work due to assumptions about the active file
146    format, etc. */
147 typedef unsigned long           ARTNUM;
148
149 /* Input buffers start at START_BUFF_SIZE.  While reading input, if we have
150    less than LOW_WATER bytes left free in the buffer, use the current
151    buffersize as input to GROW_AMOUNT to determine how much to realloc.
152    Growth must be at least NNTP_STRLEN bytes!  The default settings provide
153    aggressive, exponential buffer growth. */
154 #define START_BUFF_SIZE         (4 * 1024)
155 #define LOW_WATER               (1 * 1024)
156 #define GROW_AMOUNT(x)          ((x) < 128 * 1024 ? (x) : 128 * 1024)
157
158 /* The size of a large buffer.  Free dynamically allocated buffers larger
159    than this when we're done with them. */
160 #define BIG_BUFFER              (2 * START_BUFF_SIZE)
161
162 /* The maximum length of a single header, used as a good guess at a buffer
163    size for some header parsing code.  This is currently also used by innd
164    to determine whether to reject a message for an excessively long header;
165    this behavior should be fixed. */
166 #define MAXHEADERSIZE           1024
167
168 /* Default buffer size for outgoing feeds from innd. */
169 #define SITE_BUFFER_SIZE        (16 * 1024)
170
171 /* The size of a small buffer. */
172 #define SMBUF                   256
173
174 /* Maximum size of a pathname in the spool directory. */
175 #define SPOOLNAMEBUFF           512
176
177
178 /*
179 **  LEGACY
180 **
181 **  Everything below this point is here so that parts of INN that haven't
182 **  been tweaked to use more standard constructs don't break.  Don't count
183 **  on any of this staying in this file.  If you have a chance, consider
184 **  following the comments before each item and fixing it.
185 */
186
187 /* Used to send commands to exploders.  Should be moved into a more specific
188    header file; used by innd/site.c and backends/buffchan.c. */
189 #define EXP_CONTROL             '!'
190
191 /* Only used by innd and cvtbatch, should be moved to a more specific header
192    file. */
193 #define FEED_BYTESIZE           'b'
194 #define FEED_FULLNAME           'f'
195 #define FEED_HASH               'h'
196 #define FEED_HDR_DISTRIB        'D'
197 #define FEED_HDR_NEWSGROUP      'N'
198 #define FEED_MESSAGEID          'm'
199 #define FEED_FNLNAMES           '*'
200 #define FEED_HEADERS            'H'
201 #define FEED_NAME               'n'
202 #define FEED_STOREDGROUP        'G'
203 #define FEED_NEWSGROUP          'g'
204 #define FEED_OVERVIEW           'O'
205 #define FEED_PATH               'P'
206 #define FEED_REPLIC             'R'
207 #define FEED_SITE               's'
208 #define FEED_TIMEEXPIRED        'e'
209 #define FEED_TIMERECEIVED       't'
210 #define FEED_TIMEPOSTED         'p'
211
212 /* Maximum number of flags for a feed in newsfeeds.  Only used in innd,
213    should be moved there (or made dynamic). */
214 #define FEED_MAXFLAGS           20
215
216 /* Maximum length of argv vectors used in innd/site.c.  This should be moved
217    out of here into that file, or even better hard-coded rather than
218    defined; this value isn't affected by user data and the right value can
219    be determined by looking at the code and seeing how big of an argv it
220    will attempt to construct. */
221 #define MAX_BUILTIN_ARGV        20
222
223 /* active file flags.  Should be moved to a more specific header file. */
224 #define NF_FLAG_ALIAS           '='
225 #define NF_FLAG_EXCLUDED        'j'
226 #define NF_FLAG_MODERATED       'm'
227 #define NF_FLAG_OK              'y'
228 #define NF_FLAG_NOLOCAL         'n'
229 #define NF_FLAG_IGNORE          'x'
230
231 /* Used for parsing the Newsgroups header.  Should be rolled into a library
232    for parsing headers, combining all the code that's currently scattered
233    all over INN for doing that. */
234 #define NG_SEPARATOR            ","
235 #define NG_ISSEP(c)             ((c) == ',')
236
237 /* There's no reason to make all of these #defines except possibly for
238    L_CC_CMD and even that's a stretch.  Since we're logging to our own
239    distinguished log facility, provided that we spread things out between a
240    reasonable variety of log levels, the sysadmin shouldn't have to change
241    any of this.  (Some of this is arguably wrong; L_NOTICE should be
242    LOG_NOTICE, for example.) */
243
244 /* Flags to use in opening the logs; some programs add LOG_PID. */
245 #define L_OPENLOG_FLAGS         (LOG_CONS | LOG_NDELAY)
246
247 /* Fatal error, program is about to exit. */
248 #define L_FATAL                 LOG_CRIT
249
250 /* Log an error that might mean one or more articles get lost. */
251 #define L_ERROR                 LOG_ERR
252
253 /* Informational notice, usually not worth caring about. */
254 #define L_NOTICE                LOG_WARNING
255
256 /* A protocol trace. */
257 #define L_TRACE                 LOG_DEBUG
258
259 /* All incoming control commands (ctlinnd, etc). */
260 #define L_CC_CMD                LOG_INFO
261
262 #endif /* !CONFIG_H */