[Ace-users] compiling ACE on linux with wchar
MAG1301 at gmx.net
Mon Nov 5 10:25:50 CST 2007
I've digged deep inside the dirent configurations and found the
There's a test code for directory parsing functionality in
%ACE_wrappers%/test/Dirent_Test.cpp. In this test the member "d_name"
of the structure "dirent" (#define ACE_DIRENT dirent) is used for
several times. This structure comes from unix systems and is mapped
directly on those systems. On windows systems it is defined in
%ACE_wrappers%/ace/os_include/os_dirent.h because windows doesn't have
a structure like this. The difference is that unix systems always use
char arrays for d_name, windows systems use ACE_TCHAR now (because of
self defined structure). This means that unicode builds on windows
(ACE_USES_WCHAR) have wchar_t arrays for the d_name. At each place in
our productive code (Linux/Windows) we have to differenciate d_name
In the ACE unit tests there is no problem because d_name is always
used in overloaded functions for char and wchar_t. Except the lines
207-213: There you have to use an #ifdef as workaround.
I know about the problem but don't feel capable to solve it in ACE.
Can you please help me?
More information about the Ace-users