[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r36739 - libmicrohttpd/src/microhttpd
From: |
gnunet |
Subject: |
[GNUnet-SVN] r36739 - libmicrohttpd/src/microhttpd |
Date: |
Tue, 8 Dec 2015 12:19:17 +0100 |
Author: Karlson2k
Date: 2015-12-08 12:19:17 +0100 (Tue, 08 Dec 2015)
New Revision: 36739
Added:
libmicrohttpd/src/microhttpd/sysfdsetsize.c
libmicrohttpd/src/microhttpd/sysfdsetsize.h
Log:
Added missing files
Added: libmicrohttpd/src/microhttpd/sysfdsetsize.c
===================================================================
--- libmicrohttpd/src/microhttpd/sysfdsetsize.c (rev 0)
+++ libmicrohttpd/src/microhttpd/sysfdsetsize.c 2015-12-08 11:19:17 UTC (rev
36739)
@@ -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;
+}
Added: libmicrohttpd/src/microhttpd/sysfdsetsize.h
===================================================================
--- libmicrohttpd/src/microhttpd/sysfdsetsize.h (rev 0)
+++ libmicrohttpd/src/microhttpd/sysfdsetsize.h 2015-12-08 11:19:17 UTC (rev
36739)
@@ -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 */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r36739 - libmicrohttpd/src/microhttpd,
gnunet <=