summaryrefslogtreecommitdiff
path: root/src/pal/src/file
diff options
context:
space:
mode:
Diffstat (limited to 'src/pal/src/file')
-rw-r--r--src/pal/src/file/disk.cpp3
-rw-r--r--src/pal/src/file/file.cpp9
-rw-r--r--src/pal/src/file/path.cpp4
3 files changed, 5 insertions, 11 deletions
diff --git a/src/pal/src/file/disk.cpp b/src/pal/src/file/disk.cpp
index ef1d488b28..08880c9c20 100644
--- a/src/pal/src/file/disk.cpp
+++ b/src/pal/src/file/disk.cpp
@@ -26,10 +26,7 @@ Revision History:
#include "pal/stackstring.hpp"
#include <sys/param.h>
-#if !defined(_AIX)
-// do we actually need this on other platforms. We don't seem to be using anything from there
#include <sys/mount.h>
-#endif
#include <errno.h>
#if HAVE_STATVFS
#include <sys/types.h>
diff --git a/src/pal/src/file/file.cpp b/src/pal/src/file/file.cpp
index 6443a5e7b9..d70e62bd52 100644
--- a/src/pal/src/file/file.cpp
+++ b/src/pal/src/file/file.cpp
@@ -18,6 +18,9 @@ Abstract:
--*/
+#include "pal/dbgmsg.h"
+SET_DEFAULT_DEBUG_CHANNEL(FILE); // some headers have code with asserts, so do this first
+
#include "pal/thread.hpp"
#include "pal/file.hpp"
#include "shmfilelockmgr.hpp"
@@ -25,7 +28,6 @@ Abstract:
#include "pal/stackstring.hpp"
#include "pal/palinternal.h"
-#include "pal/dbgmsg.h"
#include "pal/file.h"
#include "pal/filetime.h"
#include "pal/utils.h"
@@ -42,8 +44,6 @@ Abstract:
using namespace CorUnix;
-SET_DEFAULT_DEBUG_CHANNEL(FILE);
-
int MaxWCharToAcpLengthFactor = 3;
PAL_ERROR
@@ -3657,12 +3657,9 @@ DWORD FILEGetLastErrorFromErrno( void )
case EEXIST:
dwRet = ERROR_ALREADY_EXISTS;
break;
-#if !defined(_AIX)
- // ENOTEMPTY is the same as EEXIST on AIX. Meaningful when involving directory operations
case ENOTEMPTY:
dwRet = ERROR_DIR_NOT_EMPTY;
break;
-#endif
case EBADF:
dwRet = ERROR_INVALID_HANDLE;
break;
diff --git a/src/pal/src/file/path.cpp b/src/pal/src/file/path.cpp
index c4ef31be32..d998b72b2e 100644
--- a/src/pal/src/file/path.cpp
+++ b/src/pal/src/file/path.cpp
@@ -494,8 +494,8 @@ GetTempPathA(
}
else /* env var not found or was empty */
{
- /* no luck, use /tmp/ */
- const char *defaultDir = "/tmp/";
+ /* no luck, use /tmp/ or /data/local/tmp on Android */
+ const char *defaultDir = TEMP_DIRECTORY_PATH;
int defaultDirLen = strlen(defaultDir);
if (defaultDirLen < nBufferLength)
{