File: stat.h

package info (click to toggle)
gnat-gdb 5.3.gnat.0.0.20030225-8
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 75,144 kB
  • ctags: 101,348
  • sloc: ansic: 873,511; exp: 46,950; sh: 16,123; makefile: 11,757; yacc: 6,092; asm: 5,027; cpp: 4,044; perl: 2,624; lex: 877; sed: 550; lisp: 394; awk: 170; pascal: 57; java: 7; fortran: 5
file content (44 lines) | stat: -rw-r--r-- 889 bytes parent folder | download | duplicates (25)
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
/* Imitation sys/stat.h. */

#ifndef __SYS_STAT_H__
#define __SYS_STAT_H__

#include  <sys/types.h>
#include  <time.h>

struct stat {
  dev_t   st_dev;
  ino_t   st_ino;
  mode_t  st_mode;
  short   st_nlink;
  uid_t   st_uid;
  gid_t   st_gid;
  dev_t   st_rdev;
  off_t   st_size;
  off_t   st_rsize;
  time_t  st_atime;
  int     st_spare1;
  time_t  st_mtime;
  int     st_spare2;
  time_t  st_ctime;
  int     st_spare3;
  long    st_blksize;
  long    st_blocks;
  long    st_spare4[2];
};

#define S_IFMT	0170000L
#define S_IFDIR	0040000L
#define S_IFREG 0100000L
#define S_IREAD    0400
#define S_IWRITE   0200
#define S_IEXEC    0100

#define S_IFIFO 010000  /* FIFO special */
#define S_IFCHR 020000  /* character special */
#define S_IFBLK 030000  /* block special */

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

#endif /* __SYS_STAT_H___ */