-
Notifications
You must be signed in to change notification settings - Fork 0
/
cmake_libsnmp.h.in
271 lines (250 loc) · 6.41 KB
/
cmake_libsnmp.h.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
/*_############################################################################
_##
_## cmake_libsnmp.h.in
_##
_## SNMP++ v3.4
_## -----------------------------------------------
_## Copyright (c) 2001-2021 Jochen Katz, Frank Fock
_##
_## This software is based on SNMP++2.6 from Hewlett Packard:
_##
_## Copyright (c) 1996
_## Hewlett-Packard Company
_##
_## ATTENTION: USE OF THIS SOFTWARE IS SUBJECT TO THE FOLLOWING TERMS.
_## Permission to use, copy, modify, distribute and/or sell this software
_## and/or its documentation is hereby granted without fee. User agrees
_## to display the above copyright notice and this license notice in all
_## copies of the software and any documentation of the software. User
_## agrees to assume all liability for the use of the software;
_## Hewlett-Packard, Frank Fock, and Jochen Katz make no representations
_## about the suitability of this software for any purpose. It is provided
_## "AS-IS" without warranty of any kind, either express or implied. User
_## hereby grants a royalty-free license to any and all derivatives based
_## upon this software code base.
_##
_##########################################################################*/
#ifndef __LIBSNMP_H_INCLUDED__
#define __LIBSNMP_H_INCLUDED__
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#cmakedefine _DEBUG
#cmakedefine CNF_HAVE_SYS_TYPES_H
#ifdef CNF_HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#cmakedefine CNF_HAVE_SYS_STAT_H
#ifdef CNF_HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
#cmakedefine CNF_STDCXX_98_HEADERS
#cmakedefine CNF_STDC_HEADERS
#cmakedefine CNF_HAVE_STDLIB_H
#cmakedefine CNF_HAVE_STRING_H
#cmakedefine CNF_HAVE_MEMORY_H
#cmakedefine CNF_HAVE_STRINGS_H
#cmakedefine CNF_HAVE_INTTYPES_H
#cmakedefine CNF_HAVE_CTYPE_H
#cmakedefine CNF_HAVE_SIGNAL_H
#cmakedefine CNF_HAVE_ERRNO_H
#cmakedefine CNF_HAVE_TIME_H
#cmakedefine HAVE_STDIO_H
#cmakedefine CNF_HAVE_IOSTREAM
#ifdef CNF_STDCXX_98_HEADERS
# include <cctype>
# include <cerrno>
# include <climits>
# include <csignal>
# include <cstddef>
# include <cstdio>
# include <cstdlib>
# include <cstring>
# include <ctime>
#else
# ifdef HAVE_STDIO_H
# include <stdio.h>
# endif
# ifdef CNF_STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
# else
# ifdef CNF_HAVE_STDLIB_H
# include <stdlib.h>
# endif
# endif
# ifdef CNF_HAVE_STRING_H
# if !defined(CNF_STDC_HEADERS) && defined(CNF_HAVE_MEMORY_H)
# include <memory.h>
# endif
# include <string.h>
# endif
# ifdef CNF_HAVE_STRINGS_H
# include <strings.h>
# endif
# ifdef CNF_HAVE_INTTYPES_H
# include <inttypes.h>
# endif
# ifdef CNF_HAVE_CTYPE_H
# include <ctype.h>
# endif
# ifdef CNF_HAVE_SIGNAL_H
# include <signal.h>
# endif
# ifdef CNF_HAVE_ERRNO_H
# include <errno.h>
# endif
# ifdef CNF_HAVE_TIME_H
# include <time.h>
#endif
#endif
#cmakedefine CNF_HAVE_UNISTD_H
#cmakedefine CNF_HAVE_SYS_UNISTD_H
#ifdef CNF_HAVE_UNISTD_H
# include <unistd.h>
#else
# ifdef CNF_HAVE_SYS_UNISTD_H
# include <sys/unistd.h>
# endif
#endif
#cmakedefine CNF_HAVE_STDINT_H
#ifdef CNF_HAVE_STDINT_H
# include <stdint.h>
#endif
#cmakedefine CNF_HAVE_SYS_TIME_H
#ifdef CNF_HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#cmakedefine CNF_HAVE_SYS_PARAM_H
#ifdef CNF_HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#cmakedefine CNF_HAVE_SYS_TIMEB_H
#ifdef CNF_HAVE_SYS_TIMEB_H
#include <sys/timeb.h> // and _ftime
#endif
#cmakedefine CNF_HAVE_WINSOCK2_H
#cmakedefine CNF_HAVE_WS2TCPIP_H
#cmakedefine CNF_HAVE_WSPIAPI_H
#cmakedefine CNF_HAVE_WINSOCK_H
#cmakedefine CNF_HAVE_NETDB_H
#cmakedefine CNF_HAVE_SYS_SOCKET_H
#cmakedefine CNF_HAVE_ARPA_INET_H
#cmakedefine CNF_HAVE_NETINET_IN_H
#ifdef CNF_HAVE_WINSOCK2_H
# include <winsock2.h>
# ifdef CNF_HAVE_WS2TCPIP_H
# include <ws2tcpip.h>
# endif
# ifdef CNF_HAVE_WSPIAPI_H
# include <wspiapi.h>
# endif
#elif defined(CNF_HAVE_WINSOCK_H)
/* IIRC winsock.h must be included before windows.h */
# include <winsock.h>
#else
# ifdef CNF_HAVE_NETDB_H
# include <netdb.h>
# endif
# ifdef CNF_HAVE_SYS_SOCKET_H
# include <sys/socket.h>
# endif
# ifdef CNF_HAVE_ARPA_INET_H
# include <arpa/inet.h>
# endif
# ifdef CNF_HAVE_NETINET_IN_H
# include <netinet/in.h>
# endif
#endif
#cmakedefine CNF_HAVE_POLL_H
#cmakedefine CNF_HAVE_SYS_SELECT_H
#ifdef CNF_HAVE_POLL_H
# include <poll.h>
#endif
#ifdef CNF_HAVE_SYS_SELECT_H
# include <sys/select.h>
#endif
#cmakedefine CNF_HAVE_IO_H
#cmakedefine CNF_HAVE_PROCESS_H
#ifdef _WIN32
# ifdef CNF_HAVE_IO_H
# include <io.h>
# endif
# ifdef CNF_HAVE_PROCESS_H
# include <process.h>
# endif
# include <windows.h>
#endif
#cmakedefine CNF_HAVE_STRCASECMP
#cmakedefine CNF_HAVE_STRICMP
#if !defined(CNF_HAVE_STRCASECMP)
# ifdef CNF_HAVE_STRICMP
# define strcasecmp stricmp
# else
extern "C" int strcasecmp(const char *s1, const char *s2);
# endif
#endif
#cmakedefine CNF_HAVE_GETPID
#cmakedefine CNF_HAVE__GETPID
#if !defined(CNF_HAVE_GETPID)
# ifdef CNF_HAVE__GETPID
# define getpid _getpid
# endif
#endif
#cmakedefine CNF_HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
#cmakedefine CNF_HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY
#if !defined(CNF_HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY)
# ifdef CNF_HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY
# define ss_family __ss_family
# endif
#endif
typedef @TYPE_INT64_T@ pp_type_int64;
typedef @TYPE_UINT64_T@ pp_type_uint64;
/* Minimum of signed integral types. */
#ifndef INT8_MIN
# define INT8_MIN (-128)
#endif
#ifndef INT16_MIN
# define INT16_MIN (-32767-1)
#endif
#ifndef INT32_MIN
# define INT32_MIN (-2147483647-1)
#endif
#ifndef INT64_MIN
# define INT64_MIN (-pp_type_int64(9223372036854775807)-1)
#endif
/* Maximum of signed integral types. */
#ifndef INT8_MAX
# define INT8_MAX (127)
#endif
#ifndef INT16_MAX
# define INT16_MAX (32767)
#endif
#ifndef INT32_MAX
# define INT32_MAX (2147483647)
#endif
#ifndef INT64_MAX
# define INT64_MAX (pp_type_int64(9223372036854775807))
#endif
/* Maximum of unsigned integral types. */
#ifndef UINT8_MAX
# define UINT8_MAX (255)
#endif
#ifndef UINT16_MAX
# define UINT16_MAX (65535)
#endif
#ifndef UINT32_MAX
# define UINT32_MAX (4294967295U)
#endif
#ifndef UINT64_MAX
# define UINT64_MAX (pp_type_uint64(18446744073709551615))
#endif
#ifndef NULL
#define NULL 0
#endif
#ifdef CNF_HAVE_IOSTREAM
# include <iostream>
#else
# include <iostream.h>
#endif
#endif /* ?__LIBSNMP_H_INCLUDED__ */