better fix for scope resolution operator and Borland (bug 1592939): don't use it for struct stat but do use it for functions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43699 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -197,17 +197,20 @@ enum wxFileKind
|
|||||||
// to avoid using them as they're not present in earlier versions and
|
// to avoid using them as they're not present in earlier versions and
|
||||||
// always using the native functions spelling is easier than testing for
|
// always using the native functions spelling is easier than testing for
|
||||||
// the versions
|
// the versions
|
||||||
#if defined(__BORLANDC__)
|
#if defined(__BORLANDC__) || defined(__DMC__) || defined(__WATCOMC__)
|
||||||
// Borland doesn't like "struct ::stat" so don't use the scope
|
|
||||||
// resolution operator with it
|
|
||||||
#define wxPOSIX_IDENT(func) func
|
|
||||||
#elif defined(__DMC__) || defined(__WATCOMC__)
|
|
||||||
#define wxPOSIX_IDENT(func) ::func
|
#define wxPOSIX_IDENT(func) ::func
|
||||||
#else // by default assume MSVC-compatible names
|
#else // by default assume MSVC-compatible names
|
||||||
#define wxPOSIX_IDENT(func) _ ## func
|
#define wxPOSIX_IDENT(func) _ ## func
|
||||||
#define wxHAS_UNDERSCORES_IN_POSIX_IDENTS
|
#define wxHAS_UNDERSCORES_IN_POSIX_IDENTS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// at least Borland 5.5 doesn't like "struct ::stat" so don't use the scope
|
||||||
|
// resolution operator present in wxPOSIX_IDENT for it
|
||||||
|
#ifdef __BORLANDC__
|
||||||
|
#define wxPOSIX_STRUCT(s) struct s
|
||||||
|
#else
|
||||||
|
#define wxPOSIX_STRUCT(s) struct wxPOSIX_IDENT(s)
|
||||||
|
#endif
|
||||||
|
|
||||||
// first functions not working with strings, i.e. without ANSI/Unicode
|
// first functions not working with strings, i.e. without ANSI/Unicode
|
||||||
// complications
|
// complications
|
||||||
@@ -267,11 +270,10 @@ enum wxFileKind
|
|||||||
WXDLLIMPEXP_BASE int wxMSLU__wrmdir(const wxChar *name);
|
WXDLLIMPEXP_BASE int wxMSLU__wrmdir(const wxChar *name);
|
||||||
|
|
||||||
WXDLLIMPEXP_BASE int
|
WXDLLIMPEXP_BASE int
|
||||||
wxMSLU__wstat(const wxChar *name,
|
wxMSLU__wstat(const wxChar *name, wxPOSIX_STRUCT(stat) *buffer);
|
||||||
struct wxPOSIX_IDENT(stat) *buffer);
|
|
||||||
WXDLLIMPEXP_BASE int
|
WXDLLIMPEXP_BASE int
|
||||||
wxMSLU__wstati64(const wxChar *name,
|
wxMSLU__wstati64(const wxChar *name,
|
||||||
struct wxPOSIX_IDENT(stati64) *buffer);
|
wxPOSIX_STRUCT(stati64) *buffer);
|
||||||
#endif // Windows compilers with MSLU support
|
#endif // Windows compilers with MSLU support
|
||||||
|
|
||||||
#define wxOpen wxMSLU__wopen
|
#define wxOpen wxMSLU__wopen
|
||||||
|
Reference in New Issue
Block a user