]> git.proxmox.com Git - libgit2.git/blob - src/util/win32/win32-compat.h
New upstream version 1.5.0+ds
[libgit2.git] / src / util / win32 / win32-compat.h
1 /*
2 * Copyright (C) the libgit2 contributors. All rights reserved.
3 *
4 * This file is part of libgit2, distributed under the GNU GPL v2 with
5 * a Linking Exception. For full terms see the included COPYING file.
6 */
7 #ifndef INCLUDE_win32_win32_compat_h__
8 #define INCLUDE_win32_win32_compat_h__
9
10 #include <stdint.h>
11 #include <time.h>
12 #include <wchar.h>
13 #include <sys/stat.h>
14 #include <sys/types.h>
15
16 typedef long suseconds_t;
17
18 struct p_timeval {
19 time_t tv_sec;
20 suseconds_t tv_usec;
21 };
22
23 struct p_timespec {
24 time_t tv_sec;
25 long tv_nsec;
26 };
27
28 #define timespec p_timespec
29
30 struct p_stat {
31 _dev_t st_dev;
32 _ino_t st_ino;
33 mode_t st_mode;
34 short st_nlink;
35 short st_uid;
36 short st_gid;
37 _dev_t st_rdev;
38 __int64 st_size;
39 struct timespec st_atim;
40 struct timespec st_mtim;
41 struct timespec st_ctim;
42 #define st_atime st_atim.tv_sec
43 #define st_mtime st_mtim.tv_sec
44 #define st_ctime st_ctim.tv_sec
45 #define st_atime_nsec st_atim.tv_nsec
46 #define st_mtime_nsec st_mtim.tv_nsec
47 #define st_ctime_nsec st_ctim.tv_nsec
48 };
49
50 #define stat p_stat
51
52 #endif