diff options
author | Geoff Norton <grompf@gmail.com> | 2015-02-03 21:18:43 -0800 |
---|---|---|
committer | Geoff Norton <grompf@gmail.com> | 2015-02-06 16:24:36 -0800 |
commit | 495c00ff2353f1bf49e085c646fdd4b4ec658bba (patch) | |
tree | 4c7937a9b002578dcf4835d55dcbc52901f7d184 /src/pal/src/file/file.cpp | |
parent | a85beebc633d373bf3df4241ce7f86d76d7690ec (diff) | |
download | coreclr-495c00ff2353f1bf49e085c646fdd4b4ec658bba.tar.gz coreclr-495c00ff2353f1bf49e085c646fdd4b4ec658bba.tar.bz2 coreclr-495c00ff2353f1bf49e085c646fdd4b4ec658bba.zip |
Initial Mac OSX Support
Supports building up the VM, PAL and various components on Mac OSX 10.10
There are some oddities with the Apple assembler not generating short jumps
and not supporting 1 byte relocs.
Diffstat (limited to 'src/pal/src/file/file.cpp')
-rw-r--r-- | src/pal/src/file/file.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/pal/src/file/file.cpp b/src/pal/src/file/file.cpp index 976266ec71..69a9cffb19 100644 --- a/src/pal/src/file/file.cpp +++ b/src/pal/src/file/file.cpp @@ -1174,12 +1174,24 @@ DeleteFileA( dwLastError = FILEGetLastErrorFromErrnoAndFilename(lpUnixFileName); goto done; } + + lpFullUnixFileName = reinterpret_cast<LPSTR>(InternalMalloc(pThread, cchFullUnixFileName)); + if ( lpFullUnixFileName == NULL ) + { + ERROR("InternalMalloc() failed\n"); + palError = ERROR_NOT_ENOUGH_MEMORY; + goto done; + } + + // Initialize the path to zeroes... + ZeroMemory(lpFullUnixFileName, cchFullUnixFileName); // Compute the absolute pathname to the file. This pathname is used // to determine if two file names represent the same file. palError = InternalCanonicalizeRealPath(pThread, lpUnixFileName, lpFullUnixFileName, cchFullUnixFileName); if (palError != NO_ERROR) { + InternalFree(pThread, lpFullUnixFileName); lpFullUnixFileName = InternalStrdup(pThread, lpUnixFileName); if (!lpFullUnixFileName) { |