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