ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/pack/freebsd/sysutils/psmisc/files/patch-src-pstree.c
(Generate patch)

Comparing freebsd/sysutils/psmisc/files/patch-src-pstree.c (file contents):
Revision 281 by douglas, 2010-05-18T08:39:43-07:00 vs.
Revision 282 by douglas, 2010-05-18T22:41:26-07:00

# Line 1 | Line 1
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>
# Line 73 | Line 72
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;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines