1 |
|
--- src/pstree.c.orig 2010-04-08 05:20:10.000000000 -0700 |
2 |
|
+++ src/pstree.c 2010-05-18 07:20:57.583839746 -0700 |
3 |
< |
@@ -37,6 +37,10 @@ |
3 |
> |
@@ -37,6 +37,9 @@ |
4 |
|
#include <term.h> |
5 |
|
#include <termios.h> |
6 |
|
#include <langinfo.h> |
7 |
|
+#ifdef __FreeBSD__ |
8 |
– |
+#include <locale.h> |
8 |
|
+#include <limits.h> |
9 |
|
+#endif |
10 |
|
#include <assert.h> |
72 |
|
if (!print_args) |
73 |
|
#ifdef WITH_SELINUX |
74 |
|
add_proc(comm, pid, ppid, st.st_uid, NULL, 0, 0, scontext); |
76 |
– |
@@ -860,6 +896,10 @@ |
77 |
– |
* command-line options, if given. |
78 |
– |
*/ |
79 |
– |
|
80 |
– |
+#ifdef __FreeBSD__ |
81 |
– |
+ /* Actually set the locale because nl_langinfo won't do it. */ |
82 |
– |
+ setlocale(LC_CTYPE, ""); |
83 |
– |
+#endif |
84 |
– |
if (isatty(1) && !strcmp(nl_langinfo(CODESET), "UTF-8")) { |
85 |
– |
/* Use UTF-8 symbols if the locale's character set is UTF-8. */ |
86 |
– |
sym = &sym_utf; |