OpenCBM
file.c
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version
5  * 2 of the License, or (at your option) any later version.
6  *
7  * Copyright 2004 Spiro Trikaliotis
8  *
9  */
10 
11 #include <windows.h>
12 
13 #include <stdarg.h>
14 #include <stdio.h>
15 
16 #include "arch.h"
17 
18 #include <sys/stat.h>
19 
20 
38 int arch_filesize(const char *Filename, off_t *Filesize)
39 {
40  struct _stat statrec;
41  size_t ret;
42 
43  ret = _stat(Filename, &statrec);
44 
45  if (ret == 0)
46  {
47  *Filesize = statrec.st_size;
48  ret = 0;
49  }
50 
51  return ret;
52 }
int arch_filesize(const char *Filename, off_t *Filesize)
Obtain the size of a given file.
Definition: file.c:38
Define makros and functions which account for differences between the different architectures.