[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r35898 - in libmicrohttpd: . src/microhttpd w32/VS2013
From: |
gnunet |
Subject: |
[GNUnet-SVN] r35898 - in libmicrohttpd: . src/microhttpd w32/VS2013 |
Date: |
Tue, 9 Jun 2015 21:34:07 +0200 |
Author: Karlson2k
Date: 2015-06-09 21:34:07 +0200 (Tue, 09 Jun 2015)
New Revision: 35898
Modified:
libmicrohttpd/configure.ac
libmicrohttpd/src/microhttpd/response.c
libmicrohttpd/w32/VS2013/MHD_config.h
Log:
response.c: file_reader(): add support for W32 64-bit seek
Modified: libmicrohttpd/configure.ac
===================================================================
--- libmicrohttpd/configure.ac 2015-06-09 19:33:57 UTC (rev 35897)
+++ libmicrohttpd/configure.ac 2015-06-09 19:34:07 UTC (rev 35898)
@@ -608,6 +608,7 @@
# large file support (> 4 GB)
AC_SYS_LARGEFILE
AC_FUNC_FSEEKO
+AC_CHECK_FUNCS([_lseeki64])
# optional: have error messages ?
AC_MSG_CHECKING(whether to generate error messages)
Modified: libmicrohttpd/src/microhttpd/response.c
===================================================================
--- libmicrohttpd/src/microhttpd/response.c 2015-06-09 19:33:57 UTC (rev
35897)
+++ libmicrohttpd/src/microhttpd/response.c 2015-06-09 19:34:07 UTC (rev
35898)
@@ -329,11 +329,16 @@
if (offset64 < 0)
return MHD_CONTENT_READER_END_WITH_ERROR; /* seek to required position is
not possible */
+#if defined(HAVE___LSEEKI64)
+ if (_lseeki64 (response->fd, offset64, SEEK_SET) != offset64)
+ return MHD_CONTENT_READER_END_WITH_ERROR; /* can't seek to required
position */
+#else /* !HAVE___LSEEKI64 */
if (sizeof(off_t) < sizeof(uint64_t) && offset64 > (uint64_t)INT32_MAX)
return MHD_CONTENT_READER_END_WITH_ERROR; /* seek to required position is
not possible */
if (lseek (response->fd, (off_t)offset64, SEEK_SET) != (off_t)offset64)
return MHD_CONTENT_READER_END_WITH_ERROR; /* can't seek to required
position */
+#endif
n = read (response->fd, buf, max);
if (0 == n)
Modified: libmicrohttpd/w32/VS2013/MHD_config.h
===================================================================
--- libmicrohttpd/w32/VS2013/MHD_config.h 2015-06-09 19:33:57 UTC (rev
35897)
+++ libmicrohttpd/w32/VS2013/MHD_config.h 2015-06-09 19:34:07 UTC (rev
35898)
@@ -70,7 +70,10 @@
don't. */
#define HAVE_DECL_TCP_NOPUSH 0
+/* Define to 1 if you have the `_lseeki64' function. */
+#define HAVE___LSEEKI64 1
+
/* *** Headers information *** */
/* Not really important as not used by code currently */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r35898 - in libmicrohttpd: . src/microhttpd w32/VS2013,
gnunet <=