libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 621cae4168c0cc3036fb3adcfd2741646efc34f0
parent 90f4046de07129f148c3923410b0258b5b03c4d4
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Tue,  8 Dec 2015 11:19:17 +0000

Added missing files

Diffstat:
Asrc/microhttpd/sysfdsetsize.c | 80+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/microhttpd/sysfdsetsize.h | 36++++++++++++++++++++++++++++++++++++
2 files changed, 116 insertions(+), 0 deletions(-)

diff --git a/src/microhttpd/sysfdsetsize.c b/src/microhttpd/sysfdsetsize.c @@ -0,0 +1,80 @@ +/* + This file is part of libmicrohttpd + Copyright (C) 2015 Karlson2k (Evgeny Grin) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/** + * @file microhttpd/sysfdsetsize.c + * @brief Helper for obtaining FD_SETSIZE system default value + * @author Karlson2k (Evgeny Grin) + */ + + +#include "MHD_config.h" + +#ifdef FD_SETSIZE +/* FD_SETSIZE was defined before system headers. */ +/* To get system value of FD_SETSIZE, undefine FD_SETSIZE + here. */ +#undf FD_SETSIZE +#endif /* FD_SETSIZE */ + +#include <stdlib.h> +#ifdef OS_VXWORKS +#include <sockLib.h> +#endif /* OS_VXWORKS */ +#if HAVE_SYS_SELECT_H +#include <sys/select.h> +#endif /* HAVE_SYS_SELECT_H */ +#if HAVE_SYS_TYPES_H +#include <sys/types.h> +#endif /* HAVE_SYS_TYPES_H */ +#if HAVE_SYS_TIME_H +#include <sys/time.h> +#endif /* HAVE_SYS_TIME_H */ +#if HAVE_TIME_H +#include <time.h> +#endif /* HAVE_TIME_H */ +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif /* HAVE_UNISTD_H */ +#if HAVE_SYS_SOCKET_H +#include <sys/socket.h> +#endif /* HAVE_SYS_SOCKET_H */ + +#if defined(_WIN32) && !defined(__CYGWIN__) +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN 1 +#endif /* !WIN32_LEAN_AND_MEAN */ +#include <winsock2.h> +#endif /* _WIN32 && !__CYGWIN__ */ + +#ifndef FD_SETSIZE +#error FD_SETSIZE must be defined in system headers +#endif /* !FD_SETSIZE */ + +#include "sysfdsetsize.h" + +/** + * Get system default value of FD_SETSIZE + * @return system default value of FD_SETSIZE + */ +int +get_system_fdsetsize_value (void) +{ + return FD_SETSIZE; +} diff --git a/src/microhttpd/sysfdsetsize.h b/src/microhttpd/sysfdsetsize.h @@ -0,0 +1,36 @@ +/* + This file is part of libmicrohttpd + Copyright (C) 2015 Karlson2k (Evgeny Grin) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/** + * @file microhttpd/sysfdsetsize.h + * @brief Helper for obtaining FD_SETSIZE system default value + * @author Karlson2k (Evgeny Grin) + */ + +#ifndef SYSFDSETSIZE_H +#define SYSFDSETSIZE_H 1 + +/** + * Get system default value of FD_SETSIZE + * @return system default value of FD_SETSIZE + */ +int +get_system_fdsetsize_value (void); + +#endif /* !SYSFDSETSIZE_H */