]> git.sesse.net Git - vlc/commitdiff
Include <libintl.h> only when really needed
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 16 Apr 2009 08:23:46 +0000 (11:23 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 16 Apr 2009 08:23:46 +0000 (11:23 +0300)
Especially, plugins are not supposed to link with -lintl directly.

include/vlc_fixups.h
src/extras/libc.c
src/libvlc.c
src/modules/entry.c

index 983ebd8286bfd4379452260bac97ac90701d34f9..ead019dcb93b44981b4e84c6e2acdc530c09d389 100644 (file)
@@ -179,10 +179,6 @@ typedef void *locale_t;
 #define gettext(str)     vlc_gettext (str)
 #define pgettext(ctx,id) vlc_pgettext(ctx,id)
 
-#if defined (ENABLE_NLS)
-# include <libintl.h>
-#endif
-
 #define N_(str) gettext_noop (str)
 #define gettext_noop(str) (str)
 
index 28ed517d5e2c122b4bc7b4138c86408fff324de0..8e36fe08d93aa9a7411a01a704d50b8086467290 100644 (file)
@@ -191,6 +191,11 @@ int vlc_wclosedir( void *_p_dir )
 #endif
 }
 
+#ifdef ENABLE_NLS
+# undef gettext
+# include <libintl.h>
+#endif
+
 /**
  * In-tree plugins share their gettext domain with LibVLC.
  */
index 75041c14d76d875a6f29734467fe7009543b6b8d..f6d6be839f313499ff001b9a2ad2b00482855994 100644 (file)
 #   include <locale.h>
 #endif
 
+#ifdef ENABLE_NLS
+# undef gettext
+# include <libintl.h> /* bindtextdomain */
+#endif
+
 #ifdef HAVE_DBUS
 /* used for one-instance mode */
 #   include <dbus/dbus.h>
index a9a7e7d269e7f613bf14c14be550f2058c3cdfc7..dd83550158987cdcb6835f016f163fee00aaaca7 100644 (file)
 #include <assert.h>
 #include <stdarg.h>
 
+#ifdef ENABLE_NLS
+# undef gettext
+# include <libintl.h>
+#endif
+
 #include "modules/modules.h"
 #include "config/configuration.h"
 #include "libvlc.h"