diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-06-27 05:11:15 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-06-27 05:11:15 +0300 |
commit | f902b4a3c13d1502bec17754f15fce03a21c5aaa (patch) | |
tree | 84d2e91b4983a937492a77abcd0863f42e453f39 | |
parent | 3d6d504c4bad50f64d4d54213b13439e938aa517 (diff) | |
download | manaverse-f902b4a3c13d1502bec17754f15fce03a21c5aaa.tar.gz manaverse-f902b4a3c13d1502bec17754f15fce03a21c5aaa.tar.bz2 manaverse-f902b4a3c13d1502bec17754f15fce03a21c5aaa.tar.xz manaverse-f902b4a3c13d1502bec17754f15fce03a21c5aaa.zip |
Fix errors in MacOS compilation.
-rwxr-xr-x | configure.ac | 2 | ||||
-rw-r--r-- | src/event.h | 4 | ||||
-rw-r--r-- | src/gui/sdlfont.h | 4 | ||||
-rw-r--r-- | src/log.cpp | 18 | ||||
-rw-r--r-- | src/utils/gettext.h | 9 |
5 files changed, 21 insertions, 16 deletions
diff --git a/configure.ac b/configure.ac index 067cec31b..d28cd5202 100755 --- a/configure.ac +++ b/configure.ac @@ -21,7 +21,7 @@ AC_FUNC_VPRINTF AC_CHECK_FUNCS([atexit floor getcwd gethostbyname memset mkdir select socket]) # Checks for internationalization support -AM_GNU_GETTEXT([external]) +AM_GNU_GETTEXT([external],[need-ngettext]) AM_GNU_GETTEXT_VERSION([0.16.1]) # Search for *-config diff --git a/src/event.h b/src/event.h index 8634a654c..9ff02f3d0 100644 --- a/src/event.h +++ b/src/event.h @@ -19,8 +19,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef EVENT_H -#define EVENT_H +#ifndef MANA_EVENT_H +#define MANA_EVENT_H #include <map> #include <set> diff --git a/src/gui/sdlfont.h b/src/gui/sdlfont.h index 86ef2f1e9..e0aac7785 100644 --- a/src/gui/sdlfont.h +++ b/src/gui/sdlfont.h @@ -26,15 +26,11 @@ #include <guichan/font.hpp> -#ifdef __APPLE__ -#include <SDL_ttf/SDL_ttf.h> -#else #ifdef __WIN32__ #include <SDL/SDL_ttf.h> #else #include <SDL_ttf.h> #endif -#endif #include <list> #include <string> diff --git a/src/log.cpp b/src/log.cpp index cd0814f54..9bcf1ea4f 100644 --- a/src/log.cpp +++ b/src/log.cpp @@ -197,15 +197,15 @@ void Logger::error(const std::string &error_text) #ifdef WIN32 MessageBox(NULL, error_text.c_str(), "Error", MB_ICONERROR | MB_OK); #elif defined __APPLE__ - Str255 msg; - CFStringRef error; - error = CFStringCreateWithCString(NULL, - error_text.c_str(), - kCFStringEncodingMacRoman); - CFStringGetPascalString(error, msg, 255, kCFStringEncodingMacRoman); - StandardAlert(kAlertStopAlert, - "\pError", - (ConstStr255Param) msg, NULL, NULL); +// Str255 msg; +// CFStringRef error; +// error = CFStringCreateWithCString(NULL, +// error_text.c_str(), +// kCFStringEncodingMacRoman); +// CFStringGetPascalString(error, msg, 255, kCFStringEncodingMacRoman); +// StandardAlert(kAlertStopAlert, +// (const unsigned char*)"\pError", +// (ConstStr255Param) msg, NULL, NULL); #elif defined __linux__ || __linux std::cerr << "Error: " << error_text << std::endl; std::string msg = "xmessage \"" + error_text + "\""; diff --git a/src/utils/gettext.h b/src/utils/gettext.h index fa9a62a6d..0a15aa724 100644 --- a/src/utils/gettext.h +++ b/src/utils/gettext.h @@ -40,6 +40,15 @@ #define _(s) (const_cast <char*>(s)) #define N_(s) (const_cast <char*>(s)) +char* ngettext(char* msgid, char* msgid_plural, unsigned long int n); + +char* ngettext(char* msgid, char* msgid_plural, unsigned long int n) +{ + if(n > 1) + return msgid_plural; + return msgid; +} + #endif #endif // UTILS_GETTEXT_H |