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