CmmLayoutStack: Add unwind information on stack fixups
[ghc.git] / rts / PathUtils.h
1 /* ---------------------------------------------------------------------------
2 *
3 * (c) The GHC Team, 2001-2016
4 *
5 * Platform-independent path manipulation utilities
6 *
7 * --------------------------------------------------------------------------*/
8
9 #ifndef PATH_UTILS_H
10 #define PATH_UTILS_H
11
12 #include "BeginPrivate.h"
13
14 // Use wchar_t for pathnames on Windows (#5697)
15 #if defined(mingw32_HOST_OS)
16 #define pathcmp wcscmp
17 #define pathlen wcslen
18 #define pathopen _wfopen
19 #define pathstat _wstat
20 #define struct_stat struct _stat
21 #define open wopen
22 #define WSTR(s) L##s
23 #define pathprintf swprintf
24 #define pathsize sizeof(wchar_t)
25 #else
26 #define pathcmp strcmp
27 #define pathlen strlen
28 #define pathopen fopen
29 #define pathstat stat
30 #define struct_stat struct stat
31 #define WSTR(s) s
32 #define pathprintf snprintf
33 #define pathsize sizeof(char)
34 #endif
35
36 pathchar* pathdup(pathchar *path);
37 pathchar* pathdir(pathchar *path);
38 pathchar* mkPath(char* path);
39 HsBool endsWithPath(pathchar* base, pathchar* str);
40
41 #include "EndPrivate.h"
42
43 #endif /* PATH_UTILS_H */