diff options
author | David Schleef <ds@schleef.org> | 2004-04-28 23:26:06 +0000 |
---|---|---|
committer | David Schleef <ds@schleef.org> | 2004-04-28 23:26:06 +0000 |
commit | a2a974bfaee012cc6020382e86810bfea0df731d (patch) | |
tree | 13012a301794fe8a15914cd844fb07197ce8dba9 /gst/gst-i18n-lib.h | |
parent | d27cb929f38395734bd76af94d2263b30b5b9a78 (diff) |
A bunch of portability fixes, derived from Steve Lhomme's MSVC
Original commit message from CVS:
A bunch of portability fixes, derived from Steve Lhomme's MSVC
patch (bug #141317):
* gst/gst-i18n-lib.h: Allow disabling gettext.
* gst/gstatomic_impl.h: disable warning when it's dumb.
* gst/gstclock.c: fix include
* gst/gstcompat.h: fix variadic macro
* gst/gstinfo.c: fix include
* gst/gstmacros.h: add defines for inlines on MSVC
* gst/gstplugin.c: fix includes
* gst/gstregistry.c: fix includes
* gst/gstregistry.h: use S_IREAD, etc., if S_IRUSR isn't defined
* gst/gstsystemclock.c: fix include
* gst/gsttrace.c: (gst_trace_new), (gst_trace_text_flush): use
S_IREAD if S_IRUSR isn't defined. fix use of non-portable functions
* gst/registries/gstxmlregistry.c:
(gst_xml_registry_parse_element_factory): fix use of non-portable
functions
* libs/gst/control/dparam.h: Remove trailing comma in enum definition
* libs/gst/control/dparammanager.h: same
Diffstat (limited to 'gst/gst-i18n-lib.h')
-rw-r--r-- | gst/gst-i18n-lib.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/gst/gst-i18n-lib.h b/gst/gst-i18n-lib.h index f5db797d12..a68d505043 100644 --- a/gst/gst-i18n-lib.h +++ b/gst/gst-i18n-lib.h @@ -23,15 +23,25 @@ #ifndef __GST_I18N_LIB_H__ #define __GST_I18N_LIB_H__ -#include "gettext.h" /* included with gettext distribution and copied */ - -#ifndef GETTEXT_PACKAGE -#error You must define GETTEXT_PACKAGE before including this header. +#ifndef GST_VERSION +#error You must include config.h before including this header. #endif +#ifdef ENABLE_NLS + +#include "gettext.h" /* included with gettext distribution and copied */ + /* we want to use shorthand _() for translating and N_() for marking */ #define _(String) dgettext (GETTEXT_PACKAGE, String) #define N_(String) gettext_noop (String) /* FIXME: if we need it, we can add Q_ as well, like in glib */ +#else + +#define GETTEXT_PACKAGE NULL +#define _(String) String +#define N_(String) String + +#endif + #endif /* __GST_I18N_LIB_H__ */ |