Commit 356f7939 authored by Simon Marlow's avatar Simon Marlow

Fix printf formats for pathchar on Windows (where it's wchar_t, not char)

parent aa779e09
......@@ -16,8 +16,10 @@
#if defined(mingw32_HOST_OS)
typedef wchar_t pathchar;
#define PATH_FMT "ls"
#else
typedef char pathchar;
#define PATH_FMT "s"
#endif
/* initialize the object linker */
......
......@@ -254,7 +254,7 @@ void checkUnload (StgClosure *static_objects)
// Mark every unloadable object as unreferenced initially
for (oc = unloaded_objects; oc; oc = oc->next) {
IF_DEBUG(linker, debugBelch("Checking whether to unload %s\n",
IF_DEBUG(linker, debugBelch("Checking whether to unload %" PATH_FMT "\n",
oc->fileName));
oc->referenced = rtsFalse;
}
......@@ -290,12 +290,12 @@ void checkUnload (StgClosure *static_objects)
} else {
prev->next = oc->next;
}
IF_DEBUG(linker, debugBelch("Unloading object file %s\n",
IF_DEBUG(linker, debugBelch("Unloading object file %" PATH_FMT "\n",
oc->fileName));
freeObjectCode(oc);
} else {
IF_DEBUG(linker, debugBelch("Object file still in use: %s\n",
oc->fileName));
IF_DEBUG(linker, debugBelch("Object file still in use: %"
PATH_FMT "\n", oc->fileName));
}
}
......
......@@ -169,7 +169,6 @@ static ObjectCode* mkOc( pathchar *path, char *image, int imageSize,
#define struct_stat struct _stat
#define open wopen
#define WSTR(s) L##s
#define PATH_FMT "S"
#else
#define pathcmp strcmp
#define pathlen strlen
......@@ -177,7 +176,6 @@ static ObjectCode* mkOc( pathchar *path, char *image, int imageSize,
#define pathstat stat
#define struct_stat struct stat
#define WSTR(s) s
#define PATH_FMT "s"
#endif
static pathchar* pathdup(pathchar *path)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment