diff -ur C:\FGCVS\tar\lib\closeout.c C:\Projects\tar\lib\closeout.c
--- C:\FGCVS\tar\lib\closeout.c	Sun Nov 18 11:46:56 2007
+++ C:\Projects\tar\lib\closeout.c	Thu Aug 14 17:32:07 2008
@@ -68,6 +68,9 @@
 void
 close_stdout (void)
 {
+#ifdef _MSC_VER   /* fflush(NULL) in place of close stdout, ... */
+   fflush(NULL);
+#else /* !_MSC_VER */
   if (close_stream (stdout) != 0)
     {
       char const *write_error = _("write error");
@@ -82,4 +85,5 @@
 
    if (close_stream (stderr) != 0)
      _exit (exit_failure);
+#endif /* _MSC_VER y/n */
 }
diff -ur C:\FGCVS\tar\lib\ftruncate.c C:\Projects\tar\lib\ftruncate.c
--- C:\FGCVS\tar\lib\ftruncate.c	Sun Nov 18 11:46:56 2007
+++ C:\Projects\tar\lib\ftruncate.c	Sat Aug 23 15:23:16 2008
@@ -81,6 +81,15 @@
 int
 ftruncate (int fd, off_t length)
 {
+#ifdef _MSC_VER   /* a WIN32 work-around for ftruncate - maybe */
+  /* maybe use SetEndOfFile( HANDLE )??? */
+  off_t position = _lseek(fd, length, SEEK_SET);
+  if( ( position != -1 ) && ( position == length ) )
+  {
+     if( SetEndOfFile( (HANDLE)fd ) )
+        return 0;
+  }
+#endif /* _MSC_VER */
   errno = EIO;
   return -1;
 }
diff -ur C:\FGCVS\tar\lib\getdate.c C:\Projects\tar\lib\getdate.c
--- C:\FGCVS\tar\lib\getdate.c	Sat Feb 16 13:14:36 2008
+++ C:\Projects\tar\lib\getdate.c	Sat Aug 23 15:23:16 2008
@@ -228,8 +228,9 @@
    wraps around, but there's no portable way to check for that at
    compile-time.  */
 verify (TYPE_IS_INTEGER (time_t));
+#ifndef _MSC_VER  /* can not get 'verify()' to work in some cases */
 verify (LONG_MIN <= TYPE_MINIMUM (time_t) && TYPE_MAXIMUM (time_t) <= LONG_MAX);
-
+#endif /* !_MSC_VER */
 /* An integer value, and the number of digits in its textual
    representation.  */
 typedef struct
@@ -3062,6 +3063,9 @@
   pc.dsts_seen = 0;
   pc.zones_seen = 0;
 
+  pc.local_time_zone_table[0].name = NULL; /* _MSC_VER - null these to */
+  pc.local_time_zone_table[1].name = NULL; /* pacify the compiler ;=)) */
+
 #if HAVE_STRUCT_TM_TM_ZONE
   pc.local_time_zone_table[0].name = tmp->tm_zone;
   pc.local_time_zone_table[0].type = tLOCAL_ZONE;
@@ -3106,6 +3110,19 @@
   }
 #else
   pc.local_time_zone_table[0].name = NULL;
+#ifdef _MSC_VER   /* use _get_tzname() function to retrieve name */
+  {
+     static char tzname0[TZNAME_MAX];
+     static char tzname1[TZNAME_MAX];
+     size_t retval;
+     retval = 0;
+     if(( _get_tzname( &retval, tzname0, TZNAME_MAX, 0 ) == 0 ) && retval )
+        pc.local_time_zone_table[0].name = tzname0;
+     retval = 0;
+     if(( _get_tzname( &retval, tzname0, TZNAME_MAX, 1 ) == 0 ) && retval )
+        pc.local_time_zone_table[1].name = tzname0;
+  }
+#endif /* _MSC_VER */
 #endif
 #endif
 
diff -ur C:\FGCVS\tar\lib\localcharset.c C:\Projects\tar\lib\localcharset.c
--- C:\FGCVS\tar\lib\localcharset.c	Tue Oct 30 21:48:28 2007
+++ C:\Projects\tar\lib\localcharset.c	Thu Aug 14 17:43:44 2008
@@ -68,7 +68,9 @@
 
 /* Get LIBDIR.  */
 #ifndef LIBDIR
+#ifndef _MSC_VER  /* no configmake.h */
 # include "configmake.h"
+#endif /* !_MSC_VER */
 #endif
 
 #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
diff -ur C:\FGCVS\tar\lib\mkdirat.c C:\Projects\tar\lib\mkdirat.c
--- C:\FGCVS\tar\lib\mkdirat.c	Sun Nov 18 11:46:56 2007
+++ C:\Projects\tar\lib\mkdirat.c	Fri Aug 22 19:01:19 2008
@@ -38,5 +38,11 @@
 #define AT_FUNC_F2 mkdir
 #define AT_FUNC_USE_F1_COND 1
 #define AT_FUNC_POST_FILE_PARAM_DECLS , mode_t mode
+#ifdef _MSC_VER
+/* in WIN32, mkdir only take the name, no mode */
+#define AT_FUNC_POST_FILE_ARGS   /* empty for WIN32 */
+#else
 #define AT_FUNC_POST_FILE_ARGS        , mode
+#endif
+
 #include "at-func.c"
