summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2010-04-07 13:57:46 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2010-04-07 13:57:46 +0200
commit7db6ffbce3e2a709e77ff05782f703ec112ed84b (patch)
tree1f72a9fcef55fab0c5bf8c7b8b7f89c8feea7afc /runtime
parent2cd132eebb84dbcffcf0c20b9354c14f797c29cd (diff)
downloadrsyslog-7db6ffbce3e2a709e77ff05782f703ec112ed84b.tar.gz
rsyslog-7db6ffbce3e2a709e77ff05782f703ec112ed84b.tar.xz
rsyslog-7db6ffbce3e2a709e77ff05782f703ec112ed84b.zip
bugfix: the T/P/E config size specifiers did not work properly under call 32-bit platforms
Diffstat (limited to 'runtime')
-rw-r--r--runtime/cfsysline.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/runtime/cfsysline.c b/runtime/cfsysline.c
index 184c0d87..5df8e64c 100644
--- a/runtime/cfsysline.c
+++ b/runtime/cfsysline.c
@@ -217,9 +217,11 @@ 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 */
+ /* we need to use the multiplication below because otherwise
+ * the compiler gets an error during constant parsing */
+ case 'T': i *= (int64) 1000 * 1000000000; ++(*pp); break; /* tera */
+ case 'P': i *= (int64) 1000000 * 1000000000; ++(*pp); break; /* peta */
+ case 'E': i *= (int64) 1000000000 * 1000000000; ++(*pp); break; /* exa */
}
/* done */