mirror of
https://github.com/tmate-io/tmate-ssh-server.git
synced 2020-11-18 19:53:51 -08:00
Merge branch 'obsd-master'
Conflicts: tmux.c
This commit is contained in:
commit
5fc5c03dad
14
tmux.c
14
tmux.c
@ -23,6 +23,8 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <event.h>
|
#include <event.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
#include <getopt.h>
|
||||||
|
#include <langinfo.h>
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -190,10 +192,14 @@ main(int argc, char **argv)
|
|||||||
const char *s;
|
const char *s;
|
||||||
int opt, flags, keys;
|
int opt, flags, keys;
|
||||||
|
|
||||||
if (setlocale(LC_CTYPE, "en_US.UTF-8") == NULL)
|
if (setlocale(LC_CTYPE, "en_US.UTF-8") == NULL) {
|
||||||
setlocale(LC_CTYPE, "");
|
if (setlocale(LC_CTYPE, "") == NULL)
|
||||||
if (wcwidth(0xfffd) != 1)
|
errx(1, "invalid LC_ALL, LC_CTYPE or LANG");
|
||||||
errx(1, "no UTF-8 locale; please set LC_CTYPE");
|
s = nl_langinfo(CODESET);
|
||||||
|
if (strcasecmp(s, "UTF-8") != 0 &&
|
||||||
|
strcasecmp(s, "UTF8") != 0)
|
||||||
|
errx(1, "need UTF-8 locale (LC_CTYPE) but have %s", s);
|
||||||
|
}
|
||||||
|
|
||||||
setlocale(LC_TIME, "");
|
setlocale(LC_TIME, "");
|
||||||
tzset();
|
tzset();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user