]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
Assume <locale.h> exists
authorAlejandro Colomar <alx@kernel.org>
Fri, 2 Dec 2022 16:06:47 +0000 (17:06 +0100)
committerIker Pedrosa <ikerpedrosam@gmail.com>
Mon, 12 Dec 2022 08:16:43 +0000 (09:16 +0100)
ISO C99 requires <locale.h>.

Other files in the project already include <locale.h> unconditionally,
so it's reasonable to assume that it is always available.

Link: <https://github.com/shadow-maint/shadow/pull/600>
Cc: Christian Göttsche <cgzones@googlemail.com>
Cc: Iker Pedrosa <ipedrosa@redhat.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
configure.ac
lib/defines.h

index d0081a30049065fb51e9bb13b105a608f6f68dbf..32a162f1e437b2cf3f3a910b532305e09b3b6a2a 100644 (file)
@@ -39,7 +39,7 @@ dnl Checks for header files.
 AC_CHECK_HEADERS(crypt.h fcntl.h unistd.h sys/time.h utmp.h \
        utmpx.h termios.h termio.h sgtty.h sys/ioctl.h syslog.h paths.h \
        utime.h ulimit.h sys/capability.h sys/random.h sys/resource.h \
-       gshadow.h lastlog.h locale.h rpc/key_prot.h netdb.h acl/libacl.h \
+       gshadow.h lastlog.h rpc/key_prot.h netdb.h acl/libacl.h \
        attr/libattr.h attr/error_context.h)
 
 dnl shadow now uses the libc's shadow implementation
index a849e5a72d4adcb5410db6bc4072e090222871c5..e059944dcbada9885ebab121f7d1934db4c0bb45 100644 (file)
@@ -18,15 +18,7 @@ extern char * textdomain (const char * domainname);
 # define ngettext(Msgid1, Msgid2, N) \
     ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
 #else
-#ifdef HAVE_LOCALE_H
-# include <locale.h>
-#else
-# undef setlocale
-# define setlocale(category, locale)   (NULL)
-# ifndef LC_ALL
-#  define LC_ALL       6
-# endif
-#endif
+#include <locale.h>
 
 #define gettext_noop(String) (String)
 /* #define gettext_def(String) "#define String" */