]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
common: add win32/wstring.h
authorLucian Petrut <lpetrut@cloudbasesolutions.com>
Wed, 16 Nov 2022 08:50:14 +0000 (10:50 +0200)
committerLucian Petrut <lpetrut@cloudbasesolutions.com>
Fri, 24 Mar 2023 12:34:04 +0000 (12:34 +0000)
commit6b8b932f5ec038b35070f91022aed595c74a6eef
tree0e7f7a5d4050dc8f245a0a6f439d4802fc7885ec
parenteab8a6d1e2c0f0943f27f6872d02fd0eef32b210
common: add win32/wstring.h

Windows APIs heavily use wchar. ceph-dokan and rbd-wnbd
have some duplicated helpers that convert wstrings to/from
utf8 strings.

To avoid duplication and allow reusing those helpers, we're moving
them to common/win32/wstring.h.

We're using the "win32" subfolder because it's unlikely that this
will ever be used on other platforms.

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
(cherry picked from commit a47caa156a4e667d6b9ff7236cc9148ba37ea772)
src/common/CMakeLists.txt
src/common/win32/wstring.cc [new file with mode: 0644]
src/common/win32/wstring.h [new file with mode: 0644]
src/dokan/ceph_dokan.cc
src/dokan/options.cc
src/dokan/utils.cc
src/dokan/utils.h
src/tools/rbd_wnbd/rbd_wnbd.cc