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 #ifndef UNISTD_H
15 #define UNISTD_H
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 #define	F_OK	0
22 #define	R_OK	4
23 #define	W_OK	2
24 #define	X_OK	1
25 
26 #define      S_ISDIR(m)      (((m) & 0170000) == 0040000)
27 
28 #define	S_IRWXU 	(S_IRUSR | S_IWUSR | S_IXUSR)
29 #define		S_IRUSR	0000400	/* read permission, owner */
30 #define		S_IWUSR	0000200	/* write permission, owner */
31 #define		S_IXUSR 0000100/* execute/search permission, owner */
32 #define	S_IRWXG		(S_IRGRP | S_IWGRP | S_IXGRP)
33 #define		S_IRGRP	0000040	/* read permission, group */
34 #define		S_IWGRP	0000020	/* write permission, grougroup */
35 #define		S_IXGRP 0000010/* execute/search permission, group */
36 #define	S_IRWXO		(S_IROTH | S_IWOTH | S_IXOTH)
37 #define		S_IROTH	0000004	/* read permission, other */
38 #define		S_IWOTH	0000002	/* write permission, other */
39 #define		S_IXOTH 0000001/* execute/search permission, other */
40 
41 extern int access (const char*, int);
42 extern char* getcwd (char*, int);
43 
44 #ifdef __cplusplus
45 }
46 #endif
47 
48 #endif
49