From 5e2250c1eb88e7a3d6afe554bc200f1bcb811dd3 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sun, 17 Feb 2008 09:16:11 +0000 Subject: [PATCH] going private again git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@51858 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/filefn.cpp | 5 ----- src/common/filename.cpp | 11 ++++++++++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index ad4c1406b7..b18ad9b605 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -135,11 +135,6 @@ WXDLLEXPORT int wxStat( const wxChar *file_name, wxStructStat *buf ) return stat( wxConvFile.cWX2MB( file_name ), buf ); } -WXDLLEXPORT int wxStat( const char *file_name, wxStructStat *buf ) -{ - return stat( file_name , buf ); -} - WXDLLEXPORT int wxLstat( const wxChar *file_name, wxStructStat *buf ) { return lstat( wxConvFile.cWX2MB( file_name ), buf ); diff --git a/src/common/filename.cpp b/src/common/filename.cpp index 1d46748ba5..366382276e 100644 --- a/src/common/filename.cpp +++ b/src/common/filename.cpp @@ -2230,6 +2230,15 @@ bool wxFileName::Touch() #endif // platforms } +#ifdef wxNEED_WX_UNISTD_H + +static int wxStat( const char *file_name, wxStructStat *buf ) +{ + return stat( file_name , buf ); +} + +#endif + bool wxFileName::GetTimes(wxDateTime *dtAccess, wxDateTime *dtMod, wxDateTime *dtCreate) const @@ -2282,7 +2291,7 @@ bool wxFileName::GetTimes(wxDateTime *dtAccess, #elif defined(__UNIX_LIKE__) || defined(__WXMAC__) || defined(__OS2__) || (defined(__DOS__) && defined(__WATCOMC__)) // no need to test for IsDir() here wxStructStat stBuf; - if ( stat( GetFullPath().fn_str(), &stBuf) == 0 ) + if ( wxStat( GetFullPath().fn_str(), &stBuf) == 0 ) { if ( dtAccess ) dtAccess->Set(stBuf.st_atime);