From 67fade3398f9c35a8e042749ed340c898f7e7bdd Mon Sep 17 00:00:00 2001 From: Mattia Barbon Date: Sat, 16 Feb 2002 20:20:41 +0000 Subject: [PATCH 1/1] Fix Cygwin and MinGW compilation git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14260 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/dircmn.cpp | 4 +++- src/msw/volume.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/common/dircmn.cpp b/src/common/dircmn.cpp index 8591612324..074cd75f9e 100644 --- a/src/common/dircmn.cpp +++ b/src/common/dircmn.cpp @@ -56,7 +56,9 @@ bool wxDir::HasFiles(const wxString& spec) } // we have a (much) faster version for Unix -#if !defined(__UNIX_LIKE__) || defined(__WXMAC__) +// MBN: Cygwin should use the Unix version, but with the current build sistem +// this is painful +#if defined(__CYGWIN__) || !defined(__UNIX_LIKE__) || defined(__WXMAC__) bool wxDir::HasSubDirs(const wxString& spec) { diff --git a/src/msw/volume.cpp b/src/msw/volume.cpp index 64c75ed284..11fcf168e5 100644 --- a/src/msw/volume.cpp +++ b/src/msw/volume.cpp @@ -28,6 +28,8 @@ #endif #ifndef WX_PRECOMP +#include +#include #endif // WX_PRECOMP #include "wx/dir.h" @@ -388,7 +390,7 @@ wxArrayString wxFSVolume::GetVolumes(int flagsSet, int flagsUnset) while (*pVol) { FilteredAdd(list, pVol, flagsSet, flagsUnset); - pVol = pVol + _tcslen(pVol) + 1; + pVol = pVol + wxStrlen(pVol) + 1; } // Cleanup. -- 2.45.2