From bb5a951418acd22d69a7f1973319f47190fbac79 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 4 Mar 2012 20:31:42 +0000 Subject: [PATCH] Use __WINDOWS__ for OS checks and __WXMSW__ for GUI checks (round 2). This is continuation of r70796 and serves the same purpose. Closes #14065, #14066. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70808 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/atomic.h | 2 +- include/wx/config.h | 2 +- include/wx/dde.h | 4 ++-- include/wx/iconloc.h | 6 +++--- include/wx/joystick.h | 2 +- include/wx/listctrl.h | 2 +- include/wx/statusbr.h | 2 +- samples/dll/my_dll.cpp | 4 ++-- samples/dll/wx_exe.cpp | 4 ++-- samples/oleauto/oleauto.cpp | 2 +- samples/regtest/regtest.cpp | 2 +- samples/toolbar/toolbar.cpp | 2 +- src/common/msgout.cpp | 4 ++-- src/common/socket.cpp | 2 +- src/common/wincmn.cpp | 2 +- src/generic/dirctrlg.cpp | 12 ++++++------ src/generic/filectrlg.cpp | 2 +- src/msw/joystick.cpp | 6 ++++++ tests/archive/archivetest.cpp | 10 +++++----- tests/benchmarks/strings.cpp | 4 ++-- tests/exec/exec.cpp | 2 +- tests/file/dir.cpp | 10 +++++----- tests/filename/filenametest.cpp | 12 ++++++------ tests/fswatcher/fswatchertest.cpp | 4 ++-- tests/interactive/output.cpp | 2 +- tests/misc/dynamiclib.cpp | 6 +++--- tests/net/ipc.cpp | 2 +- tests/streams/largefile.cpp | 8 ++++---- tests/streams/textstreamtest.cpp | 2 +- tests/strings/vararg.cpp | 2 +- tests/strings/vsnprintf.cpp | 2 +- tests/test.cpp | 2 +- tests/xlocale/xlocale.cpp | 2 +- 33 files changed, 69 insertions(+), 63 deletions(-) diff --git a/include/wx/atomic.h b/include/wx/atomic.h index 9b7efacd68..250ca27f19 100644 --- a/include/wx/atomic.h +++ b/include/wx/atomic.h @@ -43,7 +43,7 @@ inline wxUint32 wxAtomicDec (wxUint32 &value) } -#elif defined(__WXMSW__) +#elif defined(__WINDOWS__) // include standard Windows headers #include "wx/msw/wrapwin.h" diff --git a/include/wx/config.h b/include/wx/config.h index 282e3960ff..54e821d918 100644 --- a/include/wx/config.h +++ b/include/wx/config.h @@ -22,7 +22,7 @@ // under Windows we prefer to use the native implementation but can be forced // to use the file-based one -#if defined(__WXMSW__) && wxUSE_CONFIG_NATIVE +#if defined(__WINDOWS__) && wxUSE_CONFIG_NATIVE #include "wx/msw/regconf.h" #define wxConfig wxRegConfig #elif defined(__WXOS2__) && wxUSE_CONFIG_NATIVE diff --git a/include/wx/dde.h b/include/wx/dde.h index cf5af6743e..0f74768f2e 100644 --- a/include/wx/dde.h +++ b/include/wx/dde.h @@ -22,10 +22,10 @@ WX_DECLARE_USER_EXPORTED_LIST(wxDDEClient, wxDDEClientList, WXDLLIMPEXP_BASE); WX_DECLARE_USER_EXPORTED_LIST(wxDDEServer, wxDDEServerList, WXDLLIMPEXP_BASE); WX_DECLARE_USER_EXPORTED_LIST(wxDDEConnection, wxDDEConnectionList, WXDLLIMPEXP_BASE); -#if defined(__WXMSW__) +#if defined(__WINDOWS__) #include "wx/msw/dde.h" #else - #error DDE is only supported on MSW + #error DDE is only supported under Windows #endif #endif diff --git a/include/wx/iconloc.h b/include/wx/iconloc.h index dcccca3274..d81e32700b 100644 --- a/include/wx/iconloc.h +++ b/include/wx/iconloc.h @@ -39,9 +39,9 @@ private: wxString m_filename; }; -// under MSW the same file may contain several icons so we also store the +// under Windows the same file may contain several icons so we also store the // index of the icon -#if defined(__WXMSW__) +#if defined(__WINDOWS__) class WXDLLIMPEXP_BASE wxIconLocation : public wxIconLocationBase { @@ -65,7 +65,7 @@ wxIconLocation::wxIconLocation(const wxString& file, int num) SetIndex(num); } -#else // !MSW +#else // !__WINDOWS__ // must be a class because we forward declare it as class class WXDLLIMPEXP_BASE wxIconLocation : public wxIconLocationBase diff --git a/include/wx/joystick.h b/include/wx/joystick.h index 8978710672..569e3d80b2 100644 --- a/include/wx/joystick.h +++ b/include/wx/joystick.h @@ -16,7 +16,7 @@ #if wxUSE_JOYSTICK -#if defined(__WXMSW__) +#if defined(__WINDOWS__) #include "wx/msw/joystick.h" #elif defined(__WXMOTIF__) #include "wx/unix/joystick.h" diff --git a/include/wx/listctrl.h b/include/wx/listctrl.h index ccf2a0548f..de43556b2c 100644 --- a/include/wx/listctrl.h +++ b/include/wx/listctrl.h @@ -28,7 +28,7 @@ extern WXDLLIMPEXP_DATA_CORE(const char) wxListCtrlNameStr[]; // include the wxListCtrl class declaration // ---------------------------------------------------------------------------- -#if defined(__WIN32__) && !defined(__WXUNIVERSAL__) +#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) #include "wx/msw/listctrl.h" #elif defined(__WXMAC__) && !defined(__WXUNIVERSAL__) && wxOSX_USE_CARBON #include "wx/osx/listctrl.h" diff --git a/include/wx/statusbr.h b/include/wx/statusbr.h index fca6246d9a..3567ba3205 100644 --- a/include/wx/statusbr.h +++ b/include/wx/statusbr.h @@ -234,7 +234,7 @@ protected: #if defined(__WXUNIVERSAL__) #define wxStatusBarUniv wxStatusBar #include "wx/univ/statusbr.h" -#elif defined(__WIN32__) && wxUSE_NATIVE_STATUSBAR +#elif defined(__WXMSW__) && wxUSE_NATIVE_STATUSBAR #include "wx/msw/statusbar.h" #elif defined(__WXMAC__) #define wxStatusBarMac wxStatusBar diff --git a/samples/dll/my_dll.cpp b/samples/dll/my_dll.cpp index bfd6ed508f..3aa93e9708 100644 --- a/samples/dll/my_dll.cpp +++ b/samples/dll/my_dll.cpp @@ -22,8 +22,8 @@ #pragma hdrstop #endif -#ifndef __WXMSW__ - #error "This sample is MSW-only" +#ifndef __WINDOWS__ + #error "This sample is Windows-only" #endif #include "wx/app.h" diff --git a/samples/dll/wx_exe.cpp b/samples/dll/wx_exe.cpp index a4b5263123..c48d674b31 100644 --- a/samples/dll/wx_exe.cpp +++ b/samples/dll/wx_exe.cpp @@ -31,8 +31,8 @@ #include "wx/stattext.h" #include "wx/button.h" -#ifndef __WXMSW__ - #error "This sample is MSW-only" +#ifndef __WINDOWS__ + #error "This sample is Windows-only" #endif #ifdef WXUSINGDLL diff --git a/samples/oleauto/oleauto.cpp b/samples/oleauto/oleauto.cpp index 2fdcf0d908..1bd9e97b6b 100644 --- a/samples/oleauto/oleauto.cpp +++ b/samples/oleauto/oleauto.cpp @@ -32,7 +32,7 @@ #include "wx/msw/ole/automtn.h" -#ifndef __WXMSW__ +#ifndef __WINDOWS__ #error "Sorry, this sample works under Windows only." #endif diff --git a/samples/regtest/regtest.cpp b/samples/regtest/regtest.cpp index cae2f058a9..a1147cad06 100644 --- a/samples/regtest/regtest.cpp +++ b/samples/regtest/regtest.cpp @@ -31,7 +31,7 @@ #include "wx/imaglist.h" #include "wx/tokenzr.h" -#if wxUSE_CONFIG_NATIVE && defined( __WXMSW__ ) +#if wxUSE_CONFIG_NATIVE && defined( __WINDOWS__ ) # define DO_REGTEST 1 #else # define DO_REGTEST 0 diff --git a/samples/toolbar/toolbar.cpp b/samples/toolbar/toolbar.cpp index 172fd95ba6..8f8da745bc 100644 --- a/samples/toolbar/toolbar.cpp +++ b/samples/toolbar/toolbar.cpp @@ -37,7 +37,7 @@ // define this to use XPMs everywhere (by default, BMPs are used under Win) // BMPs use less space, but aren't compiled into the executable on other platforms -#ifdef __WXMSW__ +#ifdef __WINDOWS__ #define USE_XPM_BITMAPS 0 #else #define USE_XPM_BITMAPS 1 diff --git a/src/common/msgout.cpp b/src/common/msgout.cpp index 975dabe0ae..9647088067 100644 --- a/src/common/msgout.cpp +++ b/src/common/msgout.cpp @@ -163,7 +163,7 @@ void wxMessageOutputStderr::Output(const wxString& str) void wxMessageOutputDebug::Output(const wxString& str) { -#if defined(__WXMSW__) && !defined(__WXMICROWIN__) +#if defined(__WINDOWS__) && !defined(__WXMICROWIN__) wxString out(AppendLineFeedIfNeeded(str)); out.Replace(wxT("\t"), wxT(" ")); out.Replace(wxT("\n"), wxT("\r\n")); @@ -202,7 +202,7 @@ void wxMessageOutputMessageBox::Output(const wxString& str) wxString out(str); // the native MSW msg box understands the TABs, others don't -#ifndef __WXMSW__ +#ifndef __WINDOWS__ out.Replace(wxT("\t"), wxT(" ")); #endif diff --git a/src/common/socket.cpp b/src/common/socket.cpp index 36a9dc1090..33690a3322 100644 --- a/src/common/socket.cpp +++ b/src/common/socket.cpp @@ -2111,7 +2111,7 @@ wxFORCE_LINK_MODULE( socketiohandler ) #endif // same for ManagerSetter in the MSW file -#ifdef __WXMSW__ +#ifdef __WINDOWS__ wxFORCE_LINK_MODULE( mswsocket ) #endif diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index 614ee45993..97bbf4fcb1 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -75,7 +75,7 @@ #include "wx/platinfo.h" #include "wx/private/window.h" -#ifdef __WXMSW__ +#ifdef __WINDOWS__ #include "wx/msw/wrapwin.h" #endif diff --git a/src/generic/dirctrlg.cpp b/src/generic/dirctrlg.cpp index a12be2f6c4..7ccf0d36dd 100644 --- a/src/generic/dirctrlg.cpp +++ b/src/generic/dirctrlg.cpp @@ -55,7 +55,7 @@ #include "wx/osx/private.h" // includes mac headers #endif -#ifdef __WXMSW__ +#ifdef __WINDOWS__ #include #include "wx/msw/winundef.h" #include "wx/volume.h" @@ -71,7 +71,7 @@ #include #endif -#endif +#endif // __WINDOWS__ #if defined(__OS2__) || defined(__DOS__) #ifdef __OS2__ @@ -310,7 +310,7 @@ int setdrive(int WXUNUSED_IN_WINCE(drive)) #else newdrive[2] = wxT('\0'); #endif -#if defined(__WXMSW__) +#if defined(__WINDOWS__) if (::SetCurrentDirectory(newdrive)) #else // VA doesn't know what LPSTR is and has its own set @@ -1170,7 +1170,7 @@ void wxGenericDirCtrl::FindChildFiles(wxTreeItemId treeid, int dirFlags, wxArray wxString dirName(data->m_path); -#if defined(__WXMSW__) || defined(__OS2__) +#if defined(__WINDOWS__) || defined(__OS2__) if (dirName.Last() == ':') dirName += wxString(wxFILE_SEP_PATH); #endif @@ -1572,7 +1572,7 @@ wxImageList *wxFileIconsTable::GetSmallImageList() return m_smallImageList; } -#if wxUSE_MIMETYPE && wxUSE_IMAGE && (!defined(__WXMSW__) || wxUSE_WXDIB) +#if wxUSE_MIMETYPE && wxUSE_IMAGE && (!defined(__WINDOWS__) || wxUSE_WXDIB) // VS: we don't need this function w/o wxMimeTypesManager because we'll only have // one icon and we won't resize it @@ -1732,7 +1732,7 @@ int wxFileIconsTable::GetIconID(const wxString& extension, const wxString& mime) { m_smallImageList->Add(bmp); } -#if wxUSE_IMAGE && (!defined(__WXMSW__) || wxUSE_WXDIB) +#if wxUSE_IMAGE && (!defined(__WINDOWS__) || wxUSE_WXDIB) else { wxImage img = bmp.ConvertToImage(); diff --git a/src/generic/filectrlg.cpp b/src/generic/filectrlg.cpp index 0a697894dc..de9e1144aa 100644 --- a/src/generic/filectrlg.cpp +++ b/src/generic/filectrlg.cpp @@ -35,7 +35,7 @@ #include "wx/tokenzr.h" #include "wx/imaglist.h" -#ifdef __WXMSW__ +#ifdef __WINDOWS__ #include "wx/msw/wrapwin.h" #endif diff --git a/src/msw/joystick.cpp b/src/msw/joystick.cpp index 1b9f8b04ce..158c0b64b8 100644 --- a/src/msw/joystick.cpp +++ b/src/msw/joystick.cpp @@ -641,9 +641,15 @@ bool wxJoystick::HasPOVCTS() const bool wxJoystick::SetCapture(wxWindow* win, int pollingFreq) { +#ifdef __WXMSW__ BOOL changed = (pollingFreq == 0); MMRESULT res = joySetCapture((HWND) win->GetHWND(), m_joystick, pollingFreq, changed); return (res == JOYERR_NOERROR); +#else + wxUnusedVar(win); + wxUnusedVar(pollingFreq); + return false; +#endif } bool wxJoystick::ReleaseCapture() diff --git a/tests/archive/archivetest.cpp b/tests/archive/archivetest.cpp index b56777059f..bbe235d850 100644 --- a/tests/archive/archivetest.cpp +++ b/tests/archive/archivetest.cpp @@ -409,7 +409,7 @@ void TempDir::RemoveDir(wxString& path) # define WXARC_pclose(fp) #endif -#ifdef __WXMSW__ +#ifdef __WINDOWS__ # define WXARC_b "b" #else # define WXARC_b @@ -661,7 +661,7 @@ void ArchiveTestCase::CreateArchive(wxOutputStream& out, wxFileName fn(i->first, wxPATH_UNIX); TestEntry& entry = *i->second; wxDateTime dt = entry.GetDateTime(); -#ifdef __WXMSW__ +#ifdef __WINDOWS__ if (fn.IsDir()) entry.SetDateTime(wxDateTime()); else @@ -806,7 +806,7 @@ void ArchiveTestCase::ExtractArchive(wxInputStream& in) const TestEntry& testEntry = *it->second; -#ifndef __WXMSW__ +#ifndef __WINDOWS__ // On Windows some archivers compensate for Windows DST handling, but // other don't, so disable the test for now. wxDateTime dt = testEntry.GetDateTime(); @@ -950,7 +950,7 @@ void ArchiveTestCase::VerifyDir(wxString& path, const TestEntry& testEntry = *it->second; -#if 0 //ndef __WXMSW__ +#if 0 //ndef __WINDOWS__ CPPUNIT_ASSERT_MESSAGE("timestamp check" + error_context, testEntry.GetDateTime() == wxFileName(path).GetModificationTime()); @@ -1300,7 +1300,7 @@ void ArchiveTestSuite::AddCmd(wxArrayString& cmdlist, const wxString& cmd) bool ArchiveTestSuite::IsInPath(const wxString& cmd) { wxString c = cmd.BeforeFirst(wxT(' ')); -#ifdef __WXMSW__ +#ifdef __WINDOWS__ c += wxT(".exe"); #endif return !m_path.FindValidPath(c).empty(); diff --git a/tests/benchmarks/strings.cpp b/tests/benchmarks/strings.cpp index 616e371edf..b1ee26936d 100644 --- a/tests/benchmarks/strings.cpp +++ b/tests/benchmarks/strings.cpp @@ -356,7 +356,7 @@ BENCHMARK_FUNC(StringCmpNoCase) // Also benchmark various native functions under MSW. Surprisingly/annoyingly // they sometimes have vastly better performance than alternatives, especially // for case-sensitive comparison (see #10375). -#ifdef __WXMSW__ +#ifdef __WINDOWS__ #include "wx/msw/wrapwin.h" @@ -400,7 +400,7 @@ BENCHMARK_FUNC(MSWCompareStringIgnoreCase) ) == CSTR_EQUAL; } -#endif // __WXMSW__ +#endif // __WINDOWS__ // ---------------------------------------------------------------------------- // string buffers: wx[W]CharBuffer diff --git a/tests/exec/exec.cpp b/tests/exec/exec.cpp index 50c01edd81..4355808d3f 100644 --- a/tests/exec/exec.cpp +++ b/tests/exec/exec.cpp @@ -27,7 +27,7 @@ #define ASYNC_COMMAND "xclock" #define SHELL_COMMAND "echo hi from shell>/dev/null" #define COMMAND_NO_OUTPUT "echo -n" -#elif defined(__WXMSW__) +#elif defined(__WINDOWS__) #define COMMAND "cmd.exe /c \"echo hi\"" #define ASYNC_COMMAND "notepad" #define SHELL_COMMAND "echo hi > nul:" diff --git a/tests/file/dir.cpp b/tests/file/dir.cpp index c109213909..caffd17a6d 100644 --- a/tests/file/dir.cpp +++ b/tests/file/dir.cpp @@ -178,7 +178,7 @@ void DirTestCase::DirExists() { ".", true }, { "..", true }, { "$USER_DOCS_DIR", true }, -#if defined(__WXMSW__) +#if defined(__WINDOWS__) { "$USER_DOCS_DIR\\", true }, { "$USER_DOCS_DIR\\\\", true }, { "..\\..", true }, @@ -202,20 +202,20 @@ void DirTestCase::DirExists() #endif }; -#ifdef __WXMSW__ +#ifdef __WINDOWS__ wxString homedrive = wxGetenv("HOMEDRIVE"); if ( homedrive.empty() ) homedrive = "c:"; -#endif // __WXMSW__ +#endif // __WINDOWS__ for ( size_t n = 0; n < WXSIZEOF(testData); n++ ) { wxString dirname = testData[n].dirname; dirname.Replace("$USER_DOCS_DIR", wxStandardPaths::Get().GetDocumentsDir()); -#ifdef __WXMSW__ +#ifdef __WINDOWS__ dirname.Replace("$MSW_DRIVE", homedrive); -#endif // __WXMSW__ +#endif // __WINDOWS__ std::string errDesc = wxString::Format("failed on directory '%s'", dirname).ToStdString(); CPPUNIT_ASSERT_EQUAL_MESSAGE(errDesc, testData[n].shouldExist, wxDir::Exists(dirname)); diff --git a/tests/filename/filenametest.cpp b/tests/filename/filenametest.cpp index aefd7fee57..addf9ad49f 100644 --- a/tests/filename/filenametest.cpp +++ b/tests/filename/filenametest.cpp @@ -26,9 +26,9 @@ #include "wx/stdpaths.h" #include "wx/scopeguard.h" -#ifdef __WXMSW__ +#ifdef __WINDOWS__ #include "wx/msw/registry.h" -#endif // __WXMSW__ +#endif // __WINDOWS__ #ifdef __UNIX__ #include @@ -323,7 +323,7 @@ void FileNameTestCase::TestNormalize() } tests[] = { // test wxPATH_NORM_ENV_VARS -#ifdef __WXMSW__ +#ifdef __WINDOWS__ { "%ABCDEF%/g/h/i", wxPATH_NORM_ENV_VARS, "abcdef/g/h/i", wxPATH_UNIX }, #else { "$(ABCDEF)/g/h/i", wxPATH_NORM_ENV_VARS, "abcdef/g/h/i", wxPATH_UNIX }, @@ -407,7 +407,7 @@ void FileNameTestCase::TestNormalize() // and also that the registry key was changed recently and didn't take // effect yet but these are marginal cases which we consciously choose to // ignore for now) -#ifdef __WXMSW__ +#ifdef __WINDOWS__ long shortNamesDisabled; if ( wxRegKey ( @@ -421,7 +421,7 @@ void FileNameTestCase::TestNormalize() CPPUNIT_ASSERT_EQUAL( "..\\mkinstalldirs", fn.GetFullPath() ); } //else: when in doubt, don't run the test -#endif // __WXMSW__ +#endif // __WINDOWS__ } void FileNameTestCase::TestReplace() @@ -605,7 +605,7 @@ void FileNameTestCase::TestCreateTempFileName() { "foo", "$SYSTEM_TEMP", true }, { "..", "$SYSTEM_TEMP", true }, { "../bar", "..", true }, -#ifdef __WXMSW__ +#ifdef __WINDOWS__ { "$USER_DOCS_DIR\\", "$USER_DOCS_DIR", true }, { "c:\\a\\directory\\which\\does\\not\\exist", "", false }, #elif defined( __UNIX__ ) diff --git a/tests/fswatcher/fswatchertest.cpp b/tests/fswatcher/fswatchertest.cpp index 8840342dc7..a3fc759dcc 100644 --- a/tests/fswatcher/fswatchertest.cpp +++ b/tests/fswatcher/fswatchertest.cpp @@ -428,9 +428,9 @@ private: CPPUNIT_TEST( TestEventModify ); // MSW implementation doesn't detect file access events currently -#ifndef __WXMSW__ +#ifndef __WINDOWS__ CPPUNIT_TEST( TestEventAccess ); -#endif // __WXMSW__ +#endif // __WINDOWS__ #endif // !wxHAS_KQUEUE CPPUNIT_TEST( TestNoEventsAfterRemove ); diff --git a/tests/interactive/output.cpp b/tests/interactive/output.cpp index 3d6492cbcd..2722ca8952 100644 --- a/tests/interactive/output.cpp +++ b/tests/interactive/output.cpp @@ -90,7 +90,7 @@ CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( InteractiveOutputTestCase, "InteractiveOu // wxDllLoader // ---------------------------------------------------------------------------- -#if !defined(__WXMSW__) && !defined(__UNIX__) +#if !defined(__WINDOWS__) && !defined(__UNIX__) #undef TEST_DYNLIB #endif diff --git a/tests/misc/dynamiclib.cpp b/tests/misc/dynamiclib.cpp index bf33350099..acd16c4e47 100644 --- a/tests/misc/dynamiclib.cpp +++ b/tests/misc/dynamiclib.cpp @@ -46,7 +46,7 @@ CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( DynamicLibraryTestCase, "DynamicLibraryTe void DynamicLibraryTestCase::Load() { -#if defined(__WXMSW__) +#if defined(__WINDOWS__) static const wxChar *LIB_NAME = wxT("kernel32.dll"); static const wxChar *FUNC_NAME = wxT("lstrlenA"); #elif defined(__UNIX__) @@ -74,7 +74,7 @@ void DynamicLibraryTestCase::Load() // Call the function dynamically loaded CPPUNIT_ASSERT( pfnStrlen("foo") == 3 ); -#ifdef __WXMSW__ +#ifdef __WINDOWS__ static const wxChar *FUNC_NAME_AW = wxT("lstrlen"); typedef int (wxSTDCALL *wxStrlenTypeAorW)(const wxChar *); @@ -86,5 +86,5 @@ void DynamicLibraryTestCase::Load() CPPUNIT_ASSERT_MESSAGE( errMsg2.ToStdString(), pfnStrlenAorW ); CPPUNIT_ASSERT( pfnStrlenAorW(wxT("foobar")) == 6 ); -#endif // __WXMSW__ +#endif // __WINDOWS__ } diff --git a/tests/net/ipc.cpp b/tests/net/ipc.cpp index cb55490869..9782867044 100644 --- a/tests/net/ipc.cpp +++ b/tests/net/ipc.cpp @@ -262,4 +262,4 @@ void IPCTestCase::Disconnect() #endif // wxUSE_THREADS -#endif // !__WXMSW__ +#endif // !__WINDOWS__ diff --git a/tests/streams/largefile.cpp b/tests/streams/largefile.cpp index da11ccaeca..9c8e0caf86 100644 --- a/tests/streams/largefile.cpp +++ b/tests/streams/largefile.cpp @@ -35,7 +35,7 @@ #include "wx/filename.h" #include "wx/wfstream.h" -#ifdef __WXMSW__ +#ifdef __WINDOWS__ #include "wx/msw/wrapwin.h" #ifdef __VISUALC__ // 'nonstandard extension used : nameless struct/union' occurs inside @@ -305,7 +305,7 @@ CppUnit::Test *largeFile::suite() // are picked up. However this is only possible when sparse files are // supported otherwise the tests require too much disk space. -#ifdef __WXMSW__ +#ifdef __WINDOWS__ #ifndef FILE_SUPPORTS_SPARSE_FILES #define FILE_SUPPORTS_SPARSE_FILES 0x00000040 @@ -400,7 +400,7 @@ CppUnit::Test* GetlargeFileSuite() return NULL; } -#else // __WXMSW__ +#else // __WINDOWS__ bool IsFAT(const wxString& WXUNUSED(path)) { return false; } void MakeSparse(const wxString& WXUNUSED(path), int WXUNUSED(fd)) { } @@ -436,7 +436,7 @@ CppUnit::Test* GetlargeFileSuite() return NULL; } -#endif // __WXMSW__ +#endif // __WINDOWS__ CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(largeFile, "largeFile"); CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(largeFile, "Streams.largeFile"); diff --git a/tests/streams/textstreamtest.cpp b/tests/streams/textstreamtest.cpp index 1d1ec0375b..aa089980fd 100644 --- a/tests/streams/textstreamtest.cpp +++ b/tests/streams/textstreamtest.cpp @@ -93,7 +93,7 @@ TextStreamTestCase::TextStreamTestCase() { } -#if defined(__WXMSW__) || defined(__WXPM__) +#if defined(__WINDOWS__) || defined(__WXPM__) # define NEWLINE "\r\n" # define NEWLINELEN 2 #elif defined(__WXMAC__) && !defined(__DARWIN__) diff --git a/tests/strings/vararg.cpp b/tests/strings/vararg.cpp index 14fb85ff94..df44cffffa 100644 --- a/tests/strings/vararg.cpp +++ b/tests/strings/vararg.cpp @@ -272,7 +272,7 @@ void VarArgTestCase::ArgsValidation() // check size_t handling size_t len = sizeof(*this); -#ifdef __WXMSW__ +#ifdef __WINDOWS__ wxString::Format("%Iu", len); #else wxString::Format("%zu", len); diff --git a/tests/strings/vsnprintf.cpp b/tests/strings/vsnprintf.cpp index 5bae041c88..b37d0e50a8 100644 --- a/tests/strings/vsnprintf.cpp +++ b/tests/strings/vsnprintf.cpp @@ -425,7 +425,7 @@ void VsnprintfTestCase::LongLong() CMP3("123456789", "%llu", (wxULongLong_t)123456789); -#ifdef __WXMSW__ +#ifdef __WINDOWS__ CMP3("123456789", "%I64d", (wxLongLong_t)123456789); CMP3("123456789abcdef", "%I64x", wxLL(0x123456789abcdef)); #endif diff --git a/tests/test.cpp b/tests/test.cpp index 983bc4f3ce..bdd531d5ed 100644 --- a/tests/test.cpp +++ b/tests/test.cpp @@ -45,7 +45,7 @@ #include #include -#ifdef __WXMSW__ +#ifdef __WINDOWS__ #include "wx/msw/msvcrt.h" #endif diff --git a/tests/xlocale/xlocale.cpp b/tests/xlocale/xlocale.cpp index 4c6f6c8067..2b3474b96f 100644 --- a/tests/xlocale/xlocale.cpp +++ b/tests/xlocale/xlocale.cpp @@ -75,7 +75,7 @@ void XLocaleTestCase::TestCtor() #ifdef wxHAS_XLOCALE_SUPPORT CPPUNIT_ASSERT( wxXLocale(wxLANGUAGE_FRENCH).IsOk() ); -#ifdef __WXMSW__ +#ifdef __WINDOWS__ CPPUNIT_ASSERT( wxXLocale("french").IsOk() ); #else CPPUNIT_ASSERT( wxXLocale("fr_FR").IsOk() ); -- 2.45.2