]> arthur.barton.de Git - netatalk.git/blob - etc/afpd/unix.h
3eba6c471b38fa5b292de546aeea935de47c8035
[netatalk.git] / etc / afpd / unix.h
1 /*
2  * $Id: unix.h,v 1.12 2003-01-07 15:55:22 rlewczuk Exp $
3  */
4
5 #ifndef AFPD_UNIX_H
6 #define AFPD_UNIX_H
7
8 #ifdef HAVE_SYS_CDEFS_H
9 #include <sys/cdefs.h>
10 #endif /* HAVE_SYS_CDEFS_H */
11 #include <netatalk/endian.h>
12 #include "volume.h"
13
14 #if defined( sun ) && !defined( __svr4__ )
15 #ifdef i386
16 typedef int     mode_t;
17 #endif /*i386*/
18 #endif /*sun __svr4__*/
19
20 #if defined(HAVE_SYS_VFS_H) || defined( sun ) || defined( ibm032 ) 
21 #include <sys/vfs.h>
22 #endif /* HAVE_SYS_VFS_H || sun || ibm032 */
23
24 #if defined(_IBMR2) || defined(HAVE_STATFS_H) 
25 #include <sys/statfs.h>
26 /* this might not be right. */
27 #define f_mntfromname f_fname
28 #endif /* _IBMR2 || HAVE_STATFS_H */
29
30 #if defined(TRU64)
31 #define f_frsize f_fsize
32 #else /* TRU64 */
33 #if defined(HAVE_SYS_STATVFS_H) || defined(__svr4__)
34 #include <sys/statvfs.h>
35 #define statfs statvfs
36 #else /* HAVE_SYS_STATVFS || __svr4__ */
37 #define f_frsize f_bsize
38 #endif /* USE_STATVFS_H */
39 #endif /* TRU64 */
40
41 #if defined(__svr4__) || defined(HAVE_SYS_MNTTAB_H)
42 #include <sys/mnttab.h>
43 #endif /* __svr4__ || HAVE_SYS_MNTTAB_H */
44
45 #if defined(HAVE_SYS_MOUNT_H) || defined(BSD4_4) || \
46     defined(linux) || defined(ultrix)
47 #include <sys/mount.h>
48 #endif /* HAVE_SYS_MOUNT_H || BSD4_4 || linux || ultrix */
49
50 #if defined(linux) || defined(HAVE_MNTENT_H)
51 #include <mntent.h>
52 #endif /* linux || HAVE_MNTENT_H */
53
54
55 #ifndef NO_QUOTA_SUPPORT
56
57 #if !(defined(__svr4__) || defined(HAVE_DQB_BTIMELIMIT))
58 #define dqb_btimelimit  dqb_btime
59 #endif /* ! __svr4__ || HAVE_DQB_BTIMELIMIT */
60
61 #if defined(linux) || defined(ultrix) || defined(HAVE_QUOTA_H)
62 #ifndef NEED_QUOTACTL_WRAPPER
63 #include <sys/quota.h>
64 #else /* ! NEED_QUOTACTL_WRAPPER */
65 #include <asm/types.h>
66 #include <asm/unistd.h>
67 #include <linux/quota.h>
68 #endif /* ! NEED_QUOTACTL_WRAPPER */
69 #endif /* linux || ultrix || HAVE_QUOTA_H */
70
71 #ifdef __svr4__ 
72 #include <sys/fs/ufs_quota.h>
73 #endif /* __svr4__ */
74
75 #ifdef BSD4_4
76 #include <ufs/ufs/quota.h>
77 #endif /* BSD4_4 */
78
79 #ifdef HAVE_UFS_QUOTA_H
80 #include <ufs/quota.h>
81 #endif /* HAVE_UFS_QUOTA_H */
82
83 #ifdef _IBMR2
84 #include <jfs/quota.h>
85 #endif /* _IBMR2 */
86
87 #include <unistd.h>
88 #include <sys/types.h>
89 #include <sys/stat.h>
90 #include "directory.h"
91
92 extern int getnfsquota __P((const struct vol *, const int, const u_int32_t,
93                                 struct dqblk *));
94
95 extern int uquota_getvolspace __P((const struct vol *, VolSpace *, VolSpace *,
96                                        const u_int32_t));
97 #endif /* NO_QUOTA_SUPPORT */
98
99 extern struct afp_options default_options;
100
101 extern int gmem         __P((const gid_t));
102 extern int setdeskmode  __P((const mode_t));
103 extern int setdirmode   __P((const mode_t, const int, const int));
104 extern int setdeskowner __P((const uid_t, const gid_t));
105 extern int setdirowner  __P((const uid_t, const gid_t, const int));
106 extern int setfilmode   __P((char *, mode_t , struct stat *));
107 extern int unix_rename  __P((const char *oldpath, const char *newpath));
108
109 extern void accessmode  __P((char *, struct maccess *, struct dir *, struct stat *));
110
111 #ifdef AFS      
112     #define accessmode afsmode
113 #endif 
114
115 #endif /* UNIX_H */