diff -ur C:\FGCVS\tar\lib\mktime.c C:\Projects\tar\lib\mktime.c
--- C:\FGCVS\tar\lib\mktime.c	Tue Oct 30 21:48:30 2007
+++ C:\Projects\tar\lib\mktime.c	Thu Aug 14 17:43:44 2008
@@ -167,8 +167,10 @@
 	    int year0, int yday0, int hour0, int min0, int sec0)
 {
   verify (C99_integer_division, -1 / 2 == 0);
+#ifndef _MSC_VER /* can not get verify() to work in all cases? */
   verify (long_int_year_and_yday_are_wide_enough,
 	  INT_MAX <= LONG_MAX / 2 || TIME_T_MAX <= UINT_MAX);
+#endif /* !_MSC_VER */
 
   /* Compute intervening leap days correctly even if year is negative.
      Take care to avoid integer overflow here.  */
diff -ur C:\FGCVS\tar\lib\openat-proc.c C:\Projects\tar\lib\openat-proc.c
--- C:\FGCVS\tar\lib\openat-proc.c	Sun Nov 18 11:46:56 2007
+++ C:\Projects\tar\lib\openat-proc.c	Sat Aug 16 11:05:35 2008
@@ -54,6 +54,18 @@
 {
   static int proc_status = 0;
 
+#ifdef _MSC_VER /* replace open ("/proc/self/fd", O_RDONLY); with success */
+  if (! proc_status)
+     proc_status = 1;
+  if ( proc_status > 0 )
+  {
+      size_t bufsize = PROC_SELF_FD_NAME_SIZE_BOUND (strlen (file));
+      char *result = (bufsize < OPENAT_BUFFER_SIZE ? buf : xmalloc (bufsize));
+      strcpy (result, file);
+      return result;
+  }
+  return NULL;
+#else /* !_MSC_VER */
   if (! proc_status)
     {
       /* Set PROC_STATUS to a positive value if /proc/self/fd is
@@ -91,4 +103,5 @@
       sprintf (result, PROC_SELF_FD_FORMAT, fd, file);
       return result;
     }
+#endif /* _MSC_VER y/n */
 }
diff -ur C:\FGCVS\tar\lib\openat.c C:\Projects\tar\lib\openat.c
--- C:\FGCVS\tar\lib\openat.c	Sun Nov 18 11:46:56 2007
+++ C:\Projects\tar\lib\openat.c	Thu Aug 14 17:43:44 2008
@@ -56,8 +56,11 @@
 
       va_end (arg);
     }
-
+#ifdef _MSC_VER /* do open, since openat_permissive resolves to openat */
+  return open (file, flags, mode);
+#else /* !_MSC_VER */
   return openat_permissive (fd, file, flags, mode, NULL);
+#endif /* _MSC_VER y/n */
 }
 
 /* Like openat (FD, FILE, FLAGS, MODE), but if CWD_ERRNO is
@@ -71,6 +74,7 @@
    It is the caller's responsibility not to call this function
    in that case.  */
 
+#ifdef __OPENAT_PREFIX
 int
 openat_permissive (int fd, char const *file, int flags, mode_t mode,
 		   int *cwd_errno)
@@ -154,6 +158,7 @@
 
   return needs_fchdir;
 }
+#endif /* ifdef __OPENAT_PREFIX */
 
 #if !HAVE_FDOPENDIR
 
diff -ur C:\FGCVS\tar\lib\rtapelib.c C:\Projects\tar\lib\rtapelib.c
--- C:\FGCVS\tar\lib\rtapelib.c	Sun Aug 12 09:57:16 2007
+++ C:\Projects\tar\lib\rtapelib.c	Thu Aug 14 17:43:44 2008
@@ -60,7 +60,9 @@
 #endif
 
 #include <rmt.h>
+#ifndef _MSC_VER /* no rmt-command.h */
 #include <rmt-command.h>
+#endif /* !_MSC_VER */
 
 /* Exit status if exec errors.  */
 #define EXIT_ON_EXEC_ERROR 128
@@ -118,6 +120,9 @@
 static int
 do_command (int handle, const char *buffer)
 {
+#ifdef _MSC_VER /* remove pipe from do_command() */
+   return -1;
+#else /* !_MSC_VER */
   /* Save the current pipe handler and try to make the request.  */
 
   size_t length = strlen (buffer);
@@ -132,6 +137,7 @@
 
   _rmt_shutdown (handle, EIO);
   return -1;
+#endif /* _MSC_VER y/n */
 }
 
 static char *
@@ -361,6 +367,9 @@
 rmt_open__ (const char *file_name, int open_mode, int bias,
             const char *remote_shell)
 {
+#ifdef _MSC_VER /* remove pipe from rmt_open__ */
+   return -1;
+#else /* !_MSC_VER */
   int remote_pipe_number;	/* pseudo, biased file descriptor */
   char *file_name_copy;		/* copy of file_name string */
   char *remote_host;		/* remote host name */
@@ -541,6 +550,7 @@
 
   free (file_name_copy);
   return remote_pipe_number + bias;
+#endif /* _MSC_VER y/n */
 }
 
 /* Close remote tape connection HANDLE and shut down.  Return 0 if
@@ -591,6 +601,9 @@
 size_t
 rmt_write__ (int handle, char *buffer, size_t length)
 {
+#ifdef _MSC_VER /* remove pipe from rmt_write__ */
+   return 0;
+#else /* !_MSC_VER */
   char command_buffer[COMMAND_BUFFER_SIZE];
   RETSIGTYPE (*pipe_handler) ();
   size_t written;
@@ -616,6 +629,7 @@
 
   _rmt_shutdown (handle, EIO);
   return written;
+#endif /* _MSC_VER y/n */
 }
 
 /* Perform an imitation lseek operation on remote tape connection
diff -ur C:\FGCVS\tar\lib\savedir.c C:\Projects\tar\lib\savedir.c
--- C:\FGCVS\tar\lib\savedir.c	Sun Nov 18 11:46:56 2007
+++ C:\Projects\tar\lib\savedir.c	Sat Aug 16 12:02:35 2008
@@ -129,8 +129,16 @@
    the end is marked by two '\0' characters in a row.
    Return NULL (setting errno) if FD cannot be read or closed.  */
 
+#ifdef _MSC_VER
+char *
+fdsavedir (char * dir_name)
+{
+  return savedirstream (opendir (dir_name));
+}
+#else /* !_MSC_VER */
 char *
 fdsavedir (int fd)
 {
   return savedirstream (fdopendir (fd));
 }
+#endif /* _MSC_VER y/n */
diff -ur C:\FGCVS\tar\lib\savedir.h C:\Projects\tar\lib\savedir.h
--- C:\FGCVS\tar\lib\savedir.h	Sun Nov 18 11:46:56 2007
+++ C:\Projects\tar\lib\savedir.h	Sat Aug 16 12:02:35 2008
@@ -21,6 +21,10 @@
 # define SAVEDIR_H_
 
 char *savedir (char const *dir);
+#ifdef _MSC_VER /* replace fdasvedir(FD) with (struct tar_stat_info *st) */
+char *fdsavedir (char * dir_name);
+#else /* !_MSC_VER */
 char *fdsavedir (int fd);
+#endif /* _MSC_VER y/n */
 
 #endif
diff -ur C:\FGCVS\tar\lib\setenv.c C:\Projects\tar\lib\setenv.c
--- C:\FGCVS\tar\lib\setenv.c	Thu Feb 28 08:40:08 2008
+++ C:\Projects\tar\lib\setenv.c	Sat Aug 23 14:29:44 2008
@@ -107,6 +107,29 @@
 __add_to_environ (const char *name, const char *value, const char *combined,
 		  int replace)
 {
+#ifdef _MSC_VER   /* fix __add_to_environment() for WIN32 */
+   int   rval = -1;
+   char * new_value;
+   if( !name || !value || strlen(name) == 0 || *name == 0 )
+   {
+      return rval;
+   }
+	new_value = (char *) malloc (strlen(name) + strlen(value) + 2);
+   if (new_value == NULL)
+	{
+      __set_errno (ENOMEM);
+      return rval;
+   }
+   strcpy(new_value, name);
+   strcat(new_value, "=");
+   strcat(new_value, value);
+   if( _putenv(new_value) == 0 )
+   {
+      rval = 0;   /* no error */
+   }
+   free(new_value);
+   return rval;
+#else /* !_MSC_VER */
   register char **ep;
   register size_t size;
   const size_t namelen = strlen (name);
@@ -276,6 +299,7 @@
   UNLOCK;
 
   return 0;
+#endif /* _MSC_VER y/n */
 }
 
 int
