about summary refs log tree commit diff
path: root/src/libutil/util.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2008-06-18T15·20+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2008-06-18T15·20+0000
commit5af84139a8d04ad9fdb2c02bc242ce5cd50b87b9 (patch)
tree4c8292835dd77eac32e06ffa28bf7c89d1ae12ed /src/libutil/util.cc
parentd3aa183beb774c20cb77052248cf45e684d134fb (diff)
* --max-freed: support values >= 4 GB.
Diffstat (limited to 'src/libutil/util.cc')
-rw-r--r--src/libutil/util.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc
index 1873ccfe53..4f6c367da8 100644
--- a/src/libutil/util.cc
+++ b/src/libutil/util.cc
@@ -1020,6 +1020,14 @@ bool string2Int(const string & s, int & n)
 }
 
 
+bool string2Int(const string & s, long long & n)
+{
+    std::istringstream str(s);
+    str >> n;
+    return str && str.get() == EOF;
+}
+
+
 void ignoreException()
 {
     try {