File: vmstat.h

package info (click to toggle)
unzip 6.0-29
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 10,432 kB
  • sloc: ansic: 55,350; cpp: 4,084; makefile: 2,481; asm: 1,789; cs: 1,012; sh: 110
file content (57 lines) | stat: -rw-r--r-- 1,478 bytes parent folder | download | duplicates (15)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*
  Copyright (c) 1990-2000 Info-ZIP.  All rights reserved.

  See the accompanying file LICENSE, version 2000-Apr-09 or later
  (the contents of which are also included in unzip.h) for terms of use.
  If, for some reason, all these files are missing, the Info-ZIP license
  also may be found at:  ftp://ftp.info-zip.org/pub/infozip/license.html
*/
#ifndef __vmstat_h
#define __vmstat_h

/* stat.h      definitions   */

#ifndef _INO_T_DEFINED
typedef unsigned short ino_t;       /* i-node number (not used on DOS) */
#define _INO_T_DEFINED
#endif

#ifndef _DEV_T_DEFINED
typedef short dev_t;                /* device code */
#define _DEV_T_DEFINED
#endif

#ifndef _OFF_T_DEFINED
typedef long off_t;                 /* file offset value */
#define _OFF_T_DEFINED
#endif

#ifndef _STAT_DEFINED
struct stat {
  dev_t  st_dev;
  ino_t  st_ino;
  short  st_mode;
  short  st_nlink;
  int    st_uid;
  int    st_gid;
  off_t  st_size;
  time_t st_atime;
  time_t st_mtime;
  time_t st_ctime;
};
#define _STAT_DEFINED
#endif

int stat(const char *path, struct stat *buf);
int fstat(int fd, struct stat *buf);

#define S_IFMT       0xFFFF
#define _FLDATA(m)   (*(fldata_t *) &m)
#define S_ISDIR(m)   (_FLDATA(m).__dsorgPDSdir)
#define S_ISREG(m)   (_FLDATA(m).__dsorgPO | \
                      _FLDATA(m).__dsorgPDSmem | \
                      _FLDATA(m).__dsorgPS)
#define S_ISBLK(m)   (_FLDATA(m).__recfmBlk)
#define S_ISMEM(m)   (_FLDATA(m).__dsorgMem)

#endif /* __vmstat_h */