1 #ifndef _system_filesys_h
2 #define _system_filesys_h
4 Unix SMB/CIFS implementation.
6 filesystem system include wrappers
8 Copyright (C) Andrew Tridgell 2004
10 ** NOTE! The following LGPL license applies to the replace
11 ** library. This does NOT imply that all of Samba is released
14 This library is free software; you can redistribute it and/or
15 modify it under the terms of the GNU Lesser General Public
16 License as published by the Free Software Foundation; either
17 version 3 of the License, or (at your option) any later version.
19 This library is distributed in the hope that it will be useful,
20 but WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 Lesser General Public License for more details.
24 You should have received a copy of the GNU Lesser General Public
25 License along with this library; if not, write to the Free Software
26 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
33 #ifdef HAVE_SYS_PARAM_H
34 #include <sys/param.h>
37 #ifdef HAVE_SYS_MOUNT_H
38 #include <sys/mount.h>
53 #ifdef HAVE_ACL_LIBACL_H
54 #include <acl/libacl.h>
57 #ifdef HAVE_SYS_FS_S5PARAM_H
58 #include <sys/fs/s5param.h>
61 #if defined (HAVE_SYS_FILSYS_H) && !defined (_CRAY)
62 #include <sys/filsys.h>
65 #ifdef HAVE_SYS_STATFS_H
66 # include <sys/statfs.h>
70 #include <sys/dustat.h>
73 #ifdef HAVE_SYS_STATVFS_H
74 #include <sys/statvfs.h>
77 #ifdef HAVE_SYS_FILIO_H
78 #include <sys/filio.h>
86 #ifdef HAVE_SYS_FCNTL_H
87 #include <sys/fcntl.h>
91 #ifdef HAVE_SYS_MODE_H
92 /* apparently AIX needs this for S_ISLNK */
98 #ifdef HAVE_SYS_IOCTL_H
99 #include <sys/ioctl.h>
103 * Veritas File System. Often in addition to native.
106 #if defined(HAVE_SYS_FS_VX_QUOTA_H)
110 #if HAVE_SYS_ATTRIBUTES_H
111 #include <sys/attributes.h>
114 /* mutually exclusive (SuSE 8.2) */
115 #if HAVE_ATTR_XATTR_H
116 #include <attr/xattr.h>
117 #elif HAVE_SYS_XATTR_H
118 #include <sys/xattr.h>
122 #ifdef HAVE_SYS_RESOURCE_H
123 #include <sys/resource.h>
126 /* Some POSIX definitions for those without */
129 #define S_IFDIR 0x4000
132 #define S_ISDIR(mode) ((mode & 0xF000) == S_IFDIR)
135 #define S_IRWXU 00700 /* read, write, execute: owner */
138 #define S_IRUSR 00400 /* read permission: owner */
141 #define S_IWUSR 00200 /* write permission: owner */
144 #define S_IXUSR 00100 /* execute permission: owner */
147 #define S_IRWXG 00070 /* read, write, execute: group */
150 #define S_IRGRP 00040 /* read permission: group */
153 #define S_IWGRP 00020 /* write permission: group */
156 #define S_IXGRP 00010 /* execute permission: group */
159 #define S_IRWXO 00007 /* read, write, execute: other */
162 #define S_IROTH 00004 /* read permission: other */
165 #define S_IWOTH 00002 /* write permission: other */
168 #define S_IXOTH 00001 /* execute permission: other */
172 #define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
176 #define MAXPATHLEN 256