1 |
/* |
2 |
* ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). |
3 |
* stdinc.h: Pull in all of the necessary system headers |
4 |
* |
5 |
* Copyright (C) 2002 Aaron Sethman <androsyn@ratbox.org> |
6 |
* |
7 |
* This program is free software; you can redistribute it and/or modify |
8 |
* it under the terms of the GNU General Public License as published by |
9 |
* the Free Software Foundation; either version 2 of the License, or |
10 |
* (at your option) any later version. |
11 |
* |
12 |
* This program is distributed in the hope that it will be useful, |
13 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 |
* GNU General Public License for more details. |
16 |
* |
17 |
* You should have received a copy of the GNU General Public License |
18 |
* along with this program; if not, write to the Free Software |
19 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
20 |
* USA |
21 |
* |
22 |
* $Id$ |
23 |
* |
24 |
*/ |
25 |
|
26 |
#ifndef STDINC_H /* prevent multiple #includes */ |
27 |
#define STDINC_H |
28 |
|
29 |
#ifndef IN_AUTOCONF |
30 |
#include "setup.h" |
31 |
#endif |
32 |
|
33 |
#include "defaults.h" |
34 |
|
35 |
#ifdef HAVE_STDLIB_H |
36 |
#include <stdlib.h> |
37 |
#endif |
38 |
#ifdef STRING_WITH_STRINGS |
39 |
# include <string.h> |
40 |
# include <strings.h> |
41 |
#else |
42 |
# ifdef HAVE_STRING_H |
43 |
# include <string.h> |
44 |
# else |
45 |
# ifdef HAVE_STRINGS_H |
46 |
# include <strings.h> |
47 |
# endif |
48 |
# endif |
49 |
#endif |
50 |
|
51 |
#ifdef HAVE_STRTOK_R |
52 |
# define strtoken(x, y, z) strtok_r(y, z, x) |
53 |
#endif |
54 |
|
55 |
#include <sys/types.h> |
56 |
|
57 |
#ifdef HAVE_INTTYPES_H |
58 |
#include <inttypes.h> |
59 |
#else |
60 |
#ifdef HAVE_STDINT_H |
61 |
#include <stdint.h> |
62 |
#endif |
63 |
#endif |
64 |
|
65 |
#ifdef HAVE_STDDEF_H |
66 |
# include <stddef.h> |
67 |
#else /* This is basically what stddef.h provides on most systems */ |
68 |
# ifndef NULL |
69 |
# define NULL ((void*)0) |
70 |
# endif |
71 |
# ifndef offsetof |
72 |
# define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) |
73 |
# endif |
74 |
#endif |
75 |
|
76 |
#ifdef HAVE_CRYPT_H |
77 |
#include <crypt.h> |
78 |
#endif |
79 |
|
80 |
#ifdef HAVE_LIBCRYPTO |
81 |
#include <openssl/ssl.h> |
82 |
#include <openssl/err.h> |
83 |
#endif |
84 |
|
85 |
#include <stdio.h> |
86 |
#include <assert.h> |
87 |
#include <time.h> |
88 |
#include <fcntl.h> |
89 |
|
90 |
#ifdef HAVE_LIBGEN_H |
91 |
#include <libgen.h> |
92 |
#endif |
93 |
|
94 |
#include <stdarg.h> |
95 |
#include <signal.h> |
96 |
#include <ctype.h> |
97 |
|
98 |
#ifdef _WIN32 |
99 |
#define PATH_MAX (MAX_PATH - 1) |
100 |
#define WIN32_LEAN_AND_MEAN |
101 |
#include <windows.h> |
102 |
#include <winsock.h> |
103 |
#else |
104 |
#include <dirent.h> |
105 |
#include <netdb.h> |
106 |
#include <sys/socket.h> |
107 |
#include <netinet/in.h> |
108 |
#include <arpa/inet.h> |
109 |
#include <sys/time.h> |
110 |
#include <sys/file.h> |
111 |
#endif |
112 |
|
113 |
#include <limits.h> |
114 |
|
115 |
#ifdef HAVE_UNISTD_H |
116 |
#include <unistd.h> |
117 |
#endif |
118 |
|
119 |
#ifdef HAVE_SYS_RESOURCE_H |
120 |
#include <sys/resource.h> |
121 |
#endif |
122 |
|
123 |
#include <sys/stat.h> |
124 |
#ifdef HAVE_SYS_WAIT_H |
125 |
#include <sys/wait.h> |
126 |
#endif |
127 |
|
128 |
#ifdef HAVE_SYS_PARAM_H |
129 |
#include <sys/param.h> |
130 |
#endif |
131 |
|
132 |
#ifdef HAVE_ERRNO_H |
133 |
#include <errno.h> |
134 |
#else |
135 |
extern int errno; |
136 |
#endif |
137 |
|
138 |
#include "inet_misc.h" |
139 |
|
140 |
#ifdef _WIN32 |
141 |
#undef strcasecmp |
142 |
#define strcasecmp stricmp |
143 |
#endif |
144 |
|
145 |
#endif |