GNU libmicrohttpd 0.9.77
Loading...
Searching...
No Matches
sysfdsetsize.c
Go to the documentation of this file.
1/*
2 This file is part of libmicrohttpd
3 Copyright (C) 2015 Karlson2k (Evgeny Grin)
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library 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 GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18*/
19
27#include "MHD_config.h"
28
29#ifdef FD_SETSIZE
30/* FD_SETSIZE was defined before system headers. */
31/* To get system value of FD_SETSIZE, undefine FD_SETSIZE
32 here. */
33#undef FD_SETSIZE
34#endif /* FD_SETSIZE */
35
36#ifdef HAVE_STDLIB_H
37#include <stdlib.h>
38#endif /* HAVE_STDLIB_H */
39#if defined(__VXWORKS__) || defined(__vxworks) || defined(OS_VXWORKS)
40#include <sockLib.h>
41#endif /* OS_VXWORKS */
42#if HAVE_SYS_SELECT_H
43#include <sys/select.h>
44#endif /* HAVE_SYS_SELECT_H */
45#if HAVE_SYS_TYPES_H
46#include <sys/types.h>
47#endif /* HAVE_SYS_TYPES_H */
48#if HAVE_SYS_TIME_H
49#include <sys/time.h>
50#endif /* HAVE_SYS_TIME_H */
51#if HAVE_TIME_H
52#include <time.h>
53#endif /* HAVE_TIME_H */
54#ifdef HAVE_UNISTD_H
55#include <unistd.h>
56#endif /* HAVE_UNISTD_H */
57#if HAVE_SYS_SOCKET_H
58#include <sys/socket.h>
59#endif /* HAVE_SYS_SOCKET_H */
60
61#if defined(_WIN32) && ! defined(__CYGWIN__)
62#ifndef WIN32_LEAN_AND_MEAN
63#define WIN32_LEAN_AND_MEAN 1
64#endif /* !WIN32_LEAN_AND_MEAN */
65#include <winsock2.h>
66#endif /* _WIN32 && !__CYGWIN__ */
67
68#ifndef FD_SETSIZE
69#error FD_SETSIZE must be defined in system headers
70#endif /* !FD_SETSIZE */
71
72#include "sysfdsetsize.h"
73
78unsigned int
80{
81 return FD_SETSIZE;
82}
int get_system_fdsetsize_value(void)
Helper for obtaining FD_SETSIZE system default value.