#include <config.h>
#include "support/lyxlib.h"
+#include "support/filename.h"
-#include <unistd.h>
-int lyx::support::unlink(std::string const & pathname)
+namespace lyx {
+namespace support {
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+int unlink(FileName const & pathname)
{
- return ::unlink(pathname.c_str());
+ return ::unlink(pathname.toFilesystemEncoding().c_str());
}
+
+
+} // namespace support
+} // namespace lyx