From ec1aa1e6a7468ad92f02dc82087b9605bfdbb01d Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Sun, 13 Mar 2005 13:36:04 +0000 Subject: [PATCH] configure test for HAVE_ICONV_H, HAVE_LOCALE_H and HAVE_LANGINFO_H still no test for HAVE_ICONV git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@856 423420c4-83ab-492f-b58f-81f9feb106b5 --- configure.ac | 3 +++ doc/ChangeLog | 1 + rdesktop.c | 4 ++++ rdp.c | 12 +++++++----- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 6a35ba1..8dd502c 100644 --- a/configure.ac +++ b/configure.ac @@ -20,6 +20,9 @@ AC_CHECK_HEADER(sys/select.h, AC_DEFINE(HAVE_SYS_SELECT_H)) AC_CHECK_HEADER(sys/modem.h, AC_DEFINE(HAVE_SYS_MODEM_H)) AC_CHECK_HEADER(sys/filio.h, AC_DEFINE(HAVE_SYS_FILIO_H)) AC_CHECK_HEADER(sys/strtio.h, AC_DEFINE(HAVE_SYS_STRTIO_H)) +AC_CHECK_HEADER(locale.h, AC_DEFINE(HAVE_LOCALE_H)) +AC_CHECK_HEADER(langinfo.h, AC_DEFINE(HAVE_LANGINFO_H)) +AC_CHECK_HEADER(iconv.h, AC_DEFINE(HAVE_ICONV_H)) rpath="" diff --git a/doc/ChangeLog b/doc/ChangeLog index aefba2a..50ee5c4 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -2,6 +2,7 @@ rdesktop (1.?.?) * persistent bitmap cache optimisations * support for more RDP-orders (ellipse, polygon) * libao sound-driver (for Mac OSX and others) + * Unicode support for transmitted strings/filenames rdesktop (1.4.0) * Basic disk-, parallel-, printer- and serial-redirection diff --git a/rdesktop.c b/rdesktop.c index dd185ce..62f7cba 100644 --- a/rdesktop.c +++ b/rdesktop.c @@ -31,9 +31,13 @@ #include "rdesktop.h" #ifdef HAVE_ICONV +#ifdef HAVE_LOCALE_H #include +#endif +#ifdef HAVE_LANGINFO_H #include #endif +#endif #ifdef EGD_SOCKET #include /* socket connect */ diff --git a/rdp.c b/rdp.c index 83b62c7..7e9164f 100644 --- a/rdp.c +++ b/rdp.c @@ -23,9 +23,11 @@ #include #include "rdesktop.h" +#ifdef HAVE_ICONV #ifdef HAVE_ICONV_H #include #endif +#endif extern uint16 g_mcs_userid; extern char g_username[64]; @@ -148,11 +150,11 @@ rdp_send_data(STREAM s, uint8 data_pdu_type) void rdp_out_unistr(STREAM s, char *string, int len) { -#ifdef HAVE_ICONV +#ifdef HAVE_ICONV size_t ibl = strlen(string), obl = len + 2; static iconv_t iconv_h = (iconv_t)-1; char *pin = string, *pout; -#ifdef B_ENDIAN +#ifdef B_ENDIAN char ss[4096]; // FIXME: global MAX_BUF_SIZE macro need pout = ss; @@ -189,7 +191,7 @@ rdp_out_unistr(STREAM s, char *string, int len) return; } -#ifdef B_ENDIAN +#ifdef B_ENDIAN swab(ss, s->p, len + 4); #endif @@ -217,11 +219,11 @@ rdp_out_unistr(STREAM s, char *string, int len) int rdp_in_unistr(STREAM s, char *string, int uni_len) { -#ifdef HAVE_ICONV +#ifdef HAVE_ICONV size_t ibl = uni_len, obl = uni_len; char *pin, *pout = string; static iconv_t iconv_h = (iconv_t)-1; -#ifdef B_ENDIAN +#ifdef B_ENDIAN char ss[4096]; // FIXME: global MAX_BUF_SIZE macro need swab(s->p, ss, uni_len);