1 /* ---------------------------------------------------------------------------
3 * (c) The GHC Team, 2001-2016
5 * Platform-independent path manipulation utilities
7 * --------------------------------------------------------------------------*/
11 // Use wchar_t for pathnames on Windows (#5697)
12 #if defined(mingw32_HOST_OS)
15 #define pathcmp wcscmp
16 #define pathlen wcslen
17 // N.B. Use the Win32-based file routines from utils/fs.
18 #define pathopen FS(fwopen)
19 #define pathstat FS(_wstat)
20 #define struct_stat struct _stat
23 #define pathprintf snwprintf
24 #define pathcopy wcscpy
25 #define pathsize sizeof(wchar_t)
27 #define pathcmp strcmp
28 #define pathlen strlen
29 #define pathopen fopen
31 #define struct_stat struct stat
33 #define pathprintf snprintf
34 #define pathsize sizeof(char)
35 #define pathcopy strcpy
38 #include "BeginPrivate.h"
40 pathchar
* pathdup(pathchar
*path
);
41 pathchar
* pathdir(pathchar
*path
);
42 pathchar
* mkPath(char* path
);
43 HsBool
endsWithPath(pathchar
* base
, pathchar
* str
);
45 #include "EndPrivate.h"