Author: Kev <klmitch@mit.edu>
[ircu2.10.12-pk.git] / include / sys.h
1 /*
2  * IRC - Internet Relay Chat, include/sys.h
3  * Copyright (C) 1990 University of Oulu, Computing Center
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 1, or (at your option)
8  * any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  *
19  * $Id$
20  */
21 #ifndef INCLUDED_sys_h
22 #define INCLUDED_sys_h
23
24 #if WORDS_BIGENDIAN
25 # define BIT_ZERO_ON_LEFT
26 #else
27 # define BIT_ZERO_ON_RIGHT
28 #endif
29
30 #define HAVE_RELIABLE_SIGNALS
31
32 /*
33  * safety margin so we can always have one spare fd, for motd/authd or
34  * whatever else.  -24 allows "safety" margin of 10 listen ports, 8 servers
35  * and space reserved for logfiles, DNS sockets and identd sockets etc.
36  */
37 #define MAXCLIENTS      (MAXCONNECTIONS-24)
38
39 #ifdef HAVECURSES
40 #define DOCURSES
41 #else
42 #undef DOCURSES
43 #endif
44
45 #ifdef HAVETERMCAP
46 #define DOTERMCAP
47 #else
48 #undef DOTERMCAP
49 #endif
50
51 #ifndef CONFIG_SETUGID
52 #undef IRC_UID
53 #undef IRC_GID
54 #endif
55
56 /* Define FD_SETSIZE to what we want before including sys/types.h on BSD */
57 #if  defined(__FreeBSD__) || defined(__NetBSD__) || defined(__bsdi__)
58 #if ((!defined(USE_POLL)) && (!defined(FD_SETSIZE)))
59 #define FD_SETSIZE ((MAXCONNECTIONS)+4)
60 #endif
61 #endif
62
63 #define LIMIT_FMT "%d"
64
65 #define IRCD_MAX(a, b)  ((a) > (b) ? (a) : (b))
66 #define IRCD_MIN(a, b)  ((a) < (b) ? (a) : (b))
67
68 #ifndef FALSE
69 #define FALSE 0
70 #endif
71 #ifndef TRUE
72 #define TRUE  1
73 #endif
74
75 #endif /* INCLUDED_sys_h */