1 /* $Id$ $Revision$ */
2 /* vim:set shiftwidth=4 ts=8: */
3 
4 /*************************************************************************
5  * Copyright (c) 2011 AT&T Intellectual Property
6  * All rights reserved. This program and the accompanying materials
7  * are made available under the terms of the Eclipse Public License v1.0
8  * which accompanies this distribution, and is available at
9  * http://www.eclipse.org/legal/epl-v10.html
10  *
11  * Contributors: See CVS logs. Details at http://www.graphviz.org/
12  *************************************************************************/
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 #include <sys/stat.h>
19 #if !defined(S_ISDIR) && defined(S_IFDIR)
20 #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
21 #endif
22 #if !defined(S_ISREG) && defined(S_IFREG)
23 #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
24 #endif
25 #if !defined(S_ISSOCK) && defined(S_IFSOCK)
26 #define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
27 #endif
28 
29 #ifndef S_IXUSR
30 #define S_IXUSR 0100
31 #endif
32 #ifndef S_IXGRP
33 #define S_IXGRP 0010
34 #endif
35 #ifndef S_IXOTH
36 #define S_IXOTH 0001
37 #endif
38 
39 #define S_ISXXX(m) ((m) & (S_IXUSR | S_IXGRP | S_IXOTH))
40 
41 #ifdef __cplusplus
42 }
43 #endif
44 
45