*
* \author Lars Gullik Bjønnes
*
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
*/
#include <config.h>
-#include <unistd.h>
+#include "support/lyxlib.h"
+#include "support/filename.h"
-#include "lyxlib.h"
-int lyx::support::unlink(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