xref: /illumos-gate/usr/src/uts/sparc/sys/stat_impl.h (revision 69b1fd3f24d0ee2e682883606201c61f52085805)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef _SYS_STAT_IMPL_H
28 #define	_SYS_STAT_IMPL_H
29 
30 #include <sys/feature_tests.h>
31 #include <sys/types.h>
32 
33 #ifdef	__cplusplus
34 extern "C" {
35 #endif
36 
37 /*
38  * The implementation specific header for <sys/stat.h>
39  */
40 
41 #if !defined(_KERNEL) || defined(_BOOT)
42 
43 #if defined(__STDC__)
44 
45 extern int fstat(int, struct stat *);
46 extern int stat(const char *_RESTRICT_KYWD, struct stat *_RESTRICT_KYWD);
47 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) || \
48 	defined(_ATFILE_SOURCE)
49 extern int fstatat(int, const char *, struct stat *, int);
50 #endif /* defined (_ATFILE_SOURCE) */
51 
52 #if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
53 extern int lstat(const char *_RESTRICT_KYWD, struct stat *_RESTRICT_KYWD);
54 extern int mknod(const char *, mode_t, dev_t);
55 #endif /* (!defined(__XOPEN_OR_POSIX) ... */
56 
57 #else	/* !__STDC__ */
58 
59 extern int fstat(), stat();
60 
61 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) || \
62 	defined(_ATFILE_SOURCE)
63 extern int fstatat();
64 #endif
65 
66 #if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
67 extern int lstat(), mknod();
68 #endif /* !defined(__XOPEN_OR_POSIX)... */
69 
70 #endif	/* !__STDC__ */
71 
72 #endif /* !defined(_KERNEL) || defined(_BOOT) */
73 
74 #ifdef	__cplusplus
75 }
76 #endif
77 
78 #endif	/* _SYS_STAT_IMPL_H */
79