From 2087484c65a3d5e75a9e8ad116d11a4e13366219 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 16 Feb 2016 14:14:43 +0200 Subject: use consistent #define checks for the Windows platform stage 2 of replacing usage of various checks for the windows platform with the compiler-defined '_WIN32' macro In this stage we focus on replacing usage of the WIN macro Change-Id: Ie8a4a63198a6de96bd158ecd707dadafb9c8ea84 Reviewed-on: https://gerrit.libreoffice.org/22393 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sal/cppunittester/cppunittester.cxx | 4 +-- sal/qa/osl/file/osl_File.cxx | 34 +++++++++++----------- sal/qa/osl/file/osl_File_Const.h | 2 +- .../test-getsystempathfromfileurl.cxx | 6 ++-- sal/qa/osl/module/osl_Module.cxx | 2 +- sal/qa/osl/module/osl_Module_Const.h | 5 ++-- sal/qa/osl/process/osl_Thread.cxx | 20 ++++++------- sal/qa/osl/process/osl_process.cxx | 10 +++---- sal/qa/osl/process/osl_process_child.cxx | 6 ++-- sal/qa/osl/security/osl_Security.cxx | 6 ++-- sal/qa/osl/security/osl_Security_Const.h | 2 +- sal/qa/osl/setthreadname/test-setthreadname.cxx | 2 +- sal/qa/rtl/doublelock/rtl_doublelocking.cxx | 4 +-- sal/qa/rtl/process/rtl_Process.cxx | 4 +-- sal/qa/rtl/uuid/rtl_Uuid.cxx | 2 +- sal/workben/t_ojp_exe.cxx | 4 +-- sal/workben/t_osl_getVolInfo.cxx | 2 +- sal/workben/t_osl_joinProcess.cxx | 2 +- sal/workben/testfile.cxx | 8 ++--- sal/workben/testproc.cxx | 2 +- 20 files changed, 63 insertions(+), 64 deletions(-) (limited to 'sal') diff --git a/sal/cppunittester/cppunittester.cxx b/sal/cppunittester/cppunittester.cxx index 7bc32f8db3c7..30347c178c16 100644 --- a/sal/cppunittester/cppunittester.cxx +++ b/sal/cppunittester/cppunittester.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifdef WNT +#ifdef _WIN32 #include #endif @@ -361,7 +361,7 @@ SAL_IMPLEMENT_MAIN() OUString path; try { -#ifdef WNT +#ifdef _WIN32 //Disable Dr-Watson in order to crash simply without popup dialogs under //windows DWORD dwMode = SetErrorMode(SEM_NOGPFAULTERRORBOX); diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx index 7d65b5089f07..7a3913c5d545 100644 --- a/sal/qa/osl/file/osl_File.cxx +++ b/sal/qa/osl/file/osl_File.cxx @@ -34,7 +34,7 @@ #include -#ifdef WNT +#ifdef _WIN32 #include #endif @@ -135,7 +135,7 @@ inline bool compareFileName( const ::rtl::OUString & ustr1, const ::rtl::OUStrin { bool bOk; //on Windows, the separator is '\', so here change to '/', then compare -#if defined (WNT ) +#if defined(_WIN32) ::rtl::OUString ustr1new,ustr2new; sal_Unicode reverseSlash = (sal_Unicode)'\\'; @@ -314,7 +314,7 @@ inline bool ifFileExist( const ::rtl::OUString & str ) inline bool ifFileCanWrite( const ::rtl::OUString & str ) { //on Windows, the file has no write right, but can be written -#ifdef WNT +#ifdef _WIN32 bool bCheckResult = false; ::rtl::OUString aUStr = str.copy( 0 ); if ( isURL( str ) ) @@ -707,7 +707,7 @@ namespace osl_FileBase } void SystemPath_FileURL::checkWNTBehaviour_getSystemPathFromFileURL(rtl::OString const& _sURL, ::osl::FileBase::RC _nAssumeError, rtl::OString const& _sWNTAssumeResultString) { -#if ( defined WNT ) +#if defined(_WIN32) check_SystemPath_FileURL(_sURL, _nAssumeError, _sWNTAssumeResultString); #else (void)_sURL; @@ -729,7 +729,7 @@ namespace osl_FileBase void SystemPath_FileURL::checkWNTBehaviour_getFileURLFromSystemPath(rtl::OString const& _sSysPath, ::osl::FileBase::RC _nAssumeError, rtl::OString const& _sWNTAssumeResultString) { -#if ( defined WNT ) +#if defined(_WIN32) check_SystemPath_FileURL(_sSysPath, _nAssumeError, _sWNTAssumeResultString, sal_False ); #else (void)_sSysPath; @@ -2232,7 +2232,7 @@ namespace osl_File nError1 = testFile.open( osl_File_OpenFlag_Create ); bool bOK = ( File::E_ACCES == nError1 ); -#ifdef WNT +#ifdef _WIN32 bOK = true; /// in Windows, you can create file in c:/ any way. testFile.close(); deleteTestFile( aTestFile); @@ -3039,7 +3039,7 @@ namespace osl_File { //copy $TEMP/tmpdir/tmpname to $ROOT/tmpname. nError1 = ::osl::File::copy( aTmpName4, aTmpName7 ); -#if defined (WNT ) +#if defined(_WIN32) nError1 = ::osl::FileBase::E_ACCES; /// for Windows, c:/ is writtenable any way. deleteTestFile( aTmpName7); #endif @@ -3169,7 +3169,7 @@ namespace osl_File { //move $TEMP/tmpdir/tmpname to $ROOT/tmpname. nError1 = ::osl::File::move( aTmpName4, aTmpName7 ); -#if defined (WNT ) +#if defined(_WIN32) nError1 = ::osl::FileBase::E_ACCES; /// for Windows, c:/ is writtenable any way. deleteTestFile( aTmpName7); #endif @@ -3204,7 +3204,7 @@ namespace osl_File //move file $TEMP/tmpdir/tmpname to $TEMP/tmpname nError2 = ::osl::File::move( aTmpName4, aTmpName6 ); deleteTestDirectory( aTmpName6 ); -#if defined ( WNT ) +#if defined(_WIN32) deleteTestDirectory( aTmpName4 );// in Windows, it can be moved!!!!! this is only for not influence the following test. deleteTestFile( aTmpName6 ); nError1 = ::osl::FileBase::E_NOTDIR; @@ -3398,7 +3398,7 @@ namespace osl_File void setAttributes_002() { //on UNX, can not set hidden attribute to file, rename file can set the attribute -#ifdef WNT +#ifdef _WIN32 //set the file to hidden nError2 = ::osl::File::setAttributes( aTmpName6, osl_File_Attribute_Hidden); @@ -3489,7 +3489,7 @@ namespace osl_File CPPUNIT_ASSERT_MESSAGE( "test for setTime function: set access time then get it. time precision is still a problem for it cut off the nanosec.", t_compareTime( pTV_access, pTV_current, delta ) ); -#if defined ( WNT ) +#if defined(_WIN32) //Unfortunately there is no way to get the creation time of a file under Unix (its a Windows only feature). //That means the flag osl_FileStatus_Mask_CreationTime should be deprecated under Unix. CPPUNIT_ASSERT_MESSAGE( "test for setTime function: set creation time then get it. ", @@ -4661,7 +4661,7 @@ namespace osl_Directory void create_002() { -#if !defined (WNT) && !defined (MACOSX) && defined (SAL_UNX) +#if !defined(_WIN32) && !defined(MACOSX) && defined(SAL_UNX) if (geteuid() == 0) //don't test if building as root return; @@ -4807,7 +4807,7 @@ namespace osl_Directory // TEST Directory::createPath - #ifdef WNT + #ifdef _WIN32 # define PATH_BUFFER_SIZE MAX_PATH #else # define PATH_BUFFER_SIZE PATH_MAX @@ -4842,7 +4842,7 @@ namespace osl_Directory if (tmp_x.lastIndexOf('/') != (tmp_x.getLength() - 1)) tmp_x += rtl::OString('/'); -#if !defined(WNT) && !defined(ANDROID) && !defined(AIX) +#if !defined(_WIN32) && !defined(ANDROID) && !defined(AIX) // FIXME would be nice to create unique dir even on Windows tmp_x += rtl::OString("XXXXXX"); char *out = mkdtemp(const_cast(tmp_x.getStr())); @@ -4965,7 +4965,7 @@ namespace osl_Directory } -#ifdef WNT +#ifdef _WIN32 const char* get_unused_drive_letter() { @@ -5012,7 +5012,7 @@ namespace osl_Directory CPPUNIT_TEST(with_relative_path); CPPUNIT_TEST(without_callback); CPPUNIT_TEST(with_callback); -#ifdef WNT +#ifdef _WIN32 CPPUNIT_TEST(at_invalid_logical_drive); #endif CPPUNIT_TEST_SUITE_END(); @@ -5039,7 +5039,7 @@ inline ::rtl::OUString getCurrentPID( ) { //~ Get current PID and turn it into OUString; int nPID = 0; -#ifdef WNT +#ifdef _WIN32 nPID = GetCurrentProcessId(); #else nPID = getpid(); diff --git a/sal/qa/osl/file/osl_File_Const.h b/sal/qa/osl/file/osl_File_Const.h index 05bb1d275b9b..cd39fb4e0202 100644 --- a/sal/qa/osl/file/osl_File_Const.h +++ b/sal/qa/osl/file/osl_File_Const.h @@ -82,7 +82,7 @@ const sal_Char pBuffer_Blank[] = ""; # define PATH_SEPARATOR "/" #endif -#if (defined WNT ) // Windows +#if defined(_WIN32) // Windows # include # include # include diff --git a/sal/qa/osl/getsystempathfromfileurl/test-getsystempathfromfileurl.cxx b/sal/qa/osl/getsystempathfromfileurl/test-getsystempathfromfileurl.cxx index 6c16a3e5bd48..5d8d24962e0a 100644 --- a/sal/qa/osl/getsystempathfromfileurl/test-getsystempathfromfileurl.cxx +++ b/sal/qa/osl/getsystempathfromfileurl/test-getsystempathfromfileurl.cxx @@ -26,7 +26,7 @@ #include -#if defined WNT +#if defined(_WIN32) #define MY_PATH_IN "/c:/foo/bar" #define MY_PATH_OUT "c:\\foo\\bar" #define MY_PATH_OUT_CONT MY_PATH_OUT "\\" @@ -91,7 +91,7 @@ void Test::testBadScheme() { } void Test::testNoScheme() { -#if !defined WNT //TODO +#if !defined(_WIN32) //TODO OUString p; auto e = osl::FileBase::getSystemPathFromFileURL("//" MY_PATH_IN, p); CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, e); @@ -134,7 +134,7 @@ void Test::testLocalhost3Authority() { } void Test::testNoAuthority() { -#if !defined WNT //TODO +#if !defined(_WIN32) //TODO OUString p; auto e = osl::FileBase::getSystemPathFromFileURL("file:" MY_PATH_IN, p); CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, e); diff --git a/sal/qa/osl/module/osl_Module.cxx b/sal/qa/osl/module/osl_Module.cxx index 571523e55e9b..e51a80904b8d 100644 --- a/sal/qa/osl/module/osl_Module.cxx +++ b/sal/qa/osl/module/osl_Module.cxx @@ -31,7 +31,7 @@ using ::rtl::OString; */ inline ::rtl::OUString getDllURL() { -#if ( defined WNT ) // lib in Unix and lib in Windows are not same in file name. +#if defined(_WIN32) // lib in Unix and lib in Windows are not same in file name. ::rtl::OUString libPath( "test_Module_DLL.dll" ); #else ::rtl::OUString libPath( "libtest_Module_DLL.so" ); diff --git a/sal/qa/osl/module/osl_Module_Const.h b/sal/qa/osl/module/osl_Module_Const.h index 40b33218d047..3434d439f2a3 100644 --- a/sal/qa/osl/module/osl_Module_Const.h +++ b/sal/qa/osl/module/osl_Module_Const.h @@ -29,10 +29,9 @@ #include #include -#if ( defined UNX ) //Unix +#if defined(UNX) // Unix # include -#endif -#if ( defined WNT ) // Windows +#elif defined(_WIN32) // Windows # include #endif diff --git a/sal/qa/osl/process/osl_Thread.cxx b/sal/qa/osl/process/osl_Thread.cxx index 29687f8c938b..245c5baca750 100644 --- a/sal/qa/osl/process/osl_Thread.cxx +++ b/sal/qa/osl/process/osl_Thread.cxx @@ -18,7 +18,7 @@ */ #include -#ifdef WNT +#ifdef _WIN32 #include #else #include @@ -181,7 +181,7 @@ namespace ThreadHelper { void thread_sleep_tenth_sec(sal_Int32 _nTenthSec) { -#ifdef WNT +#ifdef _WIN32 Sleep(_nTenthSec * 100 ); #else TimeValue nTV; @@ -421,7 +421,7 @@ namespace osl_Thread // Note: on UNX, after createSuspended, and then terminate the thread, it performs well; // while on Windows, after createSuspended, the thread can not terminate, wait endlessly, // so here call resume at first, then call terminate. -#ifdef WNT +#ifdef _WIN32 t_print("resumeAndWaitThread\n"); _pThread->resume(); ThreadHelper::thread_sleep_tenth_sec(1); @@ -436,7 +436,7 @@ namespace osl_Thread _pThread->terminate(); // LLA: Windows feature???, a suspended thread can not terminated, so we have to weak it up -#ifdef WNT +#ifdef _WIN32 _pThread->resume(); ThreadHelper::thread_sleep_tenth_sec(1); #endif @@ -1154,7 +1154,7 @@ namespace osl_Thread t_print("nValue in AboveNormal Prio Thread is %d\n", (int) nValueAboveNormal); t_print("nValue in Normal Prio Thread is %d\n", (int) nValueNormal); -#ifndef WNT +#ifndef _WIN32 CPPUNIT_ASSERT_MESSAGE( "SetPriority", nValueHighest > 0 && @@ -1237,7 +1237,7 @@ namespace osl_Thread delete pBelowNormalThread; delete pLowestThread; -#ifndef WNT +#ifndef _WIN32 CPPUNIT_ASSERT_MESSAGE( "SetPriority", nValueHighest > 0 && @@ -1321,7 +1321,7 @@ namespace osl_Thread delete pBelowNormalThread; delete pLowestThread; -#ifndef WNT +#ifndef _WIN32 CPPUNIT_ASSERT_MESSAGE( "SetPriority", /* nValueHighest > 0 && */ @@ -1401,7 +1401,7 @@ namespace osl_Thread delete pBelowNormalThread; delete pLowestThread; -#ifndef WNT +#ifndef _WIN32 CPPUNIT_ASSERT_MESSAGE( "SetPriority", /* nValueHighest > 0 && */ @@ -1454,7 +1454,7 @@ namespace osl_Thread ThreadHelper::outputPriority(aPriority); // LLA: Priority settings may not work within some OS versions. -#if ( defined WNT ) || ( defined SOLARIS ) +#if defined(_WIN32) || defined(SOLARIS) CPPUNIT_ASSERT_MESSAGE( "getPriority", aPriority == osl_Thread_PriorityHighest @@ -1683,7 +1683,7 @@ namespace osl_Thread t_print("later value = %d\n", (int) nLaterValue); //On windows, suspend works, so the values are same -#ifdef WNT +#ifdef _WIN32 CPPUNIT_ASSERT_MESSAGE( "Schedule: don't schedule in thread run method, suspend works.", nLaterValue == nValue diff --git a/sal/qa/osl/process/osl_process.cxx b/sal/qa/osl/process/osl_process.cxx index 59bd74f44073..280e87302ac0 100644 --- a/sal/qa/osl/process/osl_process.cxx +++ b/sal/qa/osl/process/osl_process.cxx @@ -43,7 +43,7 @@ #define RUNNING_ON_VALGRIND false #endif -#if ( defined WNT ) // Windows +#if defined(_WIN32) // Windows # include # include #else @@ -66,7 +66,7 @@ # endif #endif -#if defined(WNT) +#if defined(_WIN32) const rtl::OUString EXECUTABLE_NAME ("osl_process_child.exe"); #else const rtl::OUString EXECUTABLE_NAME ("osl_process_child"); @@ -154,7 +154,7 @@ namespace } } -#ifdef WNT +#ifdef _WIN32 void read_parent_environment(string_container_t* env_container) { LPTSTR env = reinterpret_cast(GetEnvironmentStrings()); @@ -435,7 +435,7 @@ public: void osl_execProc_test_batch() { oslProcess process; -#if defined(WNT) +#if defined(_WIN32) rtl::OUString suBatch = suCWD + "/batch.bat"; #else rtl::OUString suBatch = suCWD + "/batch.sh"; @@ -470,7 +470,7 @@ public: CPPUNIT_TEST_SUITE(Test_osl_executeProcess); //TODO: Repair these (at least under Windows) -#if !defined(WNT) +#if !defined(_WIN32) CPPUNIT_TEST(osl_execProc_parent_equals_child_environment); CPPUNIT_TEST(osl_execProc_merged_child_environment); #endif diff --git a/sal/qa/osl/process/osl_process_child.cxx b/sal/qa/osl/process/osl_process_child.cxx index f709de940c51..22ab319873a3 100644 --- a/sal/qa/osl/process/osl_process_child.cxx +++ b/sal/qa/osl/process/osl_process_child.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#if ( defined WNT ) // Windows +#if defined(_WIN32) // Windows # define UNICODE # define _UNICODE # define WIN32_LEAN_AND_MEAN @@ -42,7 +42,7 @@ # endif #endif -#ifdef WNT +#ifdef _WIN32 # define SLEEP(t) (Sleep((t)*1000)) #else # define SLEEP(t) (sleep((t))) @@ -53,7 +53,7 @@ void wait_for_seconds(char* time) SLEEP(atoi(time)); } -#ifdef WNT +#ifdef _WIN32 void w_to_a(LPCTSTR _strW, LPSTR strA, DWORD size) { diff --git a/sal/qa/osl/security/osl_Security.cxx b/sal/qa/osl/security/osl_Security.cxx index 693137fd9ab9..33c093b8d7ea 100644 --- a/sal/qa/osl/security/osl_Security.cxx +++ b/sal/qa/osl/security/osl_Security.cxx @@ -18,7 +18,7 @@ */ #include -#ifdef WNT +#ifdef _WIN32 #include #undef min #endif @@ -152,7 +152,7 @@ namespace osl_Security void getUserName_001( ) { ::osl::Security aSec; -#ifdef WNT +#ifdef _WIN32 ::rtl::OUString strName( strUserName ), strGetName; #else ::rtl::OUString strName( strUserName ), strGetName; @@ -350,7 +350,7 @@ void MyTestPlugInImpl::initialize( CPPUNIT_NS::TestFactoryRegistry *, isAdmin = true; #endif -#if defined ( WNT ) +#if defined(_WIN32) /// some initialization work for Windows OS /// Get the user name, computer name, user home directory. diff --git a/sal/qa/osl/security/osl_Security_Const.h b/sal/qa/osl/security/osl_Security_Const.h index 1dfa2422e7cb..84619f0964b2 100644 --- a/sal/qa/osl/security/osl_Security_Const.h +++ b/sal/qa/osl/security/osl_Security_Const.h @@ -20,7 +20,7 @@ #ifndef INCLUDED_SAL_QA_OSL_SECURITY_OSL_SECURITY_CONST_H #define INCLUDED_SAL_QA_OSL_SECURITY_OSL_SECURITY_CONST_H -#if ( defined WNT ) // Windows +#if defined(_WIN32) // Windows #include #endif diff --git a/sal/qa/osl/setthreadname/test-setthreadname.cxx b/sal/qa/osl/setthreadname/test-setthreadname.cxx index 02e6eb76855a..be0b030d61dc 100644 --- a/sal/qa/osl/setthreadname/test-setthreadname.cxx +++ b/sal/qa/osl/setthreadname/test-setthreadname.cxx @@ -37,7 +37,7 @@ private: }; void TestThread::run() { -#if defined WNT +#if defined(_WIN32) if (std::getenv("URE_TEST_SETTHREADNAME") != 0) { // On Windows, setting thread names appears to only take effect when the // process is being debugged, so attach a debugger now: diff --git a/sal/qa/rtl/doublelock/rtl_doublelocking.cxx b/sal/qa/rtl/doublelock/rtl_doublelocking.cxx index 9d6d91758e55..15bf66f98f94 100644 --- a/sal/qa/rtl/doublelock/rtl_doublelocking.cxx +++ b/sal/qa/rtl/doublelock/rtl_doublelocking.cxx @@ -31,7 +31,7 @@ #include #include -#ifdef WNT +#ifdef _WIN32 #include #else #include @@ -62,7 +62,7 @@ namespace ThreadHelper // printf("wait %d tenth seconds. ", _nTenthSec ); // fflush(stdout); // } -#ifdef WNT //Windows +#ifdef _WIN32 //Windows Sleep(_nTenthSec * 100 ); #endif #if ( defined UNX ) diff --git a/sal/qa/rtl/process/rtl_Process.cxx b/sal/qa/rtl/process/rtl_Process.cxx index d4d7c86b7df5..e77f661db7f0 100644 --- a/sal/qa/rtl/process/rtl_Process.cxx +++ b/sal/qa/rtl/process/rtl_Process.cxx @@ -82,7 +82,7 @@ public: void getAppCommandArg_001() { -#if defined(WNT) +#if defined(_WIN32) const rtl::OUString EXECUTABLE_NAME("child_process.exe"); #else const rtl::OUString EXECUTABLE_NAME("child_process"); @@ -216,7 +216,7 @@ public: //different processes different pids void getGlobalProcessId_002() { -#if defined(WNT) +#if defined(_WIN32) const rtl::OUString EXEC_NAME("child_process_id.exe"); #else const rtl::OUString EXEC_NAME("child_process_id"); diff --git a/sal/qa/rtl/uuid/rtl_Uuid.cxx b/sal/qa/rtl/uuid/rtl_Uuid.cxx index ba20eadec53d..3f661e453e41 100644 --- a/sal/qa/rtl/uuid/rtl_Uuid.cxx +++ b/sal/qa/rtl/uuid/rtl_Uuid.cxx @@ -28,7 +28,7 @@ #include #include -#ifdef WNT +#ifdef _WIN32 #include #elif defined UNX #include diff --git a/sal/workben/t_ojp_exe.cxx b/sal/workben/t_ojp_exe.cxx index 558ff3e722a1..8cd71267cdeb 100644 --- a/sal/workben/t_ojp_exe.cxx +++ b/sal/workben/t_ojp_exe.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifdef WNT +#ifdef _WIN32 # define WIN32_LEAN_AND_MEAN # include #else @@ -30,7 +30,7 @@ int main(int argc, char* argv[]) { printf("osl process test executable started:\n"); -#ifdef WNT +#ifdef _WIN32 Sleep(5000); #else sleep(5); diff --git a/sal/workben/t_osl_getVolInfo.cxx b/sal/workben/t_osl_getVolInfo.cxx index 74e6e87f3ffc..abb1cb5c1758 100644 --- a/sal/workben/t_osl_getVolInfo.cxx +++ b/sal/workben/t_osl_getVolInfo.cxx @@ -22,7 +22,7 @@ #include #include -#ifdef WNT +#ifdef _WIN32 # define TEST_PATH_1 "c:\\" # define TEST_PATH_2 "c:\\mnt\\MSDN" # define TEST_PATH_3 "c:\\Program Files" diff --git a/sal/workben/t_osl_joinProcess.cxx b/sal/workben/t_osl_joinProcess.cxx index d043c5e343b3..08fd6c543608 100644 --- a/sal/workben/t_osl_joinProcess.cxx +++ b/sal/workben/t_osl_joinProcess.cxx @@ -24,7 +24,7 @@ #include #include -#ifdef WNT +#ifdef _WIN32 const rtl::OUString IMAGE_NAME("ojpx.exe"); #else const rtl::OUString IMAGE_NAME("ojpx"); diff --git a/sal/workben/testfile.cxx b/sal/workben/testfile.cxx index dd9448bce907..3b3590f3bbce 100644 --- a/sal/workben/testfile.cxx +++ b/sal/workben/testfile.cxx @@ -32,7 +32,7 @@ #include #endif -#ifdef WNT +#ifdef _WIN32 #include #endif @@ -1248,7 +1248,7 @@ void FileAttributesTest() } #endif -#ifdef WNT +#ifdef _WIN32 void FileAttributesTest() { FileBase::RC rc; @@ -1385,7 +1385,7 @@ void FileTimeTest() // GetCreationTime aCreationTimeRead=rStatus.getCreationTime(); -#ifdef WNT +#ifdef _WIN32 if ( aCreationTime.Seconds == aCreationTimeRead.Seconds && aCreationTime.Nanosec == aCreationTimeRead.Nanosec ) printf( "GetCreationTime: ok : " ); else @@ -2447,7 +2447,7 @@ void print_error( const ::rtl::OString& str, FileBase::RC rc ) // main -#if defined WNT +#if defined(_WIN32) #define MAIN _cdecl main #else #define MAIN main diff --git a/sal/workben/testproc.cxx b/sal/workben/testproc.cxx index 3d2bd79322bf..91d0e60fe5f8 100644 --- a/sal/workben/testproc.cxx +++ b/sal/workben/testproc.cxx @@ -20,7 +20,7 @@ #include #include -#if defined WNT +#if defined(_WIN32) #define MAIN _cdecl main #else #define MAIN main -- cgit