Index: /libmpc/trunk/mpc2sv8/mpc2sv8.c
===================================================================
--- /libmpc/trunk/mpc2sv8/mpc2sv8.c	(revision 362)
+++ /libmpc/trunk/mpc2sv8/mpc2sv8.c	(revision 363)
@@ -233,6 +233,6 @@
 	int c, i;
 	mpc_bool_t overwrite = MPC_FALSE, use_dir = MPC_FALSE;
+	int ret = MPC_STATUS_OK;
 	printf(About);
-	int ret = MPC_STATUS_OK;
 
 	while ((c = getopt(argc , argv, "oh")) != -1) {
Index: /libmpc/trunk/win32/basename.c
===================================================================
--- /libmpc/trunk/win32/basename.c	(revision 362)
+++ /libmpc/trunk/win32/basename.c	(revision 363)
@@ -48,6 +48,8 @@
      * in which to create a wide character reference copy of path
      */
-
-    wchar_t refcopy[1 + (len = mbstowcs( NULL, path, 0 ))];
+	  
+    wchar_t * refcopy, * refpath;
+    len = mbstowcs( NULL, path, 0 );
+    refcopy = malloc((1 + len) * sizeof(wchar_t));
 
     /* create the wide character reference copy of path,
@@ -55,5 +57,5 @@
      */
 
-    wchar_t *refpath = refcopy;
+    refpath = refcopy;
     if( ((len = mbstowcs( refpath, path, len )) > 1) && (refpath[1] == L':') )
     {
@@ -142,4 +144,5 @@
     }
 
+    free(refcopy);
     /* or we had an empty residual path name, after the drive designator,
      * in which case we simply fall through ...
Index: /libmpc/trunk/win32/dirent.c
===================================================================
--- /libmpc/trunk/win32/dirent.c	(revision 362)
+++ /libmpc/trunk/win32/dirent.c	(revision 363)
@@ -51,6 +51,4 @@
 
 #include <dirent.h>
-
-#include <unixem/unixem.h>
 
 #include <errno.h>
Index: /libmpc/trunk/win32/libgen.h
===================================================================
--- /libmpc/trunk/win32/libgen.h	(revision 362)
+++ /libmpc/trunk/win32/libgen.h	(revision 363)
@@ -14,13 +14,9 @@
 #define _LIBGEN_H_
 
-/* All the headers include this file. */
-#include <_mingw.h>
-
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-extern __cdecl __MINGW_NOTHROW char *basename (char *);
-extern __cdecl __MINGW_NOTHROW char *dirname  (char *);
+extern char *basename (char *);
 
 #ifdef __cplusplus
