summaryrefslogtreecommitdiffstats
path: root/runtime/stream.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2010-10-15 07:59:31 -0700
committerRainer Gerhards <rgerhards@adiscon.com>2010-10-15 07:59:31 -0700
commit3700a64d973f55e1cc8bd478e203f00d529ce27b (patch)
tree872a07003a538ac9c7921476c89c1e01766ca8b7 /runtime/stream.c
parent053656420eb67ec3f7ce0dc57dcb2d22e8cfa0f8 (diff)
parentc27a2ab6867897ec379ec1e9afb216c99070b33e (diff)
downloadrsyslog-3700a64d973f55e1cc8bd478e203f00d529ce27b.tar.gz
rsyslog-3700a64d973f55e1cc8bd478e203f00d529ce27b.tar.xz
rsyslog-3700a64d973f55e1cc8bd478e203f00d529ce27b.zip
Merge branch 'v4-stable' into v4-devel
Conflicts: ChangeLog runtime/stream.c
Diffstat (limited to 'runtime/stream.c')
-rw-r--r--runtime/stream.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/runtime/stream.c b/runtime/stream.c
index e6680adc..815176a2 100644
--- a/runtime/stream.c
+++ b/runtime/stream.c
@@ -214,7 +214,7 @@ doPhysOpen(strm_t *pThis)
iFlags |= O_NONBLOCK;
}
- pThis->fd = open((char*)pThis->pszCurrFName, iFlags, pThis->tOpenMode);
+ pThis->fd = open((char*)pThis->pszCurrFName, iFlags | O_LARGEFILE, pThis->tOpenMode);
DBGPRINTF("file '%s' opened as #%d with mode %d\n", pThis->pszCurrFName,
pThis->fd, (int) pThis->tOpenMode);
if(pThis->fd == -1) {
@@ -1189,7 +1189,7 @@ finalize_it:
* is invalidated.
* rgerhards, 2008-01-12
*/
-static rsRetVal strmSeek(strm_t *pThis, off_t offs)
+static rsRetVal strmSeek(strm_t *pThis, off64_t offs)
{
DEFiRet;
@@ -1199,9 +1199,9 @@ static rsRetVal strmSeek(strm_t *pThis, off_t offs)
strmOpenFile(pThis);
else
strmFlushInternal(pThis);
- int i;
- DBGOPRINT((obj_t*) pThis, "file %d seek, pos %ld\n", pThis->fd, (long) offs);
- i = lseek(pThis->fd, offs, SEEK_SET); // TODO: check error!
+ long long i;
+ DBGOPRINT((obj_t*) pThis, "file %d seek, pos %llu\n", pThis->fd, (long long unsigned) offs);
+ i = lseek64(pThis->fd, offs, SEEK_SET); // TODO: check error!
pThis->iCurrOffs = offs; /* we are now at *this* offset */
pThis->iBufPtr = 0; /* buffer invalidated */
@@ -1478,7 +1478,7 @@ static rsRetVal strmSerialize(strm_t *pThis, strm_t *pStrm)
{
DEFiRet;
int i;
- long l;
+ int64 l;
ISOBJ_TYPE_assert(pThis, strm);
ISOBJ_TYPE_assert(pStrm, strm);
@@ -1500,8 +1500,8 @@ static rsRetVal strmSerialize(strm_t *pThis, strm_t *pStrm)
i = pThis->tOpenMode;
objSerializeSCALAR_VAR(pStrm, tOpenMode, INT, i);
- l = (long) pThis->iCurrOffs;
- objSerializeSCALAR_VAR(pStrm, iCurrOffs, LONG, l);
+ l = pThis->iCurrOffs;
+ objSerializeSCALAR_VAR(pStrm, iCurrOffs, INT64, l);
CHKiRet(obj.EndSerialize(pStrm));