summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-22 01:40:45 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-22 01:40:45 -0400
commit3c5b5fbc0a5f7d1652c6b59f2ae324f725662a0e (patch)
treea1fe4d021409d933585a9e09eaa59bae26bc7cbb
parent348aae747806d74302e85255e896c407adad3ca4 (diff)
downloadfork-ledger-3c5b5fbc0a5f7d1652c6b59f2ae324f725662a0e.tar.gz
fork-ledger-3c5b5fbc0a5f7d1652c6b59f2ae324f725662a0e.tar.bz2
fork-ledger-3c5b5fbc0a5f7d1652c6b59f2ae324f725662a0e.zip
Fix for systems that don't build with gettext
-rw-r--r--src/main.cc2
-rw-r--r--src/system.hh1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/main.cc b/src/main.cc
index 89a438c7..4f99821a 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -75,7 +75,9 @@ int main(int argc, char * argv[], char * envp[])
std::signal(SIGINT, sigint_handler);
std::signal(SIGPIPE, sigpipe_handler);
+#if defined(HAVE_GETTEXT)
::textdomain("ledger");
+#endif
// Create the session object, which maintains nearly all state relating to
// this invocation of Ledger; and register all known journal parsers.
diff --git a/src/system.hh b/src/system.hh
index b9f6b96f..a6aef3a2 100644
--- a/src/system.hh
+++ b/src/system.hh
@@ -139,7 +139,6 @@ typedef std::ostream::pos_type ostream_pos_type;
#include "gettext.h"
#define _(str) gettext(str)
#else
-#define textdomain(name)
#define _(str) str
#endif