diff -ur C:\FGCVS\tar\lib\stdopen.c C:\Projects\tar\lib\stdopen.c
--- C:\FGCVS\tar\lib\stdopen.c	Mon Oct 22 18:48:04 2007
+++ C:\Projects\tar\lib\stdopen.c	Thu Aug 14 17:43:45 2008
@@ -41,7 +41,9 @@
 {
   int fd;
   bool ok = true;
-
+#ifdef _MSC_VER /* stdopen() - are already open in WIN32 */
+  fd = 0;
+#else /* !_MSC_VER */
   for (fd = 0; fd <= 2; fd++)
     {
       if (fcntl (fd, F_GETFD) < 0)
@@ -73,5 +75,6 @@
         }
     }
 
+#endif /* _MSC_VER y/n */
   return ok;
 }
diff -ur C:\FGCVS\tar\lib\strtoimax.c C:\Projects\tar\lib\strtoimax.c
--- C:\FGCVS\tar\lib\strtoimax.c	Sun Nov 18 11:46:56 2007
+++ C:\Projects\tar\lib\strtoimax.c	Thu Aug 14 17:43:45 2008
@@ -68,7 +68,9 @@
   if (sizeof (Int) != sizeof (Unsigned long int))
     return strtoll (ptr, endptr, base);
 #else
+#ifndef _MSC_VER /* verify() fails in some cases */
   verify (sizeof (Int) == sizeof (Unsigned long int));
+#endif /* !_MSC_VER */
 #endif
 
   return strtol (ptr, endptr, base);
diff -ur C:\FGCVS\tar\lib\system.h C:\Projects\tar\lib\system.h
--- C:\FGCVS\tar\lib\system.h	Mon Feb 18 18:44:36 2008
+++ C:\Projects\tar\lib\system.h	Thu Aug 14 13:53:49 2008
@@ -460,7 +460,7 @@
 # include <grp.h>
 #endif
 
-#if MSDOS
+#if MSDOS || WIN32
 # include <process.h>
 # define SET_BINARY_MODE(arc) setmode(arc, O_BINARY)
 # define ERRNO_IS_EACCES errno == EACCES
diff -ur C:\FGCVS\tar\lib\tempname.c C:\Projects\tar\lib\tempname.c
--- C:\FGCVS\tar\lib\tempname.c	Sun Nov 18 11:46:56 2007
+++ C:\Projects\tar\lib\tempname.c	Sat Aug 23 14:52:23 2008
@@ -68,7 +68,12 @@
 # define __gen_tempname gen_tempname
 # define __getpid getpid
 # define __gettimeofday gettimeofday
+#ifdef _MSC_VER /* mkdir only takes 1 parameter 
+ it will also ONLY create if last is the only missing directory */
+# define __mkdir(a,b) mkdir(a)
+#else /* !_MSC_VER */
 # define __mkdir mkdir
+#endif /* _MSC_VER y/n */
 # define __lxstat64(version, file, buf) lstat (file, buf)
 # define __xstat64(version, file, buf) stat (file, buf)
 #endif
diff -ur C:\FGCVS\tar\lib\unsetenv.c C:\Projects\tar\lib\unsetenv.c
--- C:\FGCVS\tar\lib\unsetenv.c	Thu Feb 28 08:40:08 2008
+++ C:\Projects\tar\lib\unsetenv.c	Sat Aug 23 14:09:53 2008
@@ -47,7 +47,25 @@
 # define unsetenv __unsetenv
 #endif
 
+#ifdef _MSC_VER
+int
+unsetenv (const char *name)
+{
+  size_t len;
+  if (name == NULL || *name == '\0' || strchr (name, '=') != NULL)
+  {
+      __set_errno (EINVAL);
+      return -1;
+  }
+  if( _putenv(name) )
+  {
+      __set_errno (EINVAL);
+      return -1;
+  }
+  return 0;
+}
 
+#else /* !_MSC_VER */
 int
 unsetenv (const char *name)
 {
@@ -88,3 +106,5 @@
 # undef unsetenv
 weak_alias (__unsetenv, unsetenv)
 #endif
+
+#endif /* _MSC_VER y/n */
diff -ur C:\FGCVS\tar\lib\utimens.c C:\Projects\tar\lib\utimens.c
--- C:\FGCVS\tar\lib\utimens.c	Fri Feb 08 20:26:12 2008
+++ C:\Projects\tar\lib\utimens.c	Thu Aug 14 17:43:45 2008
@@ -173,8 +173,21 @@
       }
     else
       ut = NULL;
-
+#ifdef _MSC_VER /* setting time of read only files fails */
+    { /* CAN NOT SET TIME ON READ ONLY FILES, (nor DIRECTORIES) */
+       int res = utime (file, ut);  /* try it ... */
+       int uerr = errno;            /* get errno  */
+       if (( res == -1 )&&(uerr == EACCES)) {   /* if FAILED due to 'access' */
+          res = _chmod( file, _S_IREAD | _S_IWRITE ); /* try removing WRITE block */
+          if( res == 0 ) { /* if that succeeds ... */
+             res = utime (file, ut);   /* try again now ... */
+          }
+       }
+       return res;
+    }
+#else /* !_MSC_VER */
     return utime (file, ut);
+#endif /* _MSC_VER y/n */
   }
 #endif
 }
diff -ur C:\FGCVS\tar\rmt\rmt.c C:\Projects\tar\rmt\rmt.c
--- C:\FGCVS\tar\rmt\rmt.c	Wed Jun 27 15:49:46 2007
+++ C:\Projects\tar\rmt\rmt.c	Thu Aug 14 17:43:44 2008
@@ -34,7 +34,9 @@
 #include "system.h"
 #include "system-ioctl.h"
 #include <closeout.h>
+#ifndef _MSC_VER /* no configmake.h */
 #include <configmake.h>
+#endif /* !_MSC_VER */
 #include <safe-read.h>
 #include <full-write.h>
 #include <version-etc.h>
diff -ur C:\FGCVS\tar\src\buffer.c C:\Projects\tar\src\buffer.c
--- C:\FGCVS\tar\src\buffer.c	Mon Feb 04 11:36:52 2008
+++ C:\Projects\tar\src\buffer.c	Fri Aug 22 15:46:54 2008
@@ -269,7 +269,6 @@
 		     MODE_RW, rsh_command_option);
   if (archive == -1)
     return archive;
