From 0a24b3afc093e16038da170458e2ecb68b363bdd Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 19 Oct 2010 12:39:48 +0200 Subject: fixing some compile problems on FreeBSD --- runtime/cfsysline.c | 6 +++--- runtime/msg.c | 2 +- runtime/stream.c | 9 ++++++++- 3 files changed, 12 insertions(+), 5 deletions(-) (limited to 'runtime') diff --git a/runtime/cfsysline.c b/runtime/cfsysline.c index 184c0d87..469fbfc2 100644 --- a/runtime/cfsysline.c +++ b/runtime/cfsysline.c @@ -217,9 +217,9 @@ static rsRetVal doGetSize(uchar **pp, rsRetVal (*pSetHdlr)(void*, uid_t), void * case 'K': i *= 1000; ++(*pp); break; case 'M': i *= 1000000; ++(*pp); break; case 'G': i *= 1000000000; ++(*pp); break; - case 'T': i *= 1000000000000; ++(*pp); break; /* tera */ - case 'P': i *= 1000000000000000; ++(*pp); break; /* peta */ - case 'E': i *= 1000000000000000000; ++(*pp); break; /* exa */ + case 'T': i *= (long long) 1000000000000; ++(*pp); break; /* tera */ + case 'P': i *= (long long) 1000000000000000; ++(*pp); break; /* peta */ + case 'E': i *= (long long) 1000000000000000000; ++(*pp); break; /* exa */ } /* done */ diff --git a/runtime/msg.c b/runtime/msg.c index 91057f97..f5041b85 100644 --- a/runtime/msg.c +++ b/runtime/msg.c @@ -2484,7 +2484,7 @@ uchar *MsgGetProp(msg_t *pMsg, struct templateEntry *pTpe, bFound = 1; } else { dbgprintf("regex found at offset %d, new offset %d, tries %d\n", - iOffs, iOffs + pmatch[0].rm_eo, iTry); + iOffs, (int) (iOffs + pmatch[0].rm_eo), iTry); iOffs += pmatch[0].rm_eo; ++iTry; } diff --git a/runtime/stream.c b/runtime/stream.c index 696986c7..869324ec 100644 --- a/runtime/stream.c +++ b/runtime/stream.c @@ -60,7 +60,14 @@ # include #endif -#define inline +/* some platforms do not have large file support :( */ +#ifndef O_LARGEFILE +# define O_LARGEFILE 0 +#endif +#ifndef HAVE_LSEEK64 + typedef off_t off64_t; +# define lseek64(fd, offset, whence) lseek(fd, offset, whence) +#endif /* static data */ DEFobjStaticHelpers -- cgit