compilation in Unicode mode works with VC++
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7031 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -35,13 +35,13 @@
|
||||
|
||||
/// separates group and entry names (probably shouldn't be changed)
|
||||
#ifndef wxCONFIG_PATH_SEPARATOR
|
||||
#define wxCONFIG_PATH_SEPARATOR '/'
|
||||
#define wxCONFIG_PATH_SEPARATOR _T('/')
|
||||
#endif
|
||||
|
||||
/// introduces immutable entries
|
||||
// (i.e. the ones which can't be changed from the local config file)
|
||||
#ifndef wxCONFIG_IMMUTABLE_PREFIX
|
||||
#define wxCONFIG_IMMUTABLE_PREFIX '!'
|
||||
#define wxCONFIG_IMMUTABLE_PREFIX _T('!')
|
||||
#endif
|
||||
|
||||
/// should we use registry instead of configuration files under Windows?
|
||||
|
@@ -60,6 +60,65 @@ enum wxSeekMode
|
||||
|
||||
WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// declare our versions of low level file functions: some compilers prepend
|
||||
// underscores to the usual names, some also have Unicode versions of them
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// Microsoft compiler loves underscores, feed them to it
|
||||
#ifdef __VISUALC__
|
||||
// functions
|
||||
#define wxOpen _wopen
|
||||
#define wxClose _close
|
||||
#define wxRead _read
|
||||
#define wxWrite _write
|
||||
#define wxLseek _lseek
|
||||
#define wxFsync _commit
|
||||
#define wxAccess _waccess
|
||||
#define wxEof _eof
|
||||
|
||||
#define wxTell _tell
|
||||
|
||||
#define wxMkdir _wmkdir
|
||||
#define wxRmdir _wrmdir
|
||||
|
||||
#define wxStat _wstat
|
||||
|
||||
// types
|
||||
#define wxStructStat struct _stat
|
||||
|
||||
// constants
|
||||
|
||||
#define O_RDONLY _O_RDONLY
|
||||
#define O_WRONLY _O_WRONLY
|
||||
#define O_RDWR _O_RDWR
|
||||
#define O_EXCL _O_EXCL
|
||||
#define O_CREAT _O_CREAT
|
||||
#define O_BINARY _O_BINARY
|
||||
|
||||
#define S_IFDIR _S_IFDIR
|
||||
#define S_IFREG _S_IFREG
|
||||
#else
|
||||
// functions
|
||||
#define wxOpen open
|
||||
#define wxClose close
|
||||
#define wxRead read
|
||||
#define wxWrite write
|
||||
#define wxLseek lseek
|
||||
#define wxFsync commit
|
||||
#define wxAccess access
|
||||
#define wxEof eof
|
||||
|
||||
#define wxMkdir mkdir
|
||||
#define wxRmdir rmdir
|
||||
|
||||
#define wxTell(fd) lseek(fd, 0, SEEK_CUR)
|
||||
|
||||
// types
|
||||
#define wxStructStat struct stat
|
||||
|
||||
#endif // VC++
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// functions
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -85,9 +85,9 @@ bool IsIidFromList(REFIID riid, const IID *aIids[], size_t nCount);
|
||||
#define IMPLEMENT_IUNKNOWN_METHODS(classname) \
|
||||
STDMETHODIMP classname::QueryInterface(REFIID riid, void **ppv) \
|
||||
{ \
|
||||
wxLogQueryInterface(#classname, riid); \
|
||||
wxLogQueryInterface(_T(#classname), riid); \
|
||||
\
|
||||
if ( IsIidFromList(riid, ms_aIids, WXSIZEOF(ms_aIids)) ) { \
|
||||
if ( IsIidFromList(riid, ms_aIids, WXSIZEOF(ms_aIids)) ) { \
|
||||
*ppv = this; \
|
||||
AddRef(); \
|
||||
\
|
||||
@@ -96,20 +96,20 @@ bool IsIidFromList(REFIID riid, const IID *aIids[], size_t nCount);
|
||||
else { \
|
||||
*ppv = NULL; \
|
||||
\
|
||||
return (HRESULT) E_NOINTERFACE; \
|
||||
return (HRESULT) E_NOINTERFACE; \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
STDMETHODIMP_(ULONG) classname::AddRef() \
|
||||
{ \
|
||||
wxLogAddRef(#classname, m_cRef); \
|
||||
wxLogAddRef(_T(#classname), m_cRef); \
|
||||
\
|
||||
return ++m_cRef; \
|
||||
} \
|
||||
\
|
||||
STDMETHODIMP_(ULONG) classname::Release() \
|
||||
{ \
|
||||
wxLogRelease(#classname, m_cRef); \
|
||||
wxLogRelease(_T(#classname), m_cRef); \
|
||||
\
|
||||
if ( --m_cRef == 0 ) { \
|
||||
delete this; \
|
||||
|
@@ -47,7 +47,7 @@ public:
|
||||
|
||||
// Operators
|
||||
wxTextInputStream& operator>>(wxString& word);
|
||||
wxTextInputStream& operator>>(wxChar& c);
|
||||
wxTextInputStream& operator>>(char& c);
|
||||
wxTextInputStream& operator>>(wxInt16& i);
|
||||
wxTextInputStream& operator>>(wxInt32& i);
|
||||
wxTextInputStream& operator>>(wxUint16& i);
|
||||
@@ -90,7 +90,7 @@ public:
|
||||
|
||||
wxTextOutputStream& operator<<(const wxChar *string);
|
||||
wxTextOutputStream& operator<<(const wxString& string);
|
||||
wxTextOutputStream& operator<<(wxChar c);
|
||||
wxTextOutputStream& operator<<(char c);
|
||||
wxTextOutputStream& operator<<(wxInt16 c);
|
||||
wxTextOutputStream& operator<<(wxInt32 c);
|
||||
wxTextOutputStream& operator<<(wxUint16 c);
|
||||
|
@@ -27,6 +27,10 @@
|
||||
|
||||
#ifdef WX_PRECOMP
|
||||
|
||||
// include <wx/wxchar.h> first to ensure that UNICODE macro is correctly set
|
||||
// _before_ including <windows.h>
|
||||
#include "wx/wxchar.h"
|
||||
|
||||
// include standard Windows headers
|
||||
#if defined(__WXMSW__) && !wxUSE_MFC
|
||||
#include <windows.h>
|
||||
|
Reference in New Issue
Block a user