summaryrefslogtreecommitdiffstats
path: root/gnu
diff options
context:
space:
mode:
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/grep/grep.c6
-rw-r--r--gnu/usr.bin/grep/search.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/gnu/usr.bin/grep/grep.c b/gnu/usr.bin/grep/grep.c
index dc33298..d7edf12 100644
--- a/gnu/usr.bin/grep/grep.c
+++ b/gnu/usr.bin/grep/grep.c
@@ -19,6 +19,9 @@
#include <errno.h>
#include <stdio.h>
+#ifdef __FreeBSD__
+#include <locale.h>
+#endif
#ifndef errno
extern int errno;
@@ -606,6 +609,9 @@ main(argc, argv)
extern char *optarg;
extern int optind;
+#ifdef __FreeBSD__
+ (void) setlocale(LC_CTYPE, "");
+#endif
prog = argv[0];
if (prog && strrchr(prog, '/'))
prog = strrchr(prog, '/') + 1;
diff --git a/gnu/usr.bin/grep/search.c b/gnu/usr.bin/grep/search.c
index 2b89338..5e17d03 100644
--- a/gnu/usr.bin/grep/search.c
+++ b/gnu/usr.bin/grep/search.c
@@ -46,7 +46,7 @@ extern char *memchr();
#define bcopy(s, d, n) memcpy((d), (s), (n))
#endif
-#ifdef isascii
+#if defined(isascii) && !defined(__FreeBSD__)
#define ISALNUM(C) (isascii(C) && isalnum(C))
#define ISUPPER(C) (isascii(C) && isupper(C))
#else
OpenPOWER on IntegriCloud