summaryrefslogtreecommitdiff
path: root/file_io/unix/readwrite.c
diff options
context:
space:
mode:
authorjorton <jorton@13f79535-47bb-0310-9956-ffa450edef68>2004-03-27 13:11:18 +0000
committerjorton <jorton@13f79535-47bb-0310-9956-ffa450edef68>2004-03-27 13:11:18 +0000
commit263ebecba3310066882fe83f7309c4f101ff34d2 (patch)
tree5919e52a5b6b9ae68ac09f9e288751d4b6a8034f /file_io/unix/readwrite.c
parentc3da8b59b2241ac249f2e52e06aec980a69769d8 (diff)
downloadlibapr-263ebecba3310066882fe83f7309c4f101ff34d2.tar.gz
Add LFS support:
* configure.in: Check for off64_t and necessary LFS functions, define apr_off_t as off64_t where available. Add --disable-lfs flag. Forward-port changes from 0.9.5 to define apr_off_t as long on systems systems with a 32-bit off_t which don't have LFS enabled. * include/apr.h.in: Let configure define APR_HAS_LARGE_FILES. * include/arch/netware/apr_arch_file_io.h: Redefine lseek and ftruncate. * include/arch/unix/apr_arch_file_io.h: Redefine stat, lstat, fstat, lseek, ftruncate here; define struct_stat. * file_io/unix/filestat.c: Use struct_stat. * file_io/unix/mktemp.c: Use mkstemp64 where available. * file_io/unix/open.c (apr_file_open): Use O_LARGEFILE by default when LFS is enabled. * file_io/unix/readwrite.c, file_io/unix/seek.c: Don't redefine lseek and ftruncate here. * mmap/unix/mmap.c (apr_mmap_create): Use mmap64 if available; otherwise check for overflow when LFS is enabled. * network_io/unix/sendrecv.c (apr_socket_sendfile) [Linux/HPUX]: Use sendfile64 if available; otherwise check for overflow when LFS is enabled. [solaris]: Use sendfilev64/sendfilevec64_t. * test/Makefile.in, test/test_apr.h, test/testlfs.c: Add tests. Reviewed by: Jeff Trawick git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65027 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io/unix/readwrite.c')
-rw-r--r--file_io/unix/readwrite.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/file_io/unix/readwrite.c b/file_io/unix/readwrite.c
index 3059f670f..1e6a6e665 100644
--- a/file_io/unix/readwrite.c
+++ b/file_io/unix/readwrite.c
@@ -164,11 +164,7 @@ APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, a
*/
apr_int64_t offset = thefile->filePtr - thefile->dataRead + thefile->bufpos;
if (offset != thefile->filePtr)
-#if defined(NETWARE) && APR_HAS_LARGE_FILES
- lseek64(thefile->filedes, offset, SEEK_SET);
-#else
lseek(thefile->filedes, offset, SEEK_SET);
-#endif
thefile->bufpos = thefile->dataRead = 0;
thefile->direction = 1;
}