diff options
author | novel <novel@FreeBSD.org> | 2007-06-17 13:43:07 +0800 |
---|---|---|
committer | novel <novel@FreeBSD.org> | 2007-06-17 13:43:07 +0800 |
commit | 8ab11d96e6db9bb5fbb192d655b0b10dd662967b (patch) | |
tree | 0a2a66e062a4e4b721431e9e17f014279dab57b1 /x11-wm/fbpager | |
parent | 652446561d3f5ed4c6931473911f7720f1ab9754 (diff) | |
download | freebsd-ports-gnome-8ab11d96e6db9bb5fbb192d655b0b10dd662967b.tar.gz freebsd-ports-gnome-8ab11d96e6db9bb5fbb192d655b0b10dd662967b.tar.zst freebsd-ports-gnome-8ab11d96e6db9bb5fbb192d655b0b10dd662967b.zip |
Fix build with gcc42.
PR: 112821
Submitted by: Henrik Brix Andersen <henrik@brixandersen.dk>
Obtained from: Gentoo Linux Bugzilla (bug 135504)
Diffstat (limited to 'x11-wm/fbpager')
-rw-r--r-- | x11-wm/fbpager/files/patch-Resources.hh | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/x11-wm/fbpager/files/patch-Resources.hh b/x11-wm/fbpager/files/patch-Resources.hh new file mode 100644 index 000000000000..69c16d326761 --- /dev/null +++ b/x11-wm/fbpager/files/patch-Resources.hh @@ -0,0 +1,76 @@ +--- src/Resources.hh ++++ src/Resources.hh +@@ -8,8 +8,10 @@ + #include <cstdio> + #include <cstring> + ++namespace FbTk { ++ + template<> +-void FbTk::Resource<bool>:: ++void Resource<bool>:: + setFromString(char const *strval) { + if (strcasecmp(strval, "true") == 0 || + strcasecmp(strval, "yes") == 0) +@@ -19,38 +21,37 @@ + } + + template<> +-std::string FbTk::Resource<bool>:: ++std::string Resource<bool>:: + getString() { + return std::string(**this == true ? "true" : "false"); + } + + template <> +-void FbTk::Resource<std::string>::setFromString(const char *str) { ++void Resource<std::string>::setFromString(const char *str) { + *(*this) = (str ? str : ""); + } + + template <> +-std::string FbTk::Resource<std::string>::getString() { ++std::string Resource<std::string>::getString() { + return *(*this); + } + + template <> +-void FbTk::Resource<int>::setFromString(const char *str) { ++void Resource<int>::setFromString(const char *str) { + if (str == 0) + return; + sscanf(str, "%d", &(*(*this))); + } + + template <> +-std::string FbTk::Resource<int>::getString() { ++std::string Resource<int>::getString() { + char buff[16]; + sprintf(buff, "%d", (*(*this))); + return std::string(buff); + } + +-namespace FbPager { + template <> +-void FbTk::Resource<FbPager::Alignment>::setFromString(const char *str) { ++void Resource<FbPager::FbPager::Alignment>::setFromString(const char *str) { + if (strcmp("TopToBottom", str) == 0) + *(*this) = FbPager::FbPager::TOP_TO_BOTTOM; + else +@@ -58,7 +59,7 @@ + } + + template <> +-std::string FbTk::Resource<FbPager::Alignment>::getString() { ++std::string Resource<FbPager::FbPager::Alignment>::getString() { + switch (*(*this)) { + case FbPager::FbPager::LEFT_TO_RIGHT: + return "LeftToRight"; +@@ -67,6 +68,6 @@ + } + } + +-} // end namespace FbPager ++} // end namespace FbTk + + #endif // RESOURCES |