[Libreoffice-commits] .: 2 commits - tools/source
Tor Lillqvist
tml at kemper.freedesktop.org
Sun Jun 12 03:15:37 PDT 2011
tools/source/fsys/unx.cxx | 4 ++--
tools/source/stream/strmunx.cxx | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
New commits:
commit fc4a7a9c57c5f63e84bfbd9b497810b6e2c7e1a1
Author: Tor Lillqvist <tml at iki.fi>
Date: Sun Jun 12 13:15:11 2011 +0300
Prefer S_I[RW]USR to S_I{READ,WRITE} for portability
diff --git a/tools/source/stream/strmunx.cxx b/tools/source/stream/strmunx.cxx
index cc0b162..8fc841c 100644
--- a/tools/source/stream/strmunx.cxx
+++ b/tools/source/stream/strmunx.cxx
@@ -654,10 +654,10 @@ void SvFileStream::Open( const String& rFilename, StreamMode nOpenMode )
if ( nOpenMode & STREAM_TRUNC )
nAccess |= O_TRUNC;
- nMode = S_IREAD | S_IROTH | S_IRGRP;
+ nMode = S_IRUSR | S_IROTH | S_IRGRP;
if ( nOpenMode & STREAM_WRITE)
{
- nMode |= (S_IWRITE | S_IWOTH | S_IWGRP);
+ nMode |= (S_IWUSR | S_IWOTH | S_IWGRP);
if ( nOpenMode & STREAM_COPY_ON_SYMLINK )
{
@@ -695,7 +695,7 @@ void SvFileStream::Open( const String& rFilename, StreamMode nOpenMode )
// auf Lesen runterschalten
nAccessRW = O_RDONLY;
nAccess = 0;
- nMode = S_IREAD | S_IROTH | S_IRGRP;
+ nMode = S_IRUSR | S_IROTH | S_IRGRP;
nHandleTmp =open( aLocalFilename.GetBuffer(),
nAccessRW|nAccess,
nMode );
commit f19053e1691347c02e69056d987bd2bf9d9e97e3
Author: Tor Lillqvist <tml at iki.fi>
Date: Sun Jun 12 13:11:14 2011 +0300
Make it compile for Android
diff --git a/tools/source/fsys/unx.cxx b/tools/source/fsys/unx.cxx
index 90c7a94..a05e984 100644
--- a/tools/source/fsys/unx.cxx
+++ b/tools/source/fsys/unx.cxx
@@ -34,7 +34,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <utime.h>
-#if defined LINUX
+#if defined LINUX || defined ANDROID
#include <mntent.h>
#define mnttab mntent
#elif defined AIX
@@ -136,7 +136,7 @@ static sal_Bool GetMountEntry(dev_t dev, struct mymnttab *mytab)
return sal_False;
struct mnttab mnt[1];
while (getmntent (fp, mnt) != -1)
-#elif defined AIX
+#elif defined AIX || defined ANDROID
FILE *fp = NULL;
if (! fp)
return sal_False;
More information about the Libreoffice-commits
mailing list