xref: /titanic_50/usr/src/uts/intel/sys/stat_impl.h (revision eab227978ccdaa5a7cc9fd92ace768915dae3a2b)
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 (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 
22 /*
23  * Copyright 2010 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)
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 
48 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) || \
49 	defined(_ATFILE_SOURCE)
50 extern int fstatat(int, const char *, struct stat *, int);
51 #endif	/* defined (_ATFILE_SOURCE) */
52 
53 #if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
54 extern int lstat(const char *_RESTRICT_KYWD, struct stat *_RESTRICT_KYWD);
55 extern int mknod(const char *, mode_t, dev_t);
56 #endif	/* !defined(__XOPEN_OR_POSIX) ... */
57 
58 #else	/* defined(__STDC__) */
59 
60 extern int fstat();
61 extern int stat();
62 
63 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) || \
64 	defined(_ATFILE_SOURCE)
65 extern int fstatat();
66 #endif
67 
68 #if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
69 extern int lstat();
70 extern int mknod();
71 #endif	/* !defined(__XOPEN_OR_POSIX) ... */
72 
73 #endif	/* defined(__STDC__) */
74 
75 #if defined(__i386) && _FILE_OFFSET_BITS == 32 && \
76 	(!defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__))
77 
78 /*
79  * Obsolete SVR3 compatibility functions.
80  * Application software should NOT program to the _xstat interface.
81  */
82 #if defined(__STDC__)
83 
84 extern int _fxstat(const int, int, struct stat *);
85 extern int _xstat(const int, const char *, struct stat *);
86 extern int _lxstat(const int, const char *, struct stat *);
87 extern int _xmknod(const int, const char *, mode_t, dev_t);
88 
89 #else	/* __STDC__ */
90 
91 extern int _fxstat();
92 extern int _xstat();
93 extern int _lxstat();
94 extern int _xmknod();
95 
96 #endif	/* __STDC__ */
97 
98 #endif	/* defined(__i386) ... */
99 
100 #endif	/* !defined(_KERNEL) */
101 
102 #ifdef	__cplusplus
103 }
104 #endif
105 
106 #endif	/* _SYS_STAT_IMPL_H */
107