-
   if (!multi_volume_option)
     {
       bool shortfile;
@@ -472,6 +471,7 @@
 
   records_read = 0;
 
+#ifndef _MSC_VER  /* z option - no fork here */
   if (use_compress_program_option)
     {
       switch (wanted_access)
@@ -540,6 +540,7 @@
     archive = rmtopen (archive_name_array[0], O_RDWR | O_CREAT | O_BINARY,
 		       MODE_RW, rsh_command_option);
   else
+#endif /* !_MSC_VER */
     switch (wanted_access)
       {
       case ACCESS_READ:
@@ -1332,8 +1333,8 @@
       memset (&st, 0, sizeof st);
       st.orig_file_name = st.file_name = real_s_name;
       st.stat.st_mode = S_IFREG|S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH;
-      st.stat.st_uid = getuid ();
-      st.stat.st_gid = getgid ();
+      st.stat.st_uid = (short)getuid ();
+      st.stat.st_gid = (short)getgid ();
       st.orig_file_name = xheader_format_name (&st,
 					       "%d/GNUFileParts.%p/%f.%n",
 					       real_s_part_no);
@@ -1520,6 +1521,31 @@
   for (;;)
     {
       status = rmtread (archive, record_start->buffer, record_size);
+#ifdef DBGV5
+        if( verbose_option >= DBGV5 )
+        {
+           static int _s_read_cnt = 0;
+           extern __int64 dbg_roffset;
+           _s_read_cnt++;
+           if( status >= 0 )
+           {
+               fprintf( stdlis, "\n%d: Read %d bytes into buffer %X, from %d fd (from off %#I64X - %#I64X)\n",
+                  _s_read_cnt, status, record_start->buffer, archive,
+                  dbg_roffset, (dbg_roffset + status) );
+#ifdef HEAVY_DEBUG_DELETE
+                  print_hex( record_start->buffer, status, "in", dbg_roffset );
+#endif /* HEAVY_DEBUG_DELETE */
+               dbg_roffset += status;
+           }
+           else
+           {
+               fprintf( stdlis, "\n%d: FAILED read, from %d fd, errno = %d (from off %#I64X)\n",
+                  _s_read_cnt, archive, errno,
+                  dbg_roffset );
+           }
+         }
+#endif /* DBGV5 */
+
       if (status == record_size)
 	{
 	  records_read++;
@@ -1674,3 +1700,21 @@
     }
   set_volume_start_time ();
 }
+
+#ifdef NEW_DELETE_FUNCTION /* write a NEW achive, without 'deleted' members */
+void add_bytes_written( int len )
+{
+   bytes_written += len;
+}
+tarlong get_bytes_written( void )
+{
+   return bytes_written;
+}
+tarlong get_prev_written( void )
+{
+   return prev_written;
+}
+#endif /* NEW_DELETE_FUNCTION */
+
+/* eof - buffer.c */
+
diff -ur C:\FGCVS\tar\src\create.c C:\Projects\tar\src\create.c
--- C:\FGCVS\tar\src\create.c	Mon Apr 14 14:03:12 2008
+++ C:\Projects\tar\src\create.c	Fri Aug 22 20:21:11 2008
@@ -1251,7 +1251,11 @@
 static bool
 dump_dir (int fd, struct tar_stat_info *st, int top_level, dev_t parent_device)
 {
+#ifdef _MSC_VER /* replace fdsavedir(FD), fdsavedir(char * dir_name) */
+  char *directory = fdsavedir (st->file_name);
+#else /* !_MSC_VER */
   char *directory = fdsavedir (fd);
+#endif /* _MSC_VER y/n */
   if (!directory)
     {
       savedir_diag (st->orig_file_name);
@@ -1561,6 +1565,10 @@
 
       if (is_dir || file_dumpable_p (st))
 	{
+#ifdef _MSC_VER /* no attempt to open a DIRECTORY in WIN32 */
+      if(is_dir)
+         goto Do_DIR;
+#endif /* _MSC_VER */
 	  fd = open (p,
 		     (O_RDONLY | O_BINARY
 		      | (is_dir ? O_DIRECTORY | O_NONBLOCK : 0)
@@ -1578,6 +1586,9 @@
 	    }
 	}
 
+#ifdef _MSC_VER /* jump vector, for open DIR failing */
+Do_DIR:
+#endif /* _MSC_VER */
       if (is_dir)
 	{
 	  const char *tag_file_name;
diff -ur C:\FGCVS\tar\src\delete.c C:\Projects\tar\src\delete.c
--- C:\FGCVS\tar\src\delete.c	Wed Jun 27 15:30:32 2007
+++ C:\Projects\tar\src\delete.c	Sat Aug 23 12:41:38 2008
@@ -26,6 +26,7 @@
 static union block *new_record;
 static int new_blocks;
 static bool acting_as_filter;
+bool windelete_option = 1;  /* be able to off and on the win delete function */
 
 /* FIXME: This module should not directly handle the following
    variables, instead, the interface should be cleaned up.  */
@@ -45,12 +46,20 @@
    positive we move forward, else we move negative.  If it's a tape,
    MTIOCTOP had better work.  If it's something else, we try to seek
    on it.  If we can't seek, we lose!  */
+
 static void
 move_archive (off_t count)
 {
   if (count == 0)
     return;
 
+#ifdef _MSC_VER
+  {
+     extern void win_move_archive (off_t count);
+     win_move_archive( count );
+     return;
+  }
+#endif /* _MSC_VER */
 #ifdef MTIOCTOP
   {
     struct mtop operation;
@@ -90,6 +99,7 @@
 
 /* Write out the record which has been filled.  If MOVE_BACK_FLAG,
    backspace to where we started.  */
+
 static void
 write_record (int move_back_flag)
 {
@@ -160,9 +170,19 @@
   off_t blocks_to_keep = 0;
   int kept_blocks_in_record;
 
+  acting_as_filter = strcmp (archive_name_array[0], "-") == 0;
+
+#ifdef NEW_DELETE_FUNCTION /* write a NEW achive, without 'deleted' members */
+  if ( !acting_as_filter && windelete_option )
+  {
+      extern void win_delete_archive_members (void);
+      win_delete_archive_members();
+      return;
+  }
+#endif /* NEW_DELETE_FUNCTION */
+
   name_gather ();
   open_archive (ACCESS_UPDATE);
-  acting_as_filter = strcmp (archive_name_array[0], "-") == 0;
 
   do
     {
diff -ur C:\FGCVS\tar\src\extract.c C:\Projects\tar\src\extract.c
--- C:\FGCVS\tar\src\extract.c	Sun Aug 26 10:56:56 2007
+++ C:\Projects\tar\src\extract.c	Thu Aug 14 17:46:36 2008
@@ -260,6 +260,10 @@
 	  ts[1] = st->mtime;
 
 	  if (utimens (file_name, ts) != 0)
+#ifdef _MSC_VER /* fail expected if DIR */
+        /* a FAIL is expected if it is a DIRECTORY! */
+         if ( !st->is_dumpdir )
+#endif   /* _MSC_VER */
 	    utime_error (file_name);
 	  else
 	    {
@@ -453,13 +457,14 @@
 
       if (errno == EEXIST)
 	continue;	        /* Directory already exists.  */
+#ifndef _MSC_VER /* diff errno in WIN32 */
       else if ((errno == ENOSYS /* Automounted dirs on Solaris return
 				   this. Reported by Warren Hyde
 				   <Warren.Hyde@motorola.com> */
 	       || ERRNO_IS_EACCES)  /* Turbo C mkdir gives a funny errno.  */
 	       && access (file_name, W_OK) == 0)
 	continue;
-
+#endif /* !_MSC_VER */
       /* Some other error in the mkdir.  We return to the caller.  */
       break;
     }
@@ -923,6 +928,16 @@
   if (! absolute_names_option && contains_dot_dot (link_name))
     return create_placeholder_file (file_name, false, &interdir_made);
 
+#ifdef _MSC_VER /* replace link() with stat() for WIN32 */
+  do
+  {
+      struct stat st1;
+      if( lstat (link_name, &st1) == 0 )
+         errno = EEXIST;
+
+  } while(0);
+
+#else /* !_MSC_VER */
   do
     {
       struct stat st1, st2;
@@ -958,6 +973,7 @@
       errno = e;
     }
   while (maybe_recoverable (file_name, &interdir_made));
+#endif /* _MSC_VER y/n */
 
   if (!(incremental_option && errno == EEXIST))
     {
@@ -1007,6 +1023,9 @@
 static int
 extract_node (char *file_name, int typeflag)
 {
+#ifdef _MSC_VER /* no extract_node() */
+   return -1;
+#else /* !_MSC_VER */
   int status;
   int interdir_made = 0;
   mode_t mode = current_stat_info.stat.st_mode & ~ current_umask;
@@ -1024,6 +1043,7 @@
     set_stat (file_name, &current_stat_info, NULL, invert_permissions,
 	      ARCHIVED_PERMSTATUS, typeflag);
   return status;
+#endif /* _MSC_VER y/n */
 }
 #endif
 
@@ -1273,6 +1293,7 @@
 	      && st.st_ino == ds->ino
 	      && timespec_cmp (get_stat_mtime (&st), ds->mtime) == 0)
 	    {
+#ifndef _MSC_VER /* remove link() and symlink() */
 	      /* Unlink the placeholder, then create a hard link if possible,
 		 a symbolic link otherwise.  */
 	      if (unlink (source) != 0)
@@ -1287,6 +1308,7 @@
 	      else if (symlink (ds->target, source) != 0)
 		symlink_error (ds->target, source);
 	      else
+#endif /* !_MSC_VER */
 		{
 		  struct tar_stat_info st1;
 		  st1.stat.st_uid = ds->uid;
diff -ur C:\FGCVS\tar\src\list.c C:\Projects\tar\src\list.c
--- C:\FGCVS\tar\src\list.c	Mon Oct 29 18:53:06 2007
+++ C:\Projects\tar\src\list.c	Wed Aug 20 20:52:28 2008
@@ -19,13 +19,16 @@
    with this program; if not, write to the Free Software Foundation, Inc.,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
+#include <config.h>  /* just added TEMPORARILY for a good reason ;=)) */
 #include <system.h>
 #include <inttostr.h>
 #include <quotearg.h>
 
 #include "common.h"
 
+#ifndef max
 #define max(a, b) ((a) < (b) ? (b) : (a))
+#endif /* !max */
 
 union block *current_header;	/* points to current archive header */
 enum archive_format current_format; /* recognized format */
@@ -102,6 +105,17 @@
 		      OLDER_TAR_STAT_TIME (current_stat_info, m)))
 	      || excluded_name (current_stat_info.file_name))
 	    {
+#ifdef DBGV5
+          /* this is being excluded, but still show it for debug */
+         if( verbose_option >= DBGV5 )
+         {
+            off_t block_ordinal = current_block_ordinal ();
+            decode_header (current_header,
+				    &current_stat_info, &current_format, 0);
+            fprintf (stdlis, "v5: ");  /* start output with 'v5: ' ... */
+            print_header (&current_stat_info, block_ordinal);
+         }
+#endif /* DBGV5 */
 	      switch (current_header->header.typeflag)
 		{
 		case GNUTYPE_VOLHDR:
diff -ur C:\FGCVS\tar\src\misc.c C:\Projects\tar\src\misc.c
--- C:\FGCVS\tar\src\misc.c	Wed Jun 27 15:30:32 2007
+++ C:\Projects\tar\src\misc.c	Thu Aug 14 17:55:02 2008
@@ -341,11 +341,26 @@
       if (unlink (file_name) == 0)
 	return 1;
 
+#ifdef _MSC_VER /* deal with unlink() failed in WIN32 */
+      /* WIN32 specific - unlink FAILS on READ ONLY files */
+      if ( errno == ENOENT ) /* file or path is not found */
+         return 1;   /* or the path specified a directory */
+      if ( errno == EACCES ) /* read-only file */
+      {
+         if( _chmod( file_name, (_S_IREAD | _S_IWRITE) ) == 0 )
+         {
+            /* now try to delete it ...*/
+            if (unlink (file_name) == 0)
+               return 1;
+         }
+      }
+#else /* !_MSC_VER */
       /* POSIX 1003.1-2001 requires EPERM when attempting to unlink a
 	 directory without appropriate privileges, but many Linux
 	 kernels return the more-sensible EISDIR.  */
       if (errno != EPERM && errno != EISDIR)
 	return 0;
+#endif /* _MSC_VER y/n */
     }
 
   if (safer_rmdir (file_name) == 0)
@@ -706,18 +721,27 @@
 pid_t
 xfork (void)
 {
+#ifdef _MSC_VER /* no fork() in WIN32 */
+   call_arg_fatal ("fork", _("child process - not in WIN32"));
+   return -1;
+#else /* !_MSC_VER */
   pid_t p = fork ();
   if (p == (pid_t) -1)
     call_arg_fatal ("fork", _("child process"));
   return p;
+#endif /* _MSC_VER y/n */
 }
 
 /* Create a pipe, aborting if unsuccessful.  */
 void
 xpipe (int fd[2])
 {
+#ifdef _MSC_VER /* no pipe() in WIN32 */
+   call_arg_fatal ("pipe", _("interprocess channel not in WIN32"));
+#else /* !_MSC_VER */
   if (pipe (fd) < 0)
     call_arg_fatal ("pipe", _("interprocess channel"));
+#endif /* _MSC_VER y/n */
 }
 
 /* Return PTR, aligned upward to the next multiple of ALIGNMENT.
diff -ur C:\FGCVS\tar\src\names.c C:\Projects\tar\src\names.c
--- C:\FGCVS\tar\src\names.c	Wed Feb 20 15:16:52 2008
+++ C:\Projects\tar\src\names.c	Fri Aug 22 14:08:52 2008
@@ -24,6 +24,82 @@
 #include <quotearg.h>
 
 #include "common.h"
+
+#ifdef _MSC_VER   /* struct passwd and group declared */
+/* =================================================================
+   some fill ins for windows
+   ================================================================= */
+
+#ifndef passwd
+/* The passwd structure.  */
+struct passwd
+{
+  char *pw_name;		/* Username.  */
+  char *pw_passwd;		/* Password.  */
+  uid_t pw_uid;		/* User ID.  */
+  gid_t pw_gid;		/* Group ID.  */
+  char *pw_gecos;		/* Real name.  */
+  char *pw_dir;			/* Home directory.  */
+  char *pw_shell;		/* Shell program.  */
+};
+
+#endif /* passwd */
+
+#ifndef group
+/* The group structure.	 */
+struct group
+  {
+    char *gr_name;		/* Group name.	*/
+    char *gr_passwd;		/* Password.	*/
+    gid_t gr_gid;		/* Group ID.	*/
+    char **gr_mem;		/* Member list.	*/
+  };
+
+#endif /* group */
+static int
+dbg_chk( void )
+{
+   int i;
+   i = 0;
+   return i;
+}
+
+static int _s_done_pwd = 0;
+static int _s_done_grp = 0;
+static struct passwd pwd;
+static struct group  grp;
+
+static struct passwd *getpwuid (uid_t uid)
+{
+   dbg_chk();
+   if( !_s_done_pwd )
+   {
+      pwd.pw_name = "user";
+      _s_done_pwd = 1;
+   }
+   return &pwd;
+}
+static struct group *getgrgid (gid_t gid)
+{ 
+   dbg_chk();
+   if( !_s_done_grp )
+   {
+      grp.gr_name = "group";
+      _s_done_grp = 1;
+   }
+   return &grp;
+}
+static struct passwd *getpwnam (char const *uname)
+{
+   dbg_chk();
+   return 0;
+}
+static struct group *getgrnam (char const * gname)
+{ 
+   dbg_chk();
+   return 0;
+}
+#endif /* _MSC_VER */
 
 /* User and group names.  */
 
@@ -229,6 +305,205 @@
     }
 }
 
+#ifdef _MSC_VER   /* expand wild card names */
+/* ===========================================================
+   windows command shell does NOT expand wild card names,
+   so they must be expanded here, to add to the array of names
+   =========================================================== */
+#define DEBUG_ADD_NAMES  /* to add debug output of names added */
+
+static int find_no_wild_one = 0;
+/* this should SKIP the folder name, if any ... but, not yet ... */
+static int has_wild( const char * name )
+{
+   int   iret = 0;
+   int   c;
+   size_t len = strlen(name);
+   size_t i;
+   if( find_no_wild_one ) {
+      find_no_wild_one = 0;
+      return iret;
+   }
+   for( i = 0; i < len; i++ )
+   {
+      c = name[i];
+      if(( c == '*' )||( c == '?' ))
+      {
+         iret = 1;
+         break;
+      }
+   }
+   return iret;
+}
+
+static int not_dot_nor_double_dot( const char * name )
+{
+   int iret = 1;
+   if( name[0] == '.' )
+   {
+      if( name[1] == 0 )
+         iret = 0;
+      else if( name[1] == '.' )
+      {
+         if(name[2] == 0)
+            iret = 0;
+      }
+   }
+   return iret;
+}
+
+/* seem this must be done to avoid say '\t' becoming a TAB character,
+   luckily most windows functions accept either ... */
+void path_2_unix(char * name)
+{
+   size_t i;
+   size_t len = strlen(name);
+   for( i = 0; i < len; i++ )
+   {
+      if( name[i] == '\\' )   /* if BACKSLASH            */
+         name[i] = '/';       /* change to FORWARD slash */
+   }
+}
+
+/* simple structure into which a full path can be split */
+typedef struct tagSPLITTING {
+   char path[_MAX_DIR];
+   char drive[_MAX_DRIVE];
+   char dir[_MAX_DIR];
+   char fname[_MAX_FNAME];
+   char ext[_MAX_EXT];
+   char mask[_MAX_FNAME];
+}SPLITTING, * PSPLITTING;
+
+static int tar_includesubdirs = 1;
+
+static int tar_filesfound = 0;
+static int tar_filesadded = 0;
+static int tar_dirssearched = 0;
+static int tar_dirsfound = 0;
+
+/* ================================================================
+   A test on unbuntu revealed a '*' on the command line will
+   produce a list of files plus directories, in ALPHABETIC order
+   to the program, while a '.' will not.
+
+   So to ADD directories also ... but, at present,
+   that invokes some openat() code,
+   which does NOT (yet) work under windows
+   so it is OFF until this all fixed, if desired.
+   For the present this tar will NOT work with a directory input!!!
+
+   As a temporary work around, expand the directories here.
+   TODO: THIS MUST BE FIXED!
+   The follwoing should be the reverse to emulate unix, and
+   a SORT should be added to fully emulate it!
+   =============================================================== */
+static int tar_adddirectories    = 1;
+static int tar_expanddirectories = 0;
+
+static int expand_wild( const char * file, int matching_flags )
+{
+   PSPLITTING psp;
+   DIR * pdir;
+   struct dirent * dp;
+   int status = 0;
+   char * next_name;
+   size_t len = strlen(file);
+   psp = (PSPLITTING)xmalloc(sizeof(SPLITTING));
+   if( !psp ) {
+      fprintf( stderr, "CRITICAL ERROR: MEMORY FAILED! ABORTING\n" );
+      exit(TAREXIT_FAILURE);
+   }
+   /* wow - all this hokus pokus is to NOT find 'wild', in something
+      like '*.pm' ... this should be with the --wildcards parameter
+      Add it as *.pm, as is */
+   if( (len > 1) && ( file[0] == '\'' ) && ( file[len-1] == '\'' ))
+   {
+      /* file is cased in single quotes! */
+      strncpy( psp->path, &file[1], len - 2 );  /* get without quotes */
+      psp->path[len - 2] = 0; /* and zero terminate */
+      next_name = xstrdup(psp->path);
+      path_2_unix(next_name); 
+      tar_filesadded++;
+      find_no_wild_one = 1;   /* do NOT find wild in this */
+      name_add_name( next_name, matching_flags );
+      free(psp);  /* toss the memory */
+      return status;
+   }
+   _splitpath(file, psp->drive, psp->dir, psp->fname, psp->ext);
+   strcpy( psp->path, psp->drive );
+   strcat( psp->path, psp->dir );
+   if( psp->path[0] == 0 )
+      strcpy( psp->path, "." );
+   strcpy( psp->mask, psp->fname );
+   strcat( psp->mask, psp->ext );
+   /* IFF it is the often used star.star, (*.*), then
+      this match ALL FILES in windows, so convert to
+      single asterick, '*' for fnmatch() to work ... 
+      Specifically '*.*' would MATCH 'Changes' or 'LICENSE', in windows!!!
+      while the present (internal) fnmatch would FAIL this test
+      not finding the '.'!!!
+    */
+   if( strcmp(psp->mask, "*.*") == 0 )
+      strcpy( psp->mask, "*" );
+
+   pdir = opendir( psp->path );
+   if( pdir )
+   {
+      while(( dp = readdir(pdir) ) != 0 )
+      {
+         /* Skip "." and ".." (some NFS filesystems' directories lack them). */
+         if ( not_dot_nor_double_dot( dp->d_name ) )
+         {
+            strcpy( psp->path, psp->drive );
+            strcat( psp->path, psp->dir );
+            strcat( psp->path, dp->d_name );
+            if ( dp->d_type == DT_DIR )
+            {
+               tar_dirsfound++;  /* direcotry entry */
+               /* seems no option to EXCLUDE directories!!! */
+               if( tar_includesubdirs )
+               {
+                  tar_dirssearched++;
+                  if( tar_adddirectories ) {
+                     next_name = xstrdup(psp->path);
+                     path_2_unix(next_name); 
+                     name_add_name( next_name, matching_flags );
+                  }
+                  if( tar_expanddirectories ) {
+                     strcat( psp->path, "\\" );
+                     strcat( psp->path, psp->fname );
+                     strcat( psp->path, psp->ext );
+                     status |= expand_wild (psp->path, matching_flags);
+                  }
+               }
+            }
+            else
+            {
+               tar_filesfound++; /* file entry */
+               {
+                  if ( fnmatch( psp->mask, dp->d_name, FNM_CASEFOLD | FNM_NOESCAPE ) != FNM_NOMATCH )
+                  {
+                     next_name = xstrdup(psp->path);
+                     /* seems this must be done to avoid \t becoming a TAB! */
+                     path_2_unix(next_name); 
+                     tar_filesadded++;
+                     name_add_name( next_name, matching_flags );
+                  }
+               }
+            }  /* directory or file entry */
+         }  /* skip '.' and '..' */
+      }
+      closedir(pdir);
+   } else {
+      status = 2;
+   }
+   free(psp);  /* toss the memory */
+   return status;
+}
+
+#endif /* _MSC_VER */
+
 /* Add to name_array the file NAME with fnmatch options MATCHING_FLAGS */
 void
 name_add_name (const char *name, int matching_flags)
@@ -236,6 +511,13 @@
   static int prev_flags = 0; /* FIXME: Or EXCLUDE_ANCHORED? */
   struct name_elt *ep;
 
+#ifdef _MSC_VER /* expand wild cards in file names */
+   if( has_wild(name) ) {
+      expand_wild(name, matching_flags);
+      return;
+   }
+#endif /* _MSC_VER */
+
   check_name_alloc ();
   ep = &name_array[names++];
   if (prev_flags != matching_flags)
@@ -248,6 +530,9 @@
     }
   ep->type = NELT_NAME;
   ep->v.name = name;
+#if   (defined(_MSC_VER) && !defined(NDEBUG) && defined(DEBUG_ADD_NAMES))
+  printf("Added %d: [%s]\n", (names - 1), name ); /* DEBUG OUTPUT ONLY */
+#endif /* DEBUG OUTPUT ONLY */
 }
 
 /* Add to name_array a chdir request for the directory NAME */
@@ -912,6 +1197,18 @@
   for (name = namelist; name; name = name->next)
     name->found_count = 0;
 }
+
+#ifdef _MSC_VER
+int
+name_list_count (void)
+{
+  struct name *name;
+  int count = 0;
+  for (name = namelist; name; name = name->next)
+     count++;
+  return count;
+}
+#endif /* _MSC_VER */
 
 /* Yield a newly allocated file name consisting of FILE_NAME concatenated to
    NAME, with an intervening slash if FILE_NAME does not already end in one. */
diff -ur C:\FGCVS\tar\src\system.c C:\Projects\tar\src\system.c
--- C:\FGCVS\tar\src\system.c	Mon Apr 14 14:03:14 2008
+++ C:\Projects\tar\src\system.c	Thu Aug 14 17:55:02 2008
@@ -22,12 +22,17 @@
 #include <rmt.h>
 #include <signal.h>
 
-#if MSDOS
+#if MSDOS || WIN32   /* MSDOS and WIN32 - _MSC_VER */
+
+/* alternate functions */
+extern union block *record_start; /* FIXME */
+
+static struct stat archive_stat; /* stat block for archive file */
 
 bool
 sys_get_archive_stat (void)
 {
-  return 0;
+  return fstat (archive, &archive_stat) == 0;
 }
 
 bool
@@ -44,10 +49,14 @@
 void
 sys_detect_dev_null_output (void)
 {
+#ifdef _MSC_VER /* no null device like this for windows! */
+   dev_null_output = 0;
+#else /* !_MSC_VER */
   static char const dev_null[] = "nul";
 
   dev_null_output = (strcmp (archive_name_array[0], dev_null) == 0
 		     || (! _isrmt (archive)));
+#endif /* _MSC_VER y/n */
 }
 
 void
@@ -82,7 +91,7 @@
   return true;
 }
 
-void
+bool
 sys_compare_links (struct stat *link_data, struct stat *stat_data)
 {
   return true;
@@ -101,19 +110,46 @@
 }
 
 /* Set ARCHIVE for writing, then compressing an archive.  */
-void
+pid_t
 sys_child_open_for_compress (void)
 {
   FATAL_ERROR ((0, 0, _("Cannot use compressed or remote archives")));
+  return -1;
 }
 
 /* Set ARCHIVE for uncompressing, then reading an archive.  */
-void
+pid_t
 sys_child_open_for_uncompress (void)
 {
   FATAL_ERROR ((0, 0, _("Cannot use compressed or remote archives")));
+  return -1;
+}
+
+int
+sys_exec_info_script (const char **archive_name, int volume_number)
+{
+   return -1;
+}
+
+void
+sys_exec_checkpoint_script (const char *script_name,
+			    const char *archive_name,
+			    int checkpoint_number)
+{
 }
 
+void
+sys_wait_command (void)
+{
+}
+
+int
+sys_exec_command (char *file_name, int typechar, struct tar_stat_info *st)
+{
+   return -1;
+}
+
+
 #else
 
 extern union block *record_start; /* FIXME */
@@ -891,4 +927,4 @@
   exec_fatal (script_name);
 }
 
-#endif /* not MSDOS */
+#endif /* not MSDOS or WIN32 */
diff -ur C:\FGCVS\tar\src\tar.c C:\Projects\tar\src\tar.c
--- C:\FGCVS\tar\src\tar.c	Mon Apr 14 14:03:14 2008
+++ C:\Projects\tar\src\tar.c	Wed Aug 20 14:05:46 2008
@@ -40,11 +40,15 @@
 
 #include <argmatch.h>
 #include <closeout.h>
+#ifndef _MSC_VER /* no configmake.h */
 #include <configmake.h>
+#endif /* !_MSC_VER */
 #include <exitfail.h>
 #include <getdate.h>
 #include <rmt.h>
+#ifndef _MSC_VER /* no rmt-command.h */
 #include <rmt-command.h>
+#endif /* !_MSC_VER */
 #include <prepargs.h>
 #include <quotearg.h>
 #include <version-etc.h>
@@ -215,6 +219,7 @@
     default:
       abort ();
     }
+  return "uncased";  /* just to shutup (MSC_VER) the compiler warning */
 }
 
 void
@@ -870,6 +875,19 @@
   printer (stream, "\n");                                                 \
 }
 #else
+#ifdef _MSC_VER /* add defaults for WIN32 */
+/* add in force-local ... */
+# define DECL_SHOW_DEFAULT_SETTINGS(stream, printer)                      \
+{                                                                         \
+  printer (stream,                                                        \
+	   "--format=%s -f%s -b%d --quoting-style=%s --rmt-command=%s --force-local",   \
+	   archive_format_string (DEFAULT_ARCHIVE_FORMAT),                \
+	   DEFAULT_ARCHIVE, DEFAULT_BLOCKING,                             \
+	   quoting_style_args[DEFAULT_QUOTING_STYLE],                     \
+	   DEFAULT_RMT_COMMAND);                                          \
+  printer (stream, "\n");                                                 \
+}
+#else /* !_MSC_VER */
 # define DECL_SHOW_DEFAULT_SETTINGS(stream, printer)                      \
 {                                                                         \
   printer (stream,                                                        \
@@ -880,6 +898,7 @@
 	   DEFAULT_RMT_COMMAND);                                          \
   printer (stream, "\n");                                                 \
 }
+#endif /* _MSC_VER y/n */
 #endif
 
 static void
@@ -919,6 +938,7 @@
 #ifndef HAVE_SIGACTION
   signal (signo, sigstat);
 #endif
+  return 0;
 }
 
 static void
@@ -943,6 +963,10 @@
     char *name;
     int signo;
   } sigtab[] = {
+#ifdef _MSC_VER /* only SIGINT, no SIGUSR1, etc */
+    { "SIGINT", SIGINT },
+    { "INT", SIGINT }
+#else /* !_MSC_VER */
     { "SIGUSR1", SIGUSR1 },
     { "USR1", SIGUSR1 },
     { "SIGUSR2", SIGUSR2 },
@@ -953,6 +977,7 @@
     { "INT", SIGINT },
     { "SIGQUIT", SIGQUIT },
     { "QUIT", SIGQUIT }
+#endif /* _MSC_VER y/n */
   };
   struct sigtab *p;
 
@@ -2070,6 +2095,9 @@
   group_option = -1;
 
   check_device_option = true;
+#ifdef _MSC_VER /* set force_local_option true for WIN32 */
+  force_local_option = true;  /* a windows path will 'look' remote - C:\DTEMP\temp1.tar! */
+#endif /* _MSC_VER */
   
   /* Convert old-style tar call by exploding option element and rearranging
      options accordingly.  */
@@ -2131,6 +2159,12 @@
   /* Parse all options and non-options as they appear.  */
 
   prepend_default_options (getenv ("TAR_OPTIONS"), &argc, &argv);
+#ifdef _MSC_VER /* allow utilisation of @input.file.txt */
+  input_response_file ( &argc,&argv );
+#endif /* _MSC_VER */
+#if (defined(_MSC_VER) && !defined(NDEBUG))
+  show_arguments( argc, argv );
+#endif /* _MSC_VER and !NDEBUG */
 
   if (argp_parse (&argp, argc, argv, ARGP_IN_ORDER|ARGP_NO_HELP,
 		  &idx, &args))
@@ -2376,6 +2410,10 @@
   
   if (verbose_option)
     report_textual_dates (&args);
+#if (defined(_MSC_VER) && !defined(NDEBUG))
+  printf( "Verbosity level (verbose_option) is %d ...\n", verbose_option );
+#endif /* DEBUG ONLY */
+
 }
 
 
@@ -2389,7 +2427,9 @@
   program_name = argv[0];
 
   setlocale (LC_ALL, "");
+#ifndef _MSC_VER /* no bindtextdomain() */
   bindtextdomain (PACKAGE, LOCALEDIR);
+#endif /* _MSC_VER y/n */
   textdomain (PACKAGE);
 
   exit_failure = TAREXIT_FAILURE;
@@ -2420,6 +2460,13 @@
 
   name_init ();
 
+#ifdef _MSC_VER   /* deal with gzipping, after archive written */
+  if (use_compress_program_option &&
+     (subcommand_option == EXTRACT_SUBCOMMAND)) {
+     /* if the user HAS gzip available, then use it */
+     try_to_ungzip_it();
+  }
+#endif /* _MSC_VER - gzipping */
   /* Main command execution.  */
 
   if (volno_file_option)
@@ -2474,8 +2521,16 @@
   if (volno_file_option)
     closeout_volume_number ();
 
-  /* Dispose of allocated memory, and return.  */
+#ifdef _MSC_VER   /* deal with gzipping, after archive written */
+  if (use_compress_program_option &&
+     (subcommand_option == CREATE_SUBCOMMAND) &&
+     (exit_status == TAREXIT_SUCCESS) ) {
+     /* if the user HAS gzip available, then use it */
+     try_to_gzip_it();
+  }
+#endif /* _MSC_VER - gzipping */
 
+  /* Dispose of allocated memory, and return.  */
   free (archive_name_array);
   name_term ();
 
@@ -2486,6 +2541,13 @@
     close_stdout ();
   else if (ferror (stderr) || fclose (stderr) != 0)
     exit_status = TAREXIT_FAILURE;
+#ifdef _MSC_VER   /* cleanup any memory allocated on exit */
+  term_response_file();
+#ifndef NDEBUG
+  printf( "Exit status is %d ...\n", exit_status );
+#endif /* !NDEBUG */
+#endif /* _MSC_VER */
+
 
   return exit_status;
 }
Only in C:\Projects\tar: Win32
