2 * IRC - Internet Relay Chat, include/sys.h
3 * Copyright (C) 1990 University of Oulu, Computing Center
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)
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.
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.
21 #ifndef INCLUDED_sys_h
22 #define INCLUDED_sys_h
23 #ifndef INCLUDED_config_h
28 # define BIT_ZERO_ON_LEFT
30 # define BIT_ZERO_ON_RIGHT
33 #define HAVE_RELIABLE_SIGNALS
36 * safety margin so we can always have one spare fd, for motd/authd or
37 * whatever else. -24 allows "safety" margin of 10 listen ports, 8 servers
38 * and space reserved for logfiles, DNS sockets and identd sockets etc.
40 #define MAXCLIENTS (MAXCONNECTIONS-24)
54 #ifndef CONFIG_SETUGID
59 /* Define FD_SETSIZE to what we want before including sys/types.h on BSD */
60 #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__bsdi__)
61 #if ((!defined(USE_POLL)) && (!defined(FD_SETSIZE)))
62 #define FD_SETSIZE ((MAXCONNECTIONS)+4)
66 #define LIMIT_FMT "%d"
68 #define IRCD_MAX(a, b) ((a) > (b) ? (a) : (b))
69 #define IRCD_MIN(a, b) ((a) < (b) ? (a) : (b))
78 #endif /* INCLUDED_sys_h */