/*
- * Copyright (c) 2000, Red Hat, Inc.
+ * Copyright (c) 2000, 2001, Red Hat, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
#include "win32.h"
#include <stdio.h>
#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/stat.h>
#include "zlib/zlib.h"
#include "tar.h"
#define NSPERSEC 10000000LL
#define SYMLINK_COOKIE "!<symlink>"
+extern DWORD get_file_size (char *);
+
typedef struct {
char name[100]; /* 0 */
char mode[8]; /* 100 */
int
tar_open (char *pathname)
{
- struct stat s;
if (_tar_vfile == 0)
_tar_vfile = stderr;
vp2 (_tar_vfile, "tar: open `%s'\n", pathname);
- if (stat (pathname, &s) < 0)
+ DWORD size;
+ if ((size = get_file_size (pathname)) == 0)
return 1;
- _tar_file_size = s.st_size;
+ _tar_file_size = size;
g = gzopen (pathname, "rb");
if (sizeof (tar_header) != 512)