1 /* 2 * stat.h 3 * file attributes 4 */ 5 /* 6 * Copyright (C) 1999 - 2021 Eggheads Development Team 7 * 8 * This program is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU General Public License 10 * as published by the Free Software Foundation; either version 2 11 * of the License, or (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with this program; if not, write to the Free Software 20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 */ 22 23 #ifndef _EGG_STAT_H 24 #define _EGG_STAT_H 25 26 #ifndef S_ISDIR 27 # ifndef S_IFMT 28 # define S_IFMT 0170000 /* Bitmask for the file type bitfields */ 29 # endif 30 # ifndef S_IFDIR 31 # define S_IFDIR 0040000 /* Directory */ 32 # endif 33 # define S_ISDIR(m) (((m)&(S_IFMT)) == (S_IFDIR)) 34 #endif 35 #ifndef S_IFREG 36 # define S_IFREG 0100000 /* Regular file */ 37 #endif 38 #ifndef S_IFLNK 39 # define S_IFLNK 0120000 /* Symbolic link */ 40 #endif 41 42 #endif /* _EGG_STAT_H */ 43