mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-10-02 04:02:18 +03:00
Move all internal limits definitions to MHD_limits.h
This commit is contained in:
1 parent
4a251757ab
commit
2c842e6b95
6 files changed
+55
-18
No files matched your search
@@ -206,12 +206,4 @@ typedef MHD_socket MHD_pipe;
|
||||
#define IPPROTO_IPV6 IPPROTO_IPV6
|
||||
#endif
|
||||
|
||||
#ifndef OFF_T_MAX
|
||||
#define OFF_T_MAX ((off_t) ~(((uint64_t) 1) << (8 * sizeof(off_t) - 1)))
|
||||
#endif
|
||||
|
||||
#if defined(_LARGEFILE64_SOURCE) && !defined(OFF64_T_MAX)
|
||||
#define OFF64_T_MAX ((off64_t) ~(((uint64_t) 1) << (8 * sizeof(off64_t) - 1)))
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
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/MHD_limits.h
|
||||
* @brief limits values definitions
|
||||
* @author Karlson2k (Evgeny Grin)
|
||||
*/
|
||||
|
||||
#ifndef MHD_LIMITS_H
|
||||
#define MHD_LIMITS_H
|
||||
|
||||
#include "platform.h"
|
||||
|
||||
#ifdef HAVE_LIMITS_H
|
||||
#include <limits.h>
|
||||
#endif /* HAVE_LIMITS_H */
|
||||
|
||||
|
||||
#ifndef INT32_MAX
|
||||
#define INT32_MAX ((int32_t)0x7FFFFFFF)
|
||||
#endif /* !INT32_MAX */
|
||||
|
||||
#ifndef OFF_T_MAX
|
||||
#define OFF_T_MAX ((off_t) ~(((uint64_t) 1) << (8 * sizeof(off_t) - 1)))
|
||||
#endif /* !OFF_T_MAX */
|
||||
|
||||
#if defined(_LARGEFILE64_SOURCE) && !defined(OFF64_T_MAX)
|
||||
#define OFF64_T_MAX ((off64_t) ~(((uint64_t) 1) << (8 * sizeof(off64_t) - 1)))
|
||||
#endif /* _LARGEFILE64_SOURCE && !OFF64_T_MAX */
|
||||
|
||||
|
||||
#endif /* MHD_LIMITS_H */
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "response.h"
|
||||
#include "connection.h"
|
||||
#include "memorypool.h"
|
||||
#include <limits.h>
|
||||
#include "MHD_limits.h"
|
||||
#include "autoinit_funcs.h"
|
||||
|
||||
#if HAVE_SEARCH_H
|
||||
@@ -117,10 +117,6 @@
|
||||
#define EPOLL_CLOEXEC 0
|
||||
#endif
|
||||
|
||||
#ifndef INT32_MAX
|
||||
#define INT32_MAX ((int32_t)0x7FFFFFFF)
|
||||
#endif /* !INT32_MAX */
|
||||
|
||||
|
||||
/**
|
||||
* Default implementation of the panic function,
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "internal.h"
|
||||
#include "response.h"
|
||||
#include <limits.h>
|
||||
#include "MHD_limits.h"
|
||||
|
||||
#if defined(_WIN32) && defined(MHD_W32_MUTEX_)
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
@@ -305,10 +305,6 @@ MHD_set_response_options (struct MHD_Response *response,
|
||||
}
|
||||
|
||||
|
||||
#ifndef INT32_MAX
|
||||
#define INT32_MAX ((int32_t)0x7FFFFFFF)
|
||||
#endif /* !INT32_MAX */
|
||||
|
||||
/**
|
||||
* Given a file descriptor, read data from the file
|
||||
* to generate the response.
|
||||
|
||||
@@ -92,6 +92,7 @@
|
||||
<ClInclude Include="..\..\src\microhttpd\internal.h" />
|
||||
<ClInclude Include="..\..\src\microhttpd\md5.h" />
|
||||
<ClInclude Include="..\..\src\microhttpd\memorypool.h" />
|
||||
<ClInclude Include="..\..\src\microhttpd\MHD_limits.h" />
|
||||
<ClInclude Include="..\..\src\microhttpd\reason_phrase.h" />
|
||||
<ClInclude Include="..\..\src\microhttpd\response.h" />
|
||||
<ClInclude Include="..\..\src\microhttpd\tsearch.h" />
|
||||
|
||||
@@ -105,6 +105,9 @@
|
||||
<ClInclude Include="..\..\src\include\autoinit_funcs.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\microhttpd\MHD_limits.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="microhttpd_dll_res_vc.rc">
|
||||
|
||||
Reference in new issue
Block a user