10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*11798SRoger.Faulkner@Sun.COM * Common Development and Distribution License (the "License"). 6*11798SRoger.Faulkner@Sun.COM * You may not use this file except in compliance with the License. 70Sstevel@tonic-gate * 80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate * See the License for the specific language governing permissions 110Sstevel@tonic-gate * and limitations under the License. 120Sstevel@tonic-gate * 130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate * 190Sstevel@tonic-gate * CDDL HEADER END 200Sstevel@tonic-gate */ 21*11798SRoger.Faulkner@Sun.COM 220Sstevel@tonic-gate /* 23*11798SRoger.Faulkner@Sun.COM * Copyright 2010 Sun Microsystems, Inc. All rights reserved. 240Sstevel@tonic-gate * Use is subject to license terms. 250Sstevel@tonic-gate */ 260Sstevel@tonic-gate 270Sstevel@tonic-gate #ifndef _SYS_STAT_IMPL_H 280Sstevel@tonic-gate #define _SYS_STAT_IMPL_H 290Sstevel@tonic-gate 300Sstevel@tonic-gate #include <sys/feature_tests.h> 310Sstevel@tonic-gate #include <sys/types.h> 320Sstevel@tonic-gate 330Sstevel@tonic-gate #ifdef __cplusplus 340Sstevel@tonic-gate extern "C" { 350Sstevel@tonic-gate #endif 360Sstevel@tonic-gate 370Sstevel@tonic-gate /* 380Sstevel@tonic-gate * The implementation specific header for <sys/stat.h> 390Sstevel@tonic-gate */ 400Sstevel@tonic-gate 41*11798SRoger.Faulkner@Sun.COM #if !defined(_KERNEL) 420Sstevel@tonic-gate 430Sstevel@tonic-gate #if defined(__STDC__) 440Sstevel@tonic-gate 450Sstevel@tonic-gate extern int fstat(int, struct stat *); 460Sstevel@tonic-gate extern int stat(const char *_RESTRICT_KYWD, struct stat *_RESTRICT_KYWD); 47*11798SRoger.Faulkner@Sun.COM 480Sstevel@tonic-gate #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) || \ 490Sstevel@tonic-gate defined(_ATFILE_SOURCE) 500Sstevel@tonic-gate extern int fstatat(int, const char *, struct stat *, int); 51*11798SRoger.Faulkner@Sun.COM #endif /* defined (_ATFILE_SOURCE) */ 520Sstevel@tonic-gate 530Sstevel@tonic-gate #if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__) 540Sstevel@tonic-gate extern int lstat(const char *_RESTRICT_KYWD, struct stat *_RESTRICT_KYWD); 550Sstevel@tonic-gate extern int mknod(const char *, mode_t, dev_t); 56*11798SRoger.Faulkner@Sun.COM #endif /* !defined(__XOPEN_OR_POSIX) ... */ 57*11798SRoger.Faulkner@Sun.COM 58*11798SRoger.Faulkner@Sun.COM #else /* defined(__STDC__) */ 590Sstevel@tonic-gate 60*11798SRoger.Faulkner@Sun.COM extern int fstat(); 61*11798SRoger.Faulkner@Sun.COM extern int stat(); 620Sstevel@tonic-gate 63*11798SRoger.Faulkner@Sun.COM #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) || \ 64*11798SRoger.Faulkner@Sun.COM defined(_ATFILE_SOURCE) 65*11798SRoger.Faulkner@Sun.COM extern int fstatat(); 66*11798SRoger.Faulkner@Sun.COM #endif 670Sstevel@tonic-gate 680Sstevel@tonic-gate #if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__) 69*11798SRoger.Faulkner@Sun.COM extern int lstat(); 70*11798SRoger.Faulkner@Sun.COM extern int mknod(); 71*11798SRoger.Faulkner@Sun.COM #endif /* !defined(__XOPEN_OR_POSIX) ... */ 72*11798SRoger.Faulkner@Sun.COM 73*11798SRoger.Faulkner@Sun.COM #endif /* defined(__STDC__) */ 74*11798SRoger.Faulkner@Sun.COM 75*11798SRoger.Faulkner@Sun.COM #if defined(__i386) && _FILE_OFFSET_BITS == 32 && \ 76*11798SRoger.Faulkner@Sun.COM (!defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)) 77*11798SRoger.Faulkner@Sun.COM 78*11798SRoger.Faulkner@Sun.COM /* 79*11798SRoger.Faulkner@Sun.COM * Obsolete SVR3 compatibility functions. 80*11798SRoger.Faulkner@Sun.COM * Application software should NOT program to the _xstat interface. 81*11798SRoger.Faulkner@Sun.COM */ 82*11798SRoger.Faulkner@Sun.COM #if defined(__STDC__) 830Sstevel@tonic-gate 84*11798SRoger.Faulkner@Sun.COM extern int _fxstat(const int, int, struct stat *); 85*11798SRoger.Faulkner@Sun.COM extern int _xstat(const int, const char *, struct stat *); 86*11798SRoger.Faulkner@Sun.COM extern int _lxstat(const int, const char *, struct stat *); 87*11798SRoger.Faulkner@Sun.COM extern int _xmknod(const int, const char *, mode_t, dev_t); 88*11798SRoger.Faulkner@Sun.COM 89*11798SRoger.Faulkner@Sun.COM #else /* __STDC__ */ 900Sstevel@tonic-gate 91*11798SRoger.Faulkner@Sun.COM extern int _fxstat(); 92*11798SRoger.Faulkner@Sun.COM extern int _xstat(); 93*11798SRoger.Faulkner@Sun.COM extern int _lxstat(); 94*11798SRoger.Faulkner@Sun.COM extern int _xmknod(); 950Sstevel@tonic-gate 96*11798SRoger.Faulkner@Sun.COM #endif /* __STDC__ */ 97*11798SRoger.Faulkner@Sun.COM 98*11798SRoger.Faulkner@Sun.COM #endif /* defined(__i386) ... */ 99*11798SRoger.Faulkner@Sun.COM 100*11798SRoger.Faulkner@Sun.COM #endif /* !defined(_KERNEL) */ 1010Sstevel@tonic-gate 1020Sstevel@tonic-gate #ifdef __cplusplus 1030Sstevel@tonic-gate } 1040Sstevel@tonic-gate #endif 1050Sstevel@tonic-gate 1060Sstevel@tonic-gate #endif /* _SYS_STAT_IMPL_H */ 107