chiark / gitweb /
libuv: Update from 1.20.0 to 1.20.1
[termux-packages] / packages / psmisc / pstree.patch
1 Default to UTF-8 - may be overridden by command line flags.
2
3 diff -u -r ../psmisc-22.21/src/pstree.c ./src/pstree.c
4 --- ../psmisc-22.21/src/pstree.c        2014-02-02 06:59:07.000000000 +0100
5 +++ ./src/pstree.c      2014-06-30 18:35:12.064021186 +0200
6 @@ -36,7 +36,9 @@
7  #include <curses.h>
8  #include <term.h>
9  #include <termios.h>
10 -#include <langinfo.h>
11 +#ifndef __ANDROID__
12 +# include <langinfo.h>
13 +#endif
14  #include <assert.h>
15  #include <sys/types.h>
16  #include <sys/stat.h>
17 @@ -1087,6 +1089,10 @@
18       * command-line options, if given.
19       */
20  
21 +#ifdef __ANDROID__
22 +    /* Droids love unicode */
23 +    sym = &sym_utf;
24 +#else
25      if (isatty(1) && !strcmp(nl_langinfo(CODESET), "UTF-8")) {
26          /* Use UTF-8 symbols if the locale's character set is UTF-8. */
27          sym = &sym_utf;
28 @@ -1106,6 +1112,7 @@
29          /* Otherwise, fall back to ASCII. */
30          sym = &sym_ascii;
31      }
32 +#endif
33  
34  #ifdef WITH_SELINUX
35      while ((c =