/[cvs]/eggdrop1.9/src/stat.h
ViewVC logotype

Contents of /eggdrop1.9/src/stat.h

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (show annotations) (download) (as text)
Wed Jan 16 22:40:57 2002 UTC (17 years, 9 months ago) by ite
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
File MIME type: text/x-csrc
FILE REMOVED
Removed sources obsoleted by previous patches

1 /*
2 * stat.h
3 * file attributes
4 *
5 * $Id: stat.h,v 1.3 2001/10/19 01:55:05 tothwolf Exp $
6 */
7 /*
8 * Copyright (C) 2000, 2001 Eggheads Development Team
9 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 */
24 #ifndef _EGG_STAT_H
25 #define _EGG_STAT_H
26
27 #ifdef HAVE_CONFIG_H
28 # include "config.h"
29 #endif
30
31 #ifdef STAT_MACROS_BROKEN
32
33 /* Undefine bits */
34 # undef S_IFMT
35 # undef S_IFSOCK
36 # undef S_IFLNK
37 # undef S_IFREG
38 # undef S_IFBLK
39 # undef S_IFDIR
40 # undef S_IFCHR
41 # undef S_IFIFO
42
43 /* Undefine macros */
44 # undef S_ISSOCK
45 # undef S_ISLNK
46 # undef S_ISREG
47 # undef S_ISBLK
48 # undef S_ISDIR
49 # undef S_ISCHR
50 # undef S_ISFIFO
51
52 /* Define bits */
53 # define S_IFMT 0170000 /* Bitmask for the file type bitfields */
54 # define S_IFSOCK 0140000 /* Socket */
55 # define S_IFLNK 0120000 /* Symbolic link */
56 # define S_IFREG 0100000 /* Regular file */
57 # define S_IFBLK 0060000 /* Block device */
58 # define S_IFDIR 0040000 /* Directory */
59 # define S_IFCHR 0020000 /* Character device */
60 # define S_IFIFO 0010000 /* FIFO */
61
62 /* Define macros */
63 # define S_ISSOCK(mode) (((mode) & (S_IFMT)) = (S_IFSOCK))
64 # define S_ISLNK(mode) (((mode) & (S_IFMT)) = (S_IFLNK))
65 # define S_ISREG(mode) (((mode) & (S_IFMT)) = (S_IFREG))
66 # define S_ISBLK(mode) (((mode) & (S_IFMT)) = (S_IFBLK))
67 # define S_ISDIR(mode) (((mode) & (S_IFMT)) = (S_IFDIR))
68 # define S_ISCHR(mode) (((mode) & (S_IFMT)) = (S_IFCHR))
69 # define S_ISFIFO(mode) (((mode) & (S_IFMT)) = (S_IFIFO))
70
71 #endif /* STAT_MACROS_BROKEN */
72
73 #endif /* _EGG_STAT_H */

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23