]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/baconfig.h
mtx-changer update, message fixes
[bacula/bacula] / bacula / src / baconfig.h
1 /*
2  * General header file configurations that apply to
3  * all daemons.  System dependent stuff goes here.
4  *
5  *   Version $Id$
6  */
7 /*
8    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
9
10    This program is free software; you can redistribute it and/or
11    modify it under the terms of the GNU General Public License as
12    published by the Free Software Foundation; either version 2 of
13    the License, or (at your option) any later version.
14
15    This program is distributed in the hope that it will be useful,
16    but WITHOUT ANY WARRANTY; without even the implied warranty of
17    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18    General Public License for more details.
19
20    You should have received a copy of the GNU General Public
21    License along with this program; if not, write to the Free
22    Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
23    MA 02111-1307, USA.
24
25  */
26
27
28 #ifndef _BACONFIG_H
29 #define _BACONFIG_H 1
30
31 /* Bacula common configuration defines */
32
33 #define TRUE  1
34 #define FALSE 0
35
36 #ifndef ETIME
37 #define ETIME ETIMEDOUT
38 #endif
39
40 #ifdef PROTOTYPES
41 # define __PROTO(p)     p
42 #else
43 # define __PROTO(p)     ()
44 #endif
45
46 #ifdef DEBUG
47 #define ASSERT(x) if (!(x)) { \
48    char *jcr = NULL; \
49    Emsg1(M_ERROR, 0, "Failed ASSERT: %s\n", #x); \
50    jcr[0] = 0; }
51 #else
52 #define ASSERT(x)
53 #endif
54
55 /* Allow printing of NULL pointers */
56 #define NPRT(x) (x)?(x):"*None*" 
57
58 #ifdef ENABLE_NLS
59 #include <libintl.h>
60 #define _(s) gettext((s))
61 #define N_(s) (s)
62 #else
63 #define _(s) (s)
64 #define N_(s) (s)
65 #define textdomain(x)
66 #endif
67
68
69 /* This should go away! ****FIXME***** */
70 #define MAXSTRING 500
71
72 /* Maximum length to edit time/date */
73 #define MAX_TIME_LENGTH 30
74
75 /* Maximum Name length including EOS */
76 #define MAX_NAME_LENGTH 128
77
78 /* All tape operations MUST be a multiple of this */
79 #define TAPE_BSIZE 1024
80 #if !defined(DEV_BSIZE) && defined(BSIZE)
81 #define DEV_BSIZE BSIZE
82 #endif
83
84 #ifndef DEV_BSIZE
85 #define DEV_BSIZE 512
86 #endif
87
88 /* Maximum number of bytes that you can push into a
89  * socket.
90  */
91 #define MAX_NETWORK_BUFFER_SIZE (32 * 1024)
92
93 /* Stream definitions.  Once defined these must NEVER
94  *   change as they go on the storage media.
95  */
96 #define STREAM_UNIX_ATTRIBUTES   1    /* Generic Unix attributes */
97 #define STREAM_FILE_DATA         2    /* Standard uncompressed data */
98 #define STREAM_MD5_SIGNATURE     3    /* MD5 signature for the file */
99 #define STREAM_GZIP_DATA         4    /* GZip compressed file data */
100 #define STREAM_WIN32_ATTRIBUTES  5    /* Windows attributes (superset of Unix) */
101 #define STREAM_SPARSE_DATA       6    /* Sparse data stream */
102 #define STREAM_SPARSE_GZIP_DATA  7
103 #define STREAM_PROGRAM_NAMES     8    /* program names for program data */
104 #define STREAM_PROGRAM_DATA      9    /* Data needing program */
105
106 /* Size of File Address stored in STREAM_SPARSE_DATA. Do NOT change! */
107 #define SPARSE_FADDR_SIZE (sizeof(uint64_t))
108
109
110 /* This is for dumb compilers/libraries like Solaris. Linux GCC
111  * does it correctly, so it might be worthwhile
112  * to remove the isascii(c) with ifdefs on such
113  * "smart" systems.
114  */
115 #define B_ISSPACE(c) (isascii((int)(c)) && isspace((int)(c)))
116 #define B_ISALPHA(c) (isascii((int)(c)) && isalpha((int)(c)))
117 #define B_ISUPPER(c) (isascii((int)(c)) && isupper((int)(c)))
118 #define B_ISDIGIT(c) (isascii((int)(c)) && isdigit((int)(c)))
119
120
121 typedef void (HANDLER)();
122 typedef int (INTHANDLER)();
123
124 #ifdef SETPGRP_VOID
125 # define SETPGRP_ARGS(x, y) /* No arguments */
126 #else
127 # define SETPGRP_ARGS(x, y) (x, y)
128 #endif
129
130 #ifndef S_ISLNK
131 #define S_ISLNK(m) (((m) & S_IFM) == S_IFLNK)
132 #endif
133
134 /* Added by KES to deal with Win32 systems */
135 #ifndef S_ISWIN32
136 #define S_ISWIN32 020000
137 #endif
138
139 #ifndef INADDR_NONE
140 #define INADDR_NONE ((unsigned long) -1)
141 #endif
142
143 #ifdef TIME_WITH_SYS_TIME
144 # include <sys/time.h>
145 # include <time.h>
146 #else
147 # ifdef HAVE_SYS_TIME_H
148 #  include <sys/time.h>
149 # else
150 #  include <time.h>
151 # endif
152 #endif
153
154 #ifndef O_BINARY
155 #define O_BINARY 0
156 #endif
157
158 #ifndef MODE_RW
159 #define MODE_RW 0666
160 #endif
161
162 #ifdef DEBUG_MUTEX
163 extern void _p(char *file, int line, pthread_mutex_t *m);
164 extern void _v(char *file, int line, pthread_mutex_t *m);
165
166 #define P(x) _p(__FILE__, __LINE__, &(x))
167 #define V(x) _v(__FILE__, __LINE__, &(x))
168
169 #else
170
171 /* These probably should be subroutines */
172 #define P(x) \
173    do { int errstat; if ((errstat=pthread_mutex_lock(&(x)))) \
174       e_msg(__FILE__, __LINE__, M_ABORT, 0, "Mutex lock failure. ERR=%s\n",\
175            strerror(errstat)); \
176    } while(0)
177
178 #define V(x) \
179    do { int errstat; if ((errstat=pthread_mutex_unlock(&(x)))) \
180          e_msg(__FILE__, __LINE__, M_ABORT, 0, "Mutex unlock failure. ERR=%s\n",\
181            strerror(errstat)); \
182    } while(0)
183
184 #endif /* DEBUG_MUTEX */
185
186 /* These probably should be subroutines */
187 #define Pw(x) \
188    do { int errstat; if ((errstat=rwl_writelock(&(x)))) \
189       e_msg(__FILE__, __LINE__, M_ABORT, 0, "Write lock lock failure. ERR=%s\n",\
190            strerror(errstat)); \
191    } while(0)
192
193 #define Vw(x) \
194    do { int errstat; if ((errstat=rwl_writeunlock(&(x)))) \
195          e_msg(__FILE__, __LINE__, M_ABORT, 0, "Write lock unlock failure. ERR=%s\n",\
196            strerror(errstat)); \
197    } while(0)
198
199
200 /*
201  * The digit following Dmsg and Emsg indicates the number of substitutions in
202  * the message string. We need to do this kludge because non-GNU compilers
203  * do not handle varargs #defines.
204  */
205 /* Debug Messages that are printed */
206 #ifdef DEBUG
207 #define Dmsg0(lvl, msg)             d_msg(__FILE__, __LINE__, lvl, msg)
208 #define Dmsg1(lvl, msg, a1)         d_msg(__FILE__, __LINE__, lvl, msg, a1)
209 #define Dmsg2(lvl, msg, a1, a2)     d_msg(__FILE__, __LINE__, lvl, msg, a1, a2)
210 #define Dmsg3(lvl, msg, a1, a2, a3) d_msg(__FILE__, __LINE__, lvl, msg, a1, a2, a3)
211 #define Dmsg4(lvl, msg, arg1, arg2, arg3, arg4) d_msg(__FILE__, __LINE__, lvl, msg, arg1, arg2, arg3, arg4)
212 #define Dmsg5(lvl, msg, a1, a2, a3, a4, a5) d_msg(__FILE__, __LINE__, lvl, msg, a1, a2, a3, a4, a5)
213 #define Dmsg6(lvl, msg, a1, a2, a3, a4, a5, a6) d_msg(__FILE__, __LINE__, lvl, msg, a1, a2, a3, a4, a5, a6)
214 #define Dmsg7(lvl, msg, a1, a2, a3, a4, a5, a6, a7) d_msg(__FILE__, __LINE__, lvl, msg, a1, a2, a3, a4, a5, a6, a7)
215 #define Dmsg8(lvl, msg, a1, a2, a3, a4, a5, a6, a7, a8) d_msg(__FILE__, __LINE__, lvl, msg, a1, a2, a3, a4, a5, a6, a7, a8)
216 #define Dmsg9(lvl,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9) d_msg(__FILE__,__LINE__,lvl,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9)
217 #define Dmsg10(lvl,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) d_msg(__FILE__,__LINE__,lvl,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)
218 #define Dmsg11(lvl,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11) d_msg(__FILE__,__LINE__,lvl,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11)
219 #define Dmsg12(lvl,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12) d_msg(__FILE__,__LINE__,lvl,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12)
220 #define Dmsg13(lvl,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13) d_msg(__FILE__,__LINE__,lvl,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13)
221 #else
222 #define Dmsg0(lvl, msg)
223 #define Dmsg1(lvl, msg, a1)
224 #define Dmsg2(lvl, msg, a1, a2)
225 #define Dmsg3(lvl, msg, a1, a2, a3)
226 #define Dmsg4(lvl, msg, arg1, arg2, arg3, arg4)
227 #define Dmsg5(lvl, msg, a1, a2, a3, a4, a5)
228 #define Dmsg6(lvl, msg, a1, a2, a3, a4, a5, a6)
229 #define Dmsg7(lvl, msg, a1, a2, a3, a4, a5, a6, a7)
230 #define Dmsg8(lvl, msg, a1, a2, a3, a4, a5, a6, a7, a8)
231 #define Dmsg11(lvl,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11)
232 #define Dmsg12(lvl,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12)
233 #define Dmsg13(lvl,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13)
234 #endif /* DEBUG */
235
236 #ifdef TRACE_FILE
237 #define Tmsg0(lvl, msg)             t_msg(__FILE__, __LINE__, lvl, msg)
238 #define Tmsg1(lvl, msg, a1)         t_msg(__FILE__, __LINE__, lvl, msg, a1)
239 #define Tmsg2(lvl, msg, a1, a2)     t_msg(__FILE__, __LINE__, lvl, msg, a1, a2)
240 #define Tmsg3(lvl, msg, a1, a2, a3) t_msg(__FILE__, __LINE__, lvl, msg, a1, a2, a3)
241 #define Tmsg4(lvl, msg, arg1, arg2, arg3, arg4) t_msg(__FILE__, __LINE__, lvl, msg, arg1, arg2, arg3, arg4)
242 #define Tmsg5(lvl, msg, a1, a2, a3, a4, a5) t_msg(__FILE__, __LINE__, lvl, msg, a1, a2, a3, a4, a5)
243 #define Tmsg6(lvl, msg, a1, a2, a3, a4, a5, a6) t_msg(__FILE__, __LINE__, lvl, msg, a1, a2, a3, a4, a5, a6)
244 #define Tmsg7(lvl, msg, a1, a2, a3, a4, a5, a6, a7) t_msg(__FILE__, __LINE__, lvl, msg, a1, a2, a3, a4, a5, a6, a7)
245 #define Tmsg8(lvl, msg, a1, a2, a3, a4, a5, a6, a7, a8) t_msg(__FILE__, __LINE__, lvl, msg, a1, a2, a3, a4, a5, a6, a7, a8)
246 #define Tmsg9(lvl,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9) t_msg(__FILE__,__LINE__,lvl,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9)
247 #define Tmsg10(lvl,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) t_msg(__FILE__,__LINE__,lvl,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)
248 #define Tmsg11(lvl,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11) t_msg(__FILE__,__LINE__,lvl,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11)
249 #define Tmsg12(lvl,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12) t_msg(__FILE__,__LINE__,lvl,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12)
250 #define Tmsg13(lvl,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13) t_msg(__FILE__,__LINE__,lvl,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13)
251 #else
252 #define Tmsg0(lvl, msg)
253 #define Tmsg1(lvl, msg, a1)
254 #define Tmsg2(lvl, msg, a1, a2)
255 #define Tmsg3(lvl, msg, a1, a2, a3)
256 #define Tmsg4(lvl, msg, arg1, arg2, arg3, arg4)
257 #define Tmsg5(lvl, msg, a1, a2, a3, a4, a5)
258 #define Tmsg6(lvl, msg, a1, a2, a3, a4, a5, a6)
259 #define Tmsg7(lvl, msg, a1, a2, a3, a4, a5, a6, a7)
260 #define Tmsg8(lvl, msg, a1, a2, a3, a4, a5, a6, a7, a8)
261 #define Tmsg11(lvl,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11)
262 #define Tmsg12(lvl,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12)
263 #define Tmsg13(lvl,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13)
264 #endif /* TRACE_FILE */
265
266
267
268 /* Messages that are printed (uses d_msg) */
269 #define Pmsg0(lvl, msg)             d_msg(__FILE__, __LINE__, lvl, msg)
270 #define Pmsg1(lvl, msg, a1)         d_msg(__FILE__, __LINE__, lvl, msg, a1)
271 #define Pmsg2(lvl, msg, a1, a2)     d_msg(__FILE__, __LINE__, lvl, msg, a1, a2)
272 #define Pmsg3(lvl, msg, a1, a2, a3) d_msg(__FILE__, __LINE__, lvl, msg, a1, a2, a3)
273 #define Pmsg4(lvl, msg, arg1, arg2, arg3, arg4) d_msg(__FILE__, __LINE__, lvl, msg, arg1, arg2, arg3, arg4)
274 #define Pmsg5(lvl, msg, a1, a2, a3, a4, a5) d_msg(__FILE__, __LINE__, lvl, msg, a1, a2, a3, a4, a5)
275 #define Pmsg6(lvl, msg, a1, a2, a3, a4, a5, a6) d_msg(__FILE__, __LINE__, lvl, msg, a1, a2, a3, a4, a5, a6)
276 #define Pmsg7(lvl, msg, a1, a2, a3, a4, a5, a6, a7) d_msg(__FILE__, __LINE__, lvl, msg, a1, a2, a3, a4, a5, a6, a7)
277 #define Pmsg8(lvl, msg, a1, a2, a3, a4, a5, a6, a7, a8) d_msg(__FILE__, __LINE__, lvl, msg, a1, a2, a3, a4, a5, a6, a7, a8)
278 #define Pmsg9(lvl,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9) d_msg(__FILE__,__LINE__,lvl,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9)
279 #define Pmsg10(lvl,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) d_msg(__FILE__,__LINE__,lvl,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)
280 #define Pmsg11(lvl,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11) d_msg(__FILE__,__LINE__,lvl,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11)
281 #define Pmsg12(lvl,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12) d_msg(__FILE__,__LINE__,lvl,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12)
282 #define Pmsg13(lvl,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13) d_msg(__FILE__,__LINE__,lvl,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13)
283 #define Pmsg14(lvl,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14) d_msg(__FILE__,__LINE__,lvl,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14)
284
285        
286 /* Daemon Error Messages that are delivered according to the message resource */
287 #define Emsg0(typ, lvl, msg)             e_msg(__FILE__, __LINE__, typ, lvl, msg)
288 #define Emsg1(typ, lvl, msg, a1)         e_msg(__FILE__, __LINE__, typ, lvl, msg, a1)
289 #define Emsg2(typ, lvl, msg, a1, a2)     e_msg(__FILE__, __LINE__, typ, lvl, msg, a1, a2)
290 #define Emsg3(typ, lvl, msg, a1, a2, a3) e_msg(__FILE__, __LINE__, typ, lvl, msg, a1, a2, a3)
291 #define Emsg4(typ, lvl, msg, a1, a2, a3, a4) e_msg(__FILE__, __LINE__, typ, lvl, msg, a1, a2, a3, a4)
292 #define Emsg5(typ, lvl, msg, a1, a2, a3, a4, a5) e_msg(__FILE__, __LINE__, typ, lvl, msg, a1, a2, a3, a4, a5)
293 #define Emsg6(typ, lvl, msg, a1, a2, a3, a4, a5, a6) e_msg(__FILE__, __LINE__, typ, lvl, msg, a1, a2, a3, a4, a5, a6)
294
295 /* Job Error Messages that are delivered according to the message resource */
296 #define Jmsg0(jcr, typ, lvl, msg)             j_msg(__FILE__, __LINE__, jcr, typ, lvl, msg)
297 #define Jmsg1(jcr, typ, lvl, msg, a1)         j_msg(__FILE__, __LINE__, jcr, typ, lvl, msg, a1)
298 #define Jmsg2(jcr, typ, lvl, msg, a1, a2)     j_msg(__FILE__, __LINE__, jcr, typ, lvl, msg, a1, a2)
299 #define Jmsg3(jcr, typ, lvl, msg, a1, a2, a3) j_msg(__FILE__, __LINE__, jcr, typ, lvl, msg, a1, a2, a3)
300 #define Jmsg4(jcr, typ, lvl, msg, a1, a2, a3, a4) j_msg(__FILE__, __LINE__, jcr, typ, lvl, msg, a1, a2, a3, a4)
301 #define Jmsg5(jcr, typ, lvl, msg, a1, a2, a3, a4, a5) j_msg(__FILE__, __LINE__, jcr, typ, lvl, msg, a1, a2, a3, a4, a5)
302 #define Jmsg6(jcr, typ, lvl, msg, a1, a2, a3, a4, a5, a6) j_msg(__FILE__, __LINE__, jcr, typ, lvl, msg, a1, a2, a3, a4, a5, a6)
303
304
305 /* Memory Messages that are edited into a Pool Memory buffer */
306 #define Mmsg0(buf, msg)             m_msg(__FILE__, __LINE__, buf, msg)
307 #define Mmsg1(buf, msg, a1)         m_msg(__FILE__, __LINE__, buf, msg, a1)
308 #define Mmsg2(buf, msg, a1, a2)     m_msg(__FILE__, __LINE__, buf, msg, a1, a2)
309 #define Mmsg3(buf, msg, a1, a2, a3) m_msg(__FILE__, __LINE__, buf, msg, a1, a2, a3)
310 #define Mmsg4(buf, msg, a1, a2, a3, a4) m_msg(__FILE__, __LINE__, buf, msg, a1, a2, a3, a4)
311 #define Mmsg5(buf, msg, a1, a2, a3, a4, a5) m_msg(__FILE__, __LINE__, buf, msg, a1, a2, a3, a4, a5)
312 #define Mmsg6(buf, msg, a1, a2, a3, a4, a5, a6) m_msg(__FILE__, __LINE__, buf, msg, a1, a2, a3, a4, a5, a6)
313 #define Mmsg7(buf, msg, a1, a2, a3, a4, a5, a6, a7) m_msg(__FILE__, __LINE__, buf, msg, a1, a2, a3, a4, a5, a6)
314 #define Mmsg8(buf,msg,a1,a2,a3,a4,a5,a6,a7,a8) m_msg(__FILE__,__LINE__,buf,msg,a1,a2,a3,a4,a5,a6)
315 #define Mmsg11(buf,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11) m_msg(__FILE__,__LINE__,buf,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11)
316 #define Mmsg15(buf,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15) m_msg(__FILE__,__LINE__,buf,msg,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15)
317
318 /* Edit message into Pool Memory buffer -- no __FILE__ and __LINE__ */
319 int  Mmsg(char **msgbuf, char *fmt,...);
320
321
322 void d_msg(char *file, int line, int level, char *fmt,...);
323 void e_msg(char *file, int line, int type, int level, char *fmt,...);
324 void j_msg(char *file, int line, void *vjcr, int type, int level, char *fmt,...);
325 int  m_msg(char *file, int line, char **msgbuf, char *fmt,...);
326
327
328 /* Use our strdup with smartalloc */
329 #undef strdup
330 #define strdup(buf) bad_call_on_strdup_use_bstrdup(buf)
331
332 #ifdef DEBUG
333 #define bstrdup(str) strcpy((char *) b_malloc(__FILE__,__LINE__,strlen((str))+1),(str))
334 #else
335 #define bstrdup(str) strcpy((char *) bmalloc(strlen((str))+1),(str))
336 #endif
337
338 #ifdef DEBUG
339 #define bmalloc(size) b_malloc(__FILE__, __LINE__, (size))
340 #endif
341
342 #ifdef __alpha__
343 #define OSF 1
344 #endif
345
346 #ifdef HAVE_SUN_OS
347    /* 
348     * On Solaris 2.5, threads are not timesliced by default, so we need to
349     * explictly increase the conncurrency level.
350     */
351 #include <thread.h>
352 #define set_thread_concurrency(x)  thr_setconcurrency(x)
353 extern int thr_setconcurrency(int);
354 #define SunOS 1
355
356 #else
357
358 /* Not needed on most systems */
359 #define set_thread_concurrency(x)
360
361 #endif
362
363 #ifdef HAVE_IRIX_OS
364 #define socklen_t int
365 #endif
366
367 #ifdef HAVE_CYGWIN
368 /* They don't really have it */
369 #undef HAVE_GETDOMAINNAME
370 #endif
371  
372
373 #define ALIGN_SIZE (sizeof(double))
374 #define BALIGN(x) (((x) + ALIGN_SIZE - 1) & ~(ALIGN_SIZE -1))
375
376
377 /* Added by KES to deal with Win32 systems */
378 #ifndef S_ISWIN32
379 #define S_ISWIN32 020000
380 #endif
381
382 /* Replace codes needed in both file routines and non-file routines */
383 /* Job replace codes -- in "replace" */
384 #define REPLACE_ALWAYS   'a'
385 #define REPLACE_IFNEWER  'w'
386 #define REPLACE_NEVER    'n'
387 #define REPLACE_IFOLDER  'o'
388
389 #endif /* _BACONFIG_H */