From: John Wolfe Date: Tue, 13 Sep 2022 17:31:15 +0000 (-0700) Subject: Changes to common source files not applicable to open-vm-tools. X-Git-Tag: stable-12.2.0~88 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f1e30c3cb3b698a91de4966206350df2e08be128;p=thirdparty%2Fopen-vm-tools.git Changes to common source files not applicable to open-vm-tools. --- diff --git a/open-vm-tools/services/plugins/dndcp/stringxx/string.cc b/open-vm-tools/services/plugins/dndcp/stringxx/string.cc index c76da7378..9b0390c2d 100644 --- a/open-vm-tools/services/plugins/dndcp/stringxx/string.cc +++ b/open-vm-tools/services/plugins/dndcp/stringxx/string.cc @@ -400,6 +400,33 @@ string::operator const ubstr_t() return ubstr_t(GetUtf16Cache()); } + +/* + *----------------------------------------------------------------------------- + * + * utf::string::t_str -- + * + * Get the TCHAR representation of this string. + * + * Results: + * The TCHAR representation. + * + * Side effects: + * None + * + *----------------------------------------------------------------------------- + */ + +const TCHAR* +string::t_str() const +{ +#ifdef UNICODE + return w_str(); +#else + return c_str(); +#endif +} + #endif diff --git a/open-vm-tools/services/plugins/dndcp/stringxx/string.hh b/open-vm-tools/services/plugins/dndcp/stringxx/string.hh index 40457c43b..ec60f5bfa 100644 --- a/open-vm-tools/services/plugins/dndcp/stringxx/string.hh +++ b/open-vm-tools/services/plugins/dndcp/stringxx/string.hh @@ -152,6 +152,9 @@ public: const char *c_str() const; const utf16_t *w_str() const; const Glib::ustring& ustr() const; +#ifdef _WIN32 + const TCHAR* t_str() const; +#endif // Mapping functions to Glib::ustring void swap(string &s);