Revert "Fix code for Android"

This reverts commit 7a91fbebd9.
This commit is contained in:
nillerusr
2021-09-02 20:31:11 +03:00
parent b62d2f4f1a
commit 2a490d398c
19 changed files with 18 additions and 405 deletions
+2 -8
View File
@@ -3770,10 +3770,8 @@ bool CBaseFileSystem::IsFileWritable( char const *pFileName, char const *pPathID
{
#ifdef WIN32
if( buf.st_mode & _S_IWRITE )
#elif defined (LINUX) && !defined (ANDROID)
#elif LINUX
if( buf.st_mode & S_IWRITE )
#elif ANDROID
if( buf.st_mode & S_IWUSR )
#else
if( buf.st_mode & S_IWRITE )
#endif
@@ -3794,10 +3792,8 @@ bool CBaseFileSystem::IsFileWritable( char const *pFileName, char const *pPathID
{
#ifdef WIN32
if ( buf.st_mode & _S_IWRITE )
#elif defined (LINUX) && !defined (ANDROID)
#elif LINUX
if ( buf.st_mode & S_IWRITE )
#elif ANDROID
if ( buf.st_mode & S_IWUSR )
#else
if ( buf.st_mode & S_IWRITE )
#endif
@@ -3816,8 +3812,6 @@ bool CBaseFileSystem::SetFileWritable( char const *pFileName, bool writable, con
#ifdef _WIN32
int pmode = writable ? ( _S_IWRITE | _S_IREAD ) : ( _S_IREAD );
#elif ANDROID
int pmode = writable ? ( S_IWUSR | S_IRUSR ) : ( S_IRUSR );
#else
int pmode = writable ? ( S_IWRITE | S_IREAD ) : ( S_IREAD );
#endif
-4
View File
@@ -972,11 +972,7 @@ void CStdioFile::FS_fclose()
AUTO_LOCK( m_MutexLockedFD );
struct _stat buf;
#ifdef ANDROID
int fd = fileno( m_pFile ); // need to test this
#else
int fd = fileno_unlocked( m_pFile );
#endif
fstat( fd, &buf );
fflush( m_pFile );