diff options
author | wiz <wiz@pkgsrc.org> | 2011-08-14 19:05:03 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2011-08-14 19:05:03 +0000 |
commit | 86794b420a3ed8e5081501ab22916160678a1a02 (patch) | |
tree | f03634218fdbdf26bed3ee8ec9dedce723ab408b /games/pingus/patches | |
parent | 2f38bda9ce63ac73af07148dfadfa74e7e5a18de (diff) | |
download | pkgsrc-86794b420a3ed8e5081501ab22916160678a1a02.tar.gz |
Fix build with gcc-4.5.
Diffstat (limited to 'games/pingus/patches')
3 files changed, 74 insertions, 0 deletions
diff --git a/games/pingus/patches/patch-src_system.cpp b/games/pingus/patches/patch-src_system.cpp new file mode 100644 index 00000000000..77ac57071e4 --- /dev/null +++ b/games/pingus/patches/patch-src_system.cpp @@ -0,0 +1,17 @@ +$NetBSD: patch-src_system.cpp,v 1.1 2011/08/14 19:13:03 wiz Exp $ + +Fix build with gcc-4.5. + +--- src/system.cpp.orig 2007-10-31 03:16:57.000000000 +0000 ++++ src/system.cpp +@@ -548,8 +548,8 @@ System::realpath(const std::string& path + #endif + else + { +- char buf[PATH_MAX]; +- if (getcwd(buf, PATH_MAX) == 0) ++ char buf[FILENAME_MAX]; ++ if (getcwd(buf, FILENAME_MAX) == 0) + { + std::cout << "System::realpath: Error: couldn't getcwd()" << std::endl; + return pathname; diff --git a/games/pingus/patches/patch-src_tinygettext_po__file__reader.cpp b/games/pingus/patches/patch-src_tinygettext_po__file__reader.cpp new file mode 100644 index 00000000000..2de5546dc08 --- /dev/null +++ b/games/pingus/patches/patch-src_tinygettext_po__file__reader.cpp @@ -0,0 +1,42 @@ +$NetBSD: patch-src_tinygettext_po__file__reader.cpp,v 1.1 2011/08/14 19:13:03 wiz Exp $ + +Fix build with gcc-4.5. + +--- src/tinygettext/po_file_reader.cpp.orig 2010-03-18 11:52:00.000000000 +0000 ++++ src/tinygettext/po_file_reader.cpp +@@ -169,7 +169,7 @@ POFileReader::tokenize_po(std::istream& + int c; + Token token; + +- while((c = getchar(in)) != EOF) ++ while((c = pgetchar(in)) != EOF) + { + //std::cout << "Lexing char: '" << char(c) << "' " << c << " state: " << state << std::endl; + switch(state) +@@ -190,7 +190,7 @@ POFileReader::tokenize_po(std::istream& + + do { // Read keyword + token.keyword += c; +- } while((c = getchar(in)) != EOF && !isspace(c)); ++ } while((c = pgetchar(in)) != EOF && !isspace(c)); + in.unget(); + + state = READ_CONTENT; +@@ -198,7 +198,7 @@ POFileReader::tokenize_po(std::istream& + break; + + case READ_CONTENT: +- while((c = getchar(in)) != EOF) ++ while((c = pgetchar(in)) != EOF) + { + if (c == '"') { + // Found start of content +@@ -217,7 +217,7 @@ POFileReader::tokenize_po(std::istream& + + case READ_CONTENT_IN_STRING: + if (c == '\\') { +- c = getchar(in); ++ c = pgetchar(in); + if (c != EOF) + { + if (c == 'n') token.content += '\n'; diff --git a/games/pingus/patches/patch-src_tinygettext_po__file__reader.hpp b/games/pingus/patches/patch-src_tinygettext_po__file__reader.hpp new file mode 100644 index 00000000000..8d9a9b3e3a3 --- /dev/null +++ b/games/pingus/patches/patch-src_tinygettext_po__file__reader.hpp @@ -0,0 +1,15 @@ +$NetBSD: patch-src_tinygettext_po__file__reader.hpp,v 1.1 2011/08/14 19:13:03 wiz Exp $ + +Fix build with gcc-4.5. + +--- src/tinygettext/po_file_reader.hpp.orig 2007-08-17 15:39:18.000000000 +0000 ++++ src/tinygettext/po_file_reader.hpp +@@ -52,7 +52,7 @@ public: + void add_token(const Token& token); + void tokenize_po(std::istream& in); + +- inline int getchar(std::istream& in) ++ inline int pgetchar(std::istream& in) + { + int c = in.get(); + if (c == '\n') |