linux define ucontext properly
[openafs.git] / src / config / param.linux24.h
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  *
5  * This software has been released under the terms of the IBM Public
6  * License.  For details, see the LICENSE file in the top-level source
7  * directory or online at http://www.openafs.org/dl/license10.html
8  */
9
10 #ifndef AFS_PARAM_COMMON_H
11 #define AFS_PARAM_COMMON_H
12
13 #ifndef UKERNEL
14
15 /* This section for kernel libafs compiles only */
16 #define AFS_LINUX20_ENV         1
17 #define AFS_LINUX22_ENV         1
18 #define AFS_LINUX24_ENV         1
19
20 #define AFS_MOUNT_AFS           "afs"   /* The name of the filesystem type */
21 #define AFS_64BIT_IOPS_ENV      1
22 #define AFS_NAMEI_ENV           1       /* User space interface to file system */
23 #define AFS_64BIT_ENV           1
24 #define AFS_64BIT_CLIENT        1
25 #undef  AFS_NONFSTRANS
26 #define AFS_NONFSTRANS          1
27 #define AFS_USERSPACE_IP_ADDR   1
28 #define RXK_LISTENER_ENV        1
29 #define AFS_GCPAGS              1       /* Set to Userdisabled, allow sysctl to override */
30 #define AFS_HAVE_FFS            1       /* Use system's ffs */
31 #define AFS_HAVE_STATVFS        0       /* System doesn't support statvfs */
32 #define AFS_VM_RDWR_ENV         1       /* read/write implemented via VM */
33 #define AFS_USE_GETTIMEOFDAY    1       /* use gettimeofday to implement rx clock */
34
35 #if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
36 #include <linux/threads.h>
37
38 #include <linux/config.h>
39 #ifdef CONFIG_SMP
40 #ifndef AFS_SMP
41 #define AFS_SMP 1
42 #endif
43 #endif
44 /* Using "AFS_SMP" to map to however many #define's are required to get
45  * MP to compile for Linux
46  */
47 #ifdef AFS_SMP
48 #ifndef CONFIG_SMP
49 #define CONFIG_SMP 1
50 #endif
51 #ifndef __SMP__
52 #define __SMP__
53 #endif
54 #endif
55 #define AFS_GLOBAL_SUNLOCK
56 #if defined(MODULE) && defined(CONFIG_MODVERSIONS)
57 #define MODVERSIONS
58 #include <linux/modversions.h>
59 #endif
60 #endif /* __KERNEL__    && !DUMP_KERNEL */
61
62 #ifdef KERNEL
63 #ifndef MIN
64 #define MIN(A,B) ((A) < (B) ? (A) : (B))
65 #endif
66 #ifndef MAX
67 #define MAX(A,B) ((A) > (B) ? (A) : (B))
68 #endif
69 #endif /* KERNEL */
70
71 #ifndef KERNEL
72 #define __USE_LARGEFILE64 1
73 #if !defined off64_t
74 #define off64_t __off64_t
75 #endif
76 #endif
77
78 #else /* !defined(UKERNEL) */
79
80 /* This section for user space compiles only */
81 #define AFS_USR_LINUX20_ENV     1
82 #define AFS_USR_LINUX22_ENV     1
83 #define AFS_USR_LINUX24_ENV     1
84
85 #define AFS_ENV                 1
86 #undef  AFS_NONFSTRANS
87 #define AFS_NONFSTRANS          1
88 #define AFS_MOUNT_AFS           "afs"   /* The name of the filesystem type. */
89 #define AFS_64BIT_IOPS_ENV      1
90 #define AFS_64BIT_ENV           1
91 #define AFS_NAMEI_ENV           1       /* User space interface to file system */
92 #define AFS_USERSPACE_IP_ADDR   1
93 #define RXK_LISTENER_ENV        1
94 #define AFS_GCPAGS              0       /* if nonzero, garbage collect PAGs */
95 #define AFS_HAVE_FFS            1       /* Use system's ffs. */
96 #define AFS_HAVE_STATVFS        0       /* System doesn't support statvfs */
97 #define AFS_VM_RDWR_ENV         1       /* read/write implemented via VM */
98
99 #define afsio_iov       uio_iov
100 #define afsio_iovcnt    uio_iovcnt
101 #define afsio_offset    uio_offset
102 #define afsio_seg       uio_segflg
103 #define afsio_fmode     uio_fmode
104 #define afsio_resid     uio_resid
105 #define AFS_UIOSYS      1
106 #define AFS_UIOUSER     UIO_USERSPACE
107 #define AFS_CLBYTES     MCLBYTES
108 #define AFS_MINCHANGE   2
109 #define VATTR_NULL      usr_vattr_null
110
111 #define AFS_DIRENT
112 #ifndef CMSERVERPREF
113 #define CMSERVERPREF
114 #endif
115
116 #endif /* !defined(UKERNEL) */
117
118 /* needed so glibc version will be defined */
119 #include <afs/afs_sysnames.h>
120
121 #ifdef __GLIBC__
122 #if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
123 #define USE_UCONTEXT
124 #endif
125 #endif
126
127 #endif /* AFS_PARAM_COMMON_H */