OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib-1.10.0/] [newlib/] [libc/] [include/] [sys/] [stat-dj.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1005 ivang
/* This is file STAT.H */
2
/*
3
 * Copyright (C) 1991 DJ Delorie
4
 * All rights reserved.
5
 *
6
 * Redistribution and use in source and binary forms is permitted
7
 * provided that the above copyright notice and following paragraph are
8
 * duplicated in all such forms.
9
 *
10
 * This file is distributed WITHOUT ANY WARRANTY; without even the implied
11
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
 */
13
 
14
#ifndef _STAT_H_
15
#define _STAT_H_
16
 
17
struct  stat {
18
        short st_dev;
19
        short st_ino;
20
        unsigned short st_mode;
21
        short st_nlink;
22
        short st_uid;
23
        short st_gid;
24
        short st_rdev;
25
        short st_align_for_word32;
26
        long  st_size;
27
        long  st_atime;
28
        long  st_mtime;
29
        long  st_ctime;
30
        long  st_blksize;
31
};
32
 
33
#define S_IFMT  0xF000  /* file type mask */
34
#define S_IFDIR 0x4000  /* directory */
35
#define S_IFIFO 0x1000  /* FIFO special */
36
#define S_IFCHR 0x2000  /* character special */
37
#define S_IFBLK 0x3000  /* block special */
38
#define S_IFREG 0x8000  /* or just 0x0000, regular */
39
#define S_IREAD 0x0100  /* owner may read */
40
#define S_IWRITE 0x0080 /* owner may write */
41
#define S_IEXEC 0x0040  /* owner may execute <directory search> */
42
 
43
#define S_ISBLK(m)      (((m) & S_IFMT) == S_IFBLK)
44
#define S_ISCHR(m)      (((m) & S_IFMT) == S_IFCHR)
45
#define S_ISDIR(m)      (((m) & S_IFMT) == S_IFDIR)
46
#define S_ISFIFO(m)     (((m) & S_IFMT) == S_IFIFO)
47
#define S_ISREG(m)      (((m) & S_IFMT) == S_IFREG)
48
 
49
#ifdef __cplusplus
50
extern "C" {
51
#endif
52
int stat(const char *, struct stat *);
53
int fstat(int, struct stat *);
54
#ifdef __cplusplus
55
}
56
#endif
57
 
58
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.