Commit 1e9c9c83 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Include <libintl.h> only when really needed

Especially, plugins are not supposed to link with -lintl directly.
parent 6c416be1
...@@ -179,10 +179,6 @@ typedef void *locale_t; ...@@ -179,10 +179,6 @@ typedef void *locale_t;
#define gettext(str) vlc_gettext (str) #define gettext(str) vlc_gettext (str)
#define pgettext(ctx,id) vlc_pgettext(ctx,id) #define pgettext(ctx,id) vlc_pgettext(ctx,id)
#if defined (ENABLE_NLS)
# include <libintl.h>
#endif
#define N_(str) gettext_noop (str) #define N_(str) gettext_noop (str)
#define gettext_noop(str) (str) #define gettext_noop(str) (str)
......
...@@ -191,6 +191,11 @@ int vlc_wclosedir( void *_p_dir ) ...@@ -191,6 +191,11 @@ int vlc_wclosedir( void *_p_dir )
#endif #endif
} }
#ifdef ENABLE_NLS
# undef gettext
# include <libintl.h>
#endif
/** /**
* In-tree plugins share their gettext domain with LibVLC. * In-tree plugins share their gettext domain with LibVLC.
*/ */
......
...@@ -66,6 +66,11 @@ ...@@ -66,6 +66,11 @@
# include <locale.h> # include <locale.h>
#endif #endif
#ifdef ENABLE_NLS
# undef gettext
# include <libintl.h> /* bindtextdomain */
#endif
#ifdef HAVE_DBUS #ifdef HAVE_DBUS
/* used for one-instance mode */ /* used for one-instance mode */
# include <dbus/dbus.h> # include <dbus/dbus.h>
......
...@@ -28,6 +28,11 @@ ...@@ -28,6 +28,11 @@
#include <assert.h> #include <assert.h>
#include <stdarg.h> #include <stdarg.h>
#ifdef ENABLE_NLS
# undef gettext
# include <libintl.h>
#endif
#include "modules/modules.h" #include "modules/modules.h"
#include "config/configuration.h" #include "config/configuration.h"
#include "libvlc.h" #include "libvlc.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment