diff options
-rw-r--r-- | CMake/apti18n.h.in | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/CMake/apti18n.h.in b/CMake/apti18n.h.in index 192979590..de9c84965 100644 --- a/CMake/apti18n.h.in +++ b/CMake/apti18n.h.in @@ -2,6 +2,9 @@ /* Internationalization macros for apt. This header should be included last in each C file. */ +#ifndef APT_I18N_H +#define APT_I18N_H + // Set by autoconf #cmakedefine USE_NLS @@ -19,11 +22,13 @@ # define N_(x) x #else // apt will not use any gettext -# define setlocale(a, b) -# define textdomain(a) -# define bindtextdomain(a, b) +extern "C" inline char* setlocale(int, const char*) throw() { return nullptr; } +extern "C" inline char* textdomain(const char*) throw() { return nullptr; } +extern "C" inline char* bindtextdomain(const char*, const char*) throw() { return nullptr; } +extern "C" inline char* dgettext(const char*, const char* msg) throw() { return const_cast<char*>(msg); } # define _(x) x # define P_(msg,plural,n) (n == 1 ? msg : plural) # define N_(x) x -# define dgettext(d, m) m +#endif + #endif |