aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorTim J. Robbins <tjr@FreeBSD.org>2004-07-04 10:22:50 +0000
committerTim J. Robbins <tjr@FreeBSD.org>2004-07-04 10:22:50 +0000
commit1188285e9b00018e8991b6f7e89ee4058dd2b293 (patch)
tree71d123f63337c507ccf84068a2eec858a51ad90a /gnu
parent903ac7c2197bed82a26322665cfda87b50396482 (diff)
downloadsrc-1188285e9b00018e8991b6f7e89ee4058dd2b293.tar.gz
src-1188285e9b00018e8991b6f7e89ee4058dd2b293.zip
Ignore ENABLE_NLS when deciding whether we can use setlocale().
Use the same shortcut as glibc to test for the "C" or "POSIX" locale.
Notes
Notes: svn path=/head/; revision=131560
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/grep/hard-locale.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gnu/usr.bin/grep/hard-locale.c b/gnu/usr.bin/grep/hard-locale.c
index 1c75b390a684..9c5da2b3ea8b 100644
--- a/gnu/usr.bin/grep/hard-locale.c
+++ b/gnu/usr.bin/grep/hard-locale.c
@@ -15,6 +15,8 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+/* $FreeBSD$ */
+
#if HAVE_CONFIG_H
# include <config.h>
#endif
@@ -51,7 +53,7 @@ char *alloca ();
int
hard_locale (int category)
{
-#if ! (defined ENABLE_NLS && HAVE_SETLOCALE)
+#if ! HAVE_SETLOCALE
return 0;
#else
@@ -60,7 +62,7 @@ hard_locale (int category)
if (p)
{
-# if defined __GLIBC__ && __GLIBC__ >= 2
+# if defined(__FreeBSD__) || (defined __GLIBC__ && __GLIBC__ >= 2)
if (strcmp (p, "C") == 0 || strcmp (p, "POSIX") == 0)
hard = 0;
# else