Патчим proftpd на тему отображения в ftptop нормальных русских (ну, или японских, в общем utf8 :) букв
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
--- proftpd-1.3.2-orig/utils/ftptop.c 2009-03-05 16:43:35.000000000 +0500 +++ proftpd-1.3.2/utils/ftptop.c 2009-03-09 11:54:51.000000000 +0500 @@ -37,6 +37,7 @@ #include <signal.h>
#include <stdlib.h>
#include <time.h>
+#include <locale.h>
static const char *program = "ftptop";
@@ -553,6 +554,8 @@ signal(SIGINT, finish);
signal(SIGTERM, finish);
+ setlocale(LC_ALL,""); + /* Initialize the display. */
initscr();
cbreak();
--- proftpd-1.3.2-orig/configure.in 2009-03-05 16:43:35.000000000 +0500 +++ proftpd-1.3.2/configure.in 2009-03-09 11:23:51.000000000 +0500 @@ -1720,9 +1720,14 @@ fi
if test x"$ac_cv_header_ncurses_h" = xyes; then
- AC_CHECK_LIB(ncurses, initscr, - [ CURSES_LIBS="-lncurses" + AC_CHECK_LIB(ncursesw, initscr, + [ CURSES_LIBS="-lncursesw" AC_DEFINE(HAVE_LIBNCURSES, 1, [Define if you have ncurses])
+ ], + [ AC_CHECK_LIB(ncurses, initscr, + [ CURSES_LIBS="-lncurses" + AC_DEFINE(HAVE_LIBNCURSES, 1, [Define if you have ncurses]) + ]) ])
fi
|
после применения патча также нужно прогнать (в смысле запустить) ./autoconf, чтобы он перегенерил configure.
баг и обсуждение на багтрекере proftpd
в данный момент девелоперы proftpd активно фиксят поддержку utf8. так что скоро ждем в релизе :)
еще у него была проблемка с мусклом при включенном NLS. вылечил так:
1
2
3
4
5
6
7
8
9
10
11
|
--- proftpd-1.3.2-orig/contrib/mod_sql_mysql.c 2009-03-05 16:43:35.000000000 +0500 +++ proftpd-1.3.2/contrib/mod_sql_mysql.c 2009-03-05 16:44:02.000000000 +0500 @@ -440,7 +440,7 @@ return _build_error(cmd, conn);
}
-#ifdef PR_USE_NLS +#ifdef PR_USE_NLS_SQL if (pr_encode_get_encoding() != NULL) {
# if MYSQL_VERSION_ID >= 50007
|