GDB (API)
/home/stan/gdb/src/gdb/common/gdb_stat.h
Go to the documentation of this file.
00001 /* Portable <sys/stat.h>
00002    Copyright (C) 1995-2013 Free Software Foundation, Inc.
00003 
00004    This file is part of GDB.
00005 
00006    This program is free software; you can redistribute it and/or modify
00007    it under the terms of the GNU General Public License as published by
00008    the Free Software Foundation; either version 3 of the License, or
00009    (at your option) any later version.
00010 
00011    This program is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014    GNU General Public License for more details.
00015 
00016    You should have received a copy of the GNU General Public License
00017    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
00018 
00019 #if !defined(GDB_STAT_H)
00020 #define GDB_STAT_H
00021 
00022 #include <sys/types.h>
00023 #include <sys/stat.h>
00024 
00025 #if !defined(S_ISBLK) && defined(S_IFBLK)
00026 #define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
00027 #endif
00028 #if !defined(S_ISCHR) && defined(S_IFCHR)
00029 #define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
00030 #endif
00031 #if !defined(S_ISDIR) && defined(S_IFDIR)
00032 #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
00033 #endif
00034 #if !defined(S_ISREG) && defined(S_IFREG)
00035 #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
00036 #endif
00037 #if !defined(S_ISFIFO) && defined(S_IFIFO)
00038 #define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
00039 #endif
00040 #if !defined(S_ISLNK) && defined(S_IFLNK)
00041 #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
00042 #endif
00043 #if !defined(S_ISSOCK) && defined(S_IFSOCK)
00044 #define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
00045 #endif
00046 #if !defined(S_ISMPB) && defined(S_IFMPB)       /* V7 */
00047 #define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB)
00048 #define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC)
00049 #endif
00050 #if !defined(S_ISNWK) && defined(S_IFNWK)       /* HP/UX */
00051 #define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
00052 #endif
00053 
00054 /* Microsoft C's stat.h doesn't define all the POSIX file modes.  */
00055 #ifndef S_IROTH
00056 #define S_IROTH S_IREAD
00057 #endif
00058 
00059 #endif /* !defined(GDB_STAT_H) */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines