=== modified file 'util/mkisofs/eltorito.c'
--- util/mkisofs/eltorito.c	2009-11-08 22:54:27 +0000
+++ util/mkisofs/eltorito.c	2009-11-09 15:39:57 +0000
@@ -111,7 +111,8 @@
     }
     
     buf = (char *) e_malloc( 2048 );
-    write(bcat, buf, 2048);
+    ssize_t tmp = write(bcat, buf, 2048);
+    (void) tmp;
     close(bcat);
     free(bootpath);
 } /* init_boot_catalog(... */
@@ -268,8 +269,9 @@
     /* 
      * write out 
      */
-    write(bootcat, &valid_desc, 32);
-    write(bootcat, &default_desc, 32);
+    ssize_t tmp = write(bootcat, &valid_desc, 32);
+    tmp = write(bootcat, &default_desc, 32);
+    (void) tmp;
     close(bootcat);
 } /* get_torito_desc(... */
 

=== modified file 'util/mkisofs/exclude.h'

=== modified file 'util/mkisofs/fnmatch.c'
--- util/mkisofs/fnmatch.c	2009-11-08 22:52:08 +0000
+++ util/mkisofs/fnmatch.c	2009-11-09 14:48:38 +0000
@@ -24,7 +24,7 @@
 #endif
 
 #include <errno.h>
-#include <fnmatch.h>
+#include "fnmatch.h"
 
 #ifndef	__STDC__
 #define	const

=== modified file 'util/mkisofs/hash.c'

=== added file 'util/mkisofs/include/fnmatch.h'
--- util/mkisofs/include/fnmatch.h	1970-01-01 00:00:00 +0000
+++ util/mkisofs/include/fnmatch.h	2009-11-09 14:53:34 +0000
@@ -0,0 +1,72 @@
+/* Copyright (C) 1991-93,96,97,98,99,2001,2004 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#ifndef	_FNMATCH_H
+#define	_FNMATCH_H	1
+
+#ifdef	__cplusplus
+extern "C" {
+#endif
+
+#ifndef const
+# if (defined __STDC__ && __STDC__) || defined __cplusplus
+#  define __const	const
+# else
+#  define __const
+# endif
+#endif
+
+/* We #undef these before defining them because some losing systems
+   (HP-UX A.08.07 for example) define these in <unistd.h>.  */
+#undef	FNM_PATHNAME
+#undef	FNM_NOESCAPE
+#undef	FNM_PERIOD
+
+/* Bits set in the FLAGS argument to `fnmatch'.  */
+#define	FNM_PATHNAME	(1 << 0) /* No wildcard can ever match `/'.  */
+#define	FNM_NOESCAPE	(1 << 1) /* Backslashes don't quote special chars.  */
+#define	FNM_PERIOD	(1 << 2) /* Leading `.' is matched only explicitly.  */
+
+#if !defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 2 || defined _GNU_SOURCE
+# define FNM_FILE_NAME	 FNM_PATHNAME	/* Preferred GNU name.  */
+# define FNM_LEADING_DIR (1 << 3)	/* Ignore `/...' after a match.  */
+# define FNM_CASEFOLD	 (1 << 4)	/* Compare without regard to case.  */
+# define FNM_EXTMATCH	 (1 << 5)	/* Use ksh-like extended matching. */
+#endif
+
+/* Value returned by `fnmatch' if STRING does not match PATTERN.  */
+#define	FNM_NOMATCH	1
+
+/* This value is returned if the implementation does not support
+   `fnmatch'.  Since this is not the case here it will never be
+   returned but the conformance test suites still require the symbol
+   to be defined.  */
+#ifdef _XOPEN_SOURCE
+# define FNM_NOSYS	(-1)
+#endif
+
+/* Match NAME against the filename pattern PATTERN,
+   returning zero if it matches, FNM_NOMATCH if not.  */
+extern int fnmatch (__const char *__pattern, __const char *__name,
+		    int __flags);
+
+#ifdef	__cplusplus
+}
+#endif
+
+#endif /* fnmatch.h */

=== modified file 'util/mkisofs/joliet.c'

=== modified file 'util/mkisofs/match.c'
--- util/mkisofs/match.c	2009-11-08 22:54:27 +0000
+++ util/mkisofs/match.c	2009-11-09 15:46:04 +0000
@@ -144,4 +144,3 @@
 {
   return (j_mat[0] != NULL);
 }
-

=== modified file 'util/mkisofs/match.h'

=== modified file 'util/mkisofs/mkisofs.c'

=== modified file 'util/mkisofs/mkisofs.h'
--- util/mkisofs/mkisofs.h	2009-11-08 22:54:27 +0000
+++ util/mkisofs/mkisofs.h	2009-11-09 15:29:59 +0000
@@ -48,6 +48,13 @@
 #define NON_UNIXFS
 #endif /* _WIN32 */
 
+#ifdef __MINGW32__
+#define S_IROTH		004
+#define S_IRGRP		040
+#undef u_char
+#define u_char		unsigned char
+#endif
+
 #include <string.h>
 #include <sys/types.h>
 #include <sys/stat.h>

=== modified file 'util/mkisofs/multi.c'
--- util/mkisofs/multi.c	2009-11-08 22:52:08 +0000
+++ util/mkisofs/multi.c	2009-11-09 15:29:47 +0000
@@ -1210,4 +1210,3 @@
   
   return 1;
 }
-

=== modified file 'util/mkisofs/name.c'

=== modified file 'util/mkisofs/rock.c'
--- util/mkisofs/rock.c	2009-11-08 22:54:27 +0000
+++ util/mkisofs/rock.c	2009-11-09 15:40:31 +0000
@@ -480,7 +480,8 @@
     OK_flag = 1;
 
     zipfile = fopen(whole_name, "rb");
-    fread(header, 1, sizeof(header), zipfile);
+    ssize_t tmp = fread(header, 1, sizeof(header), zipfile);
+    (void) tmp;
 
     /* Check some magic numbers from gzip. */
     if(header[0] != 0x1f || header[1] != 0x8b || header[2] != 8) OK_flag = 0;

=== modified file 'util/mkisofs/tree.c'
--- util/mkisofs/tree.c	2009-11-08 22:54:27 +0000
+++ util/mkisofs/tree.c	2009-11-09 15:29:16 +0000
@@ -147,7 +147,11 @@
 int
 FDECL2(lstat_filter, char *, path, struct stat *, st)
 {
+#ifdef __MINGW32__
+  int result = stat(path, st);
+#else
   int result = lstat(path, st);
+#endif
   if (result >= 0 && rationalize)
     stat_fix(st);
   return result;
@@ -1880,8 +1884,13 @@
 	}
       else
 	{
+#ifdef __MINGW32__
+	  fstatbuf.st_uid = 0;
+	  fstatbuf.st_gid = 0;
+#else
 	  fstatbuf.st_uid = getuid();
 	  fstatbuf.st_gid = getgid();
+#endif
 	}
       fstatbuf.st_ctime = current_time;
       fstatbuf.st_mtime = current_time;

=== modified file 'util/mkisofs/write.c'

