Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Vorlicek <janvorli@microsoft.com>2016-03-11 00:09:13 +0300
committerJan Vorlicek <janvorli@microsoft.com>2016-03-11 20:44:47 +0300
commit096c82deabf1e3fbe6b5f794b7a2e5c250b48ead (patch)
treec7143265a9f093eacf4c16867411294c5ab5e00b /src/Native/Runtime/PalRedhawk.h
parent654002d3cd76aa9f302257cb47791f1c806819a6 (diff)
Implement PalGetModuleFileName for Unix
This change implements PalGetModuleFileName for Unix. Since the module name passed to us is a utf-8 string, I have modified the signature of the function to use TCHAR and then modified managed RhGetModuleFileName interop signature to use byte* for Unix instead of char*. And I have also modified the called of this function, the TryGetFullPathToApplicationModule, to perform conversion of that to regular string.
Diffstat (limited to 'src/Native/Runtime/PalRedhawk.h')
-rw-r--r--src/Native/Runtime/PalRedhawk.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Native/Runtime/PalRedhawk.h b/src/Native/Runtime/PalRedhawk.h
index db1070e4d..3f05655bb 100644
--- a/src/Native/Runtime/PalRedhawk.h
+++ b/src/Native/Runtime/PalRedhawk.h
@@ -50,6 +50,12 @@ typedef void * LPOVERLAPPED;
#define WINBASEAPI __declspec(dllimport)
#endif //!GCENV_INCLUDED
+#ifdef PLATFORM_UNIX
+#define DIRECTORY_SEPARATOR_CHAR '/'
+#else // PLATFORM_UNIX
+#define DIRECTORY_SEPARATOR_CHAR '\\'
+#endif // PLATFORM_UNIX
+
typedef union _LARGE_INTEGER {
struct {
#if BIGENDIAN
@@ -708,7 +714,7 @@ REDHAWK_PALIMPORT UInt32 REDHAWK_PALAPI PalReadFileContents(_In_z_ const TCHAR *
REDHAWK_PALIMPORT bool REDHAWK_PALAPI PalGetMaximumStackBounds(_Out_ void** ppStackLowOut, _Out_ void** ppStackHighOut);
// Return value: number of characters in name string
-REDHAWK_PALIMPORT Int32 PalGetModuleFileName(_Out_ wchar_t** pModuleNameOut, HANDLE moduleBase);
+REDHAWK_PALIMPORT Int32 PalGetModuleFileName(_Out_ const TCHAR** pModuleNameOut, HANDLE moduleBase);
// Various intrinsic declarations needed for the PalGetCurrentTEB implementation below.
#if defined(_X86_)