summaryrefslogtreecommitdiff
path: root/include/bits/stat.h
blob: 0022cea84e8c82888b03c7570407bce9d3b74954 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef __BITS_STAT_H
#define __BITS_STAT_H

#ifndef __BITS_STAT_H_
#error "Internal header — include the public API header instead."
#else
#undef __BITS_STAT_H_
#endif

#define __BITS_TIMESPEC_H_
#include <bits/timespec.h>

typedef __UINT64_TYPE__ dev_t;
typedef __UINT64_TYPE__ ino_t;
typedef __UINT32_TYPE__ mode_t;
typedef __UINT32_TYPE__ nlink_t;
typedef __UINT32_TYPE__ uid_t;
typedef __UINT32_TYPE__ gid_t;
typedef __INT64_TYPE__ off_t;
typedef __INT32_TYPE__ blksize_t;
typedef __INT64_TYPE__ blkcnt_t;

struct stat {
	dev_t st_dev;
	ino_t st_ino;
	mode_t st_mode;
	nlink_t st_nlink;
	uid_t st_uid;
	gid_t st_gid;
	dev_t st_rdev;
	off_t st_size;
	struct timespec st_atim;
	struct timespec st_mtim;
	struct timespec st_ctim;
	blksize_t st_blksize;
	blkcnt_t st_blocks;
};

#define st_atime st_atim.tv_sec
#define st_mtime st_mtim.tv_sec
#define st_ctime st_ctim.tv_sec

#endif