Remove unnecessary NLS definitions from system.h
authorPanu Matilainen <pmatilai@redhat.com>
Tue, 5 Jan 2010 12:28:47 +0000 (14:28 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Tue, 5 Jan 2010 12:29:48 +0000 (14:29 +0200)
- all uses of dgettext() and friends are already protected by
  appropriate ifdef's, no need to provide dummy defines here
- setlocale() and <locale.h> are required by C89, C99 and POSIX .. assume
  its there and if not, one can disable the whole thing with --disable-nls

configure.ac
system.h

index 75587eb..01cd71f 100644 (file)
@@ -353,7 +353,6 @@ AC_HEADER_STDC
 AC_HEADER_MAJOR
 AC_HEADER_DIRENT
 
-AC_CHECK_HEADERS(locale.h)
 AC_CHECK_HEADERS(limits.h)
 AC_CHECK_HEADERS(fcntl.h getopt.h memory.h)
 
@@ -688,8 +687,6 @@ if test "$with_dmalloc" = yes ; then
   LIBS="$LIBS -ldmalloc"
 fi
 
-AC_CHECK_FUNCS(setlocale)
-
 AC_CHECK_FUNCS(getpassphrase)
 
 AC_CHECK_FUNC(getmntent, AC_DEFINE(HAVE_GETMNTENT, 1, [Define if you have the getmntent() function]), [
index 25f1298..4d7a7d3 100644 (file)
--- a/system.h
+++ b/system.h
@@ -154,25 +154,12 @@ typedef   char * security_context_t;
 extern const char *__progname;
 
 /* Take care of NLS matters.  */
-
-#if HAVE_LOCALE_H
-# include <locale.h>
-#endif
-#if !HAVE_SETLOCALE
-# define setlocale(Category, Locale) /* empty */
-#endif
-
 #if ENABLE_NLS
+# include <locale.h>
 # include <libintl.h>
 # define _(Text) dgettext (PACKAGE, Text)
 #else
-# undef bindtextdomain
-# define bindtextdomain(Domain, Directory) /* empty */
-# undef textdomain
-# define textdomain(Domain) /* empty */
 # define _(Text) Text
-# undef dgettext
-# define dgettext(DomainName, Text) Text
 #endif
 
 #define N_(Text) Text