From 0e448231102ecab3ce01647e98ec156f7bf5b8bb Mon Sep 17 00:00:00 2001 From: Mattia Barbon Date: Wed, 24 Oct 2001 20:56:37 +0000 Subject: [PATCH] Various cygwin compilation fixes. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12161 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/defs.h | 6 ++++++ include/wx/wxchar.h | 3 +++ setup.h.in | 2 ++ src/common/mimecmn.cpp | 6 +++--- src/regex/makefile.g95 | 4 ++++ 5 files changed, 18 insertions(+), 3 deletions(-) diff --git a/include/wx/defs.h b/include/wx/defs.h index 064b94ce47..8a70d08344 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -130,6 +130,12 @@ #include #endif // __WXMAC__ && __DARWIN__ + + #if defined(__CYGWIN__) + #if !defined(wxSIZE_T_IS_UINT) + #define wxSIZE_T_IS_UINT + #endif + #endif #elif defined(applec) || \ defined(THINK_C) || \ (defined(__MWERKS__) && !defined(__INTEL__)) diff --git a/include/wx/wxchar.h b/include/wx/wxchar.h index c185288ce6..5ac03f6416 100644 --- a/include/wx/wxchar.h +++ b/include/wx/wxchar.h @@ -68,6 +68,9 @@ #include #include #include + #elif defined(__CYGWIN__) + #include + #include #endif #elif defined(__VISAGECPP__) && (__IBMCPP__ >= 400) // VisualAge 4.0+ supports TCHAR diff --git a/setup.h.in b/setup.h.in index f6e91fec79..5ad250d7a2 100644 --- a/setup.h.in +++ b/setup.h.in @@ -94,7 +94,9 @@ #endif #undef __WIN95__ +#ifndef __WIN32__ #undef __WIN32__ +#endif #undef __GNUWIN32__ #undef STRICT #undef WINVER diff --git a/src/common/mimecmn.cpp b/src/common/mimecmn.cpp index 8a16ced893..6ee6a7a7fa 100644 --- a/src/common/mimecmn.cpp +++ b/src/common/mimecmn.cpp @@ -474,7 +474,7 @@ wxMimeTypesManager::~wxMimeTypesManager() bool wxMimeTypesManager::Unassociate(wxFileType *ft) { -#if defined(__UNIX__) && !defined(__WXPM__) +#if defined(__UNIX__) && !defined(__WXPM__) && !defined(__CYGWIN__) return m_impl->Unassociate(ft); #else return ft->Unassociate(); @@ -584,7 +584,7 @@ size_t wxMimeTypesManager::EnumAllFileTypes(wxArrayString& mimetypes) void wxMimeTypesManager::Initialize(int mcapStyle, const wxString& sExtraDir) { -#if defined(__UNIX__) && !defined(__WXPM__) +#if defined(__UNIX__) && !defined(__WXPM__) && !defined(__CYGWIN__) EnsureImpl(); m_impl->Initialize(mcapStyle, sExtraDir); @@ -597,7 +597,7 @@ void wxMimeTypesManager::Initialize(int mcapStyle, // and this function clears all the data from the manager void wxMimeTypesManager::ClearData() { -#if defined(__UNIX__) && !defined(__WXPM__) +#if defined(__UNIX__) && !defined(__WXPM__) && !defined(__CYGWIN__) EnsureImpl(); m_impl->ClearData(); diff --git a/src/regex/makefile.g95 b/src/regex/makefile.g95 index 9043156a1d..06c95c8f9c 100644 --- a/src/regex/makefile.g95 +++ b/src/regex/makefile.g95 @@ -1,4 +1,8 @@ +ifeq ($(WXWIN),) +WXWIN=../.. +endif + LIBTARGET=$(WXWIN)/lib/libregex.a OBJECTS= \ -- 2.45.2