fixes from compiling code and running all the tests on NT
diff --git a/src/libFLAC/metadata_iterators.c b/src/libFLAC/metadata_iterators.c
index 46968c4..c67a573 100644
--- a/src/libFLAC/metadata_iterators.c
+++ b/src/libFLAC/metadata_iterators.c
@@ -2134,6 +2134,15 @@
(void)fclose(*tempfile);
*tempfile = 0;
+
+#if defined _MSC_VER || defined __MINGW32__
+ if(unlink(filename) < 0) {
+ cleanup_tempfile_(tempfile, tempfilename);
+ *status = FLAC__METADATA_SIMPLE_ITERATOR_STATUS_UNLINK_ERROR;
+ return false;
+ }
+#endif
+
/*@@@ to fully support the tempfile_path_prefix we need to update this piece to actually copy across filesystems instead of just rename(): */
if(0 != rename(*tempfilename, filename)) {
cleanup_tempfile_(tempfile, tempfilename);