diff options
author | vsevolod <vsevolod@FreeBSD.org> | 2014-08-27 12:09:49 +0000 |
---|---|---|
committer | vsevolod <vsevolod@FreeBSD.org> | 2014-08-27 12:09:49 +0000 |
commit | d7fe92fffc884615cc055db49cde9ff27bd29711 (patch) | |
tree | 967e6c394e1854024f9ae853be854dcfd70fdd14 | |
parent | 7bb6d1e3c21fe83c32719932b628dcec61a85f2d (diff) | |
download | FreeBSD-ports-d7fe92fffc884615cc055db49cde9ff27bd29711.zip FreeBSD-ports-d7fe92fffc884615cc055db49cde9ff27bd29711.tar.gz |
Fix build on 8 and 9 where there is no std::strtoull.
Do not bump revision since package content is unchanged.
-rw-r--r-- | math/clasp/files/patch-libprogram_opts__src__string_convert.cpp | 20 | ||||
-rw-r--r-- | math/gringo/files/patch-libprogram_opts__src__string_convert.cpp | 30 |
2 files changed, 39 insertions, 11 deletions
diff --git a/math/clasp/files/patch-libprogram_opts__src__string_convert.cpp b/math/clasp/files/patch-libprogram_opts__src__string_convert.cpp new file mode 100644 index 0000000..d2a7830 --- /dev/null +++ b/math/clasp/files/patch-libprogram_opts__src__string_convert.cpp @@ -0,0 +1,20 @@ +--- ./libprogram_opts/src/string_convert.cpp.orig 2014-08-12 18:47:21.000000000 +0300 ++++ ./libprogram_opts/src/string_convert.cpp 2014-08-27 14:59:59.000000000 +0300 +@@ -94,7 +94,7 @@ + err = (char*)x+2; + } + else if (*x != '-') { +- out = std::strtoul(x, &err, detectBase(x)); ++ out = strtoul(x, &err, detectBase(x)); + if (out == ULONG_MAX && errno == ERANGE) { err = (char*)x; } + } + else { err = (char*)x; } +@@ -191,7 +191,7 @@ + if (t) { out = temp; return t; } + if (empty(x, errPos) || *x == '-') { return 0; } + char* err; +- out = std::strtoull(x, &err, detectBase(x)); ++ out = strtoull(x, &err, detectBase(x)); + return parsed(err != x, err, errPos); + } + std::string& xconvert(std::string& out, long long x) { diff --git a/math/gringo/files/patch-libprogram_opts__src__string_convert.cpp b/math/gringo/files/patch-libprogram_opts__src__string_convert.cpp index a260466..d2a7830 100644 --- a/math/gringo/files/patch-libprogram_opts__src__string_convert.cpp +++ b/math/gringo/files/patch-libprogram_opts__src__string_convert.cpp @@ -1,12 +1,20 @@ ---- ./libprogram_opts/src/string_convert.cpp.orig 2014-08-12 17:47:21.000000000 +0200 -+++ ./libprogram_opts/src/string_convert.cpp 2014-08-21 22:39:08.000000000 +0200 -@@ -28,6 +28,9 @@ +--- ./libprogram_opts/src/string_convert.cpp.orig 2014-08-12 18:47:21.000000000 +0300 ++++ ./libprogram_opts/src/string_convert.cpp 2014-08-27 14:59:59.000000000 +0300 +@@ -94,7 +94,7 @@ + err = (char*)x+2; + } + else if (*x != '-') { +- out = std::strtoul(x, &err, detectBase(x)); ++ out = strtoul(x, &err, detectBase(x)); + if (out == ULONG_MAX && errno == ERANGE) { err = (char*)x; } + } + else { err = (char*)x; } +@@ -191,7 +191,7 @@ + if (t) { out = temp; return t; } + if (empty(x, errPos) || *x == '-') { return 0; } + char* err; +- out = std::strtoull(x, &err, detectBase(x)); ++ out = strtoull(x, &err, detectBase(x)); + return parsed(err != x, err, errPos); } - #endif - #endif -+namespace std { -+ using ::strtoull; -+} - namespace bk_lib { - - static int detectBase(const char* x) { + std::string& xconvert(std::string& out, long long x) { |