Magellan Linux

Contents of /trunk/mkinitrd-magellan/klibc/usr/include/klibc/sysconfig.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1122 - (show annotations) (download)
Wed Aug 18 21:11:40 2010 UTC (13 years, 8 months ago) by niro
File MIME type: text/plain
File size: 4694 byte(s)
-updated to klibc-1.5.19
1 /*
2 * klibc/sysconfig.h
3 *
4 * Allows for definitions of some things which may be system-dependent
5 * NOTE: this file must not result in any output from the preprocessor.
6 */
7
8 #ifndef _KLIBC_SYSCONFIG_H
9 #define _KLIBC_SYSCONFIG_H
10
11 #include <klibc/archconfig.h>
12 #include <asm/unistd.h>
13
14 /*
15 * These are the variables that can be defined in <klibc/archconfig.h>.
16 * For boolean options, #define to 0 to disable, #define to 1 to enable.
17 *
18 * If undefined, they will be given defaults here.
19 */
20
21
22 /*
23 * _KLIBC_NO_MMU:
24 *
25 * Indicates this architecture doesn't have an MMU, and therefore
26 * does not have the sys_fork and sys_brk system calls.
27 */
28 /* Default to having an MMU if we can find the fork system call */
29 #ifndef _KLIBC_NO_MMU
30 # if defined(__NR_fork)
31 # define _KLIBC_NO_MMU 0
32 # else
33 # define _KLIBC_NO_MMU 1
34 # endif
35 #endif
36
37
38 /*
39 * _KLIBC_REAL_VFORK:
40 *
41 * Indicates that this architecture has a real vfork() system call.
42 * This is the default if sys_vfork exists; if there is an
43 * architecture-dependent implementation of vfork(), define this
44 * symbol.
45 */
46 #ifndef _KLIBC_REAL_VFORK
47 # if defined(__NR_vfork)
48 # define _KLIBC_REAL_VFORK 1
49 # else
50 # define _KLIBC_REAL_VFORK 0
51 # endif
52 #endif
53
54
55 /*
56 * _KLIBC_USE_MMAP2:
57 *
58 * Indicates that this architecture should use sys_mmap2 instead
59 * of sys_mmap. This is the default on 32-bit architectures, assuming
60 * sys_mmap2 exists.
61 */
62 #ifndef _KLIBC_USE_MMAP2
63 # if (_BITSIZE == 32 && defined(__NR_mmap2)) || \
64 (_BITSIZE == 64 && !defined(__NR_mmap))
65 # define _KLIBC_USE_MMAP2 1
66 # else
67 # define _KLIBC_USE_MMAP2 0
68 # endif
69 #endif
70
71
72 /*
73 * _KLIBC_MMAP2_SHIFT:
74 *
75 * Indicate the shift of the offset parameter in sys_mmap2.
76 * On most architectures, this is always 12, but on some
77 * architectures it can be a different number, or the current
78 * page size. If this is dependent on the page size, define
79 * this to an expression which includes __getpageshift().
80 */
81 #ifndef _KLIBC_MMAP2_SHIFT
82 # define _KLIBC_MMAP2_SHIFT 12
83 #endif
84
85
86 /*
87 * _KLIBC_MALLOC_USES_SBRK:
88 *
89 * Indicates that malloc() should use sbrk() to obtain raw memory
90 * from the system, rather than mmap().
91 */
92 /* Default to get memory using mmap() */
93 #ifndef _KLIBC_MALLOC_USES_SBRK
94 # define _KLIBC_MALLOC_USES_SBRK 0
95 #endif
96
97
98 /*
99 * _KLIBC_MALLOC_CHUNK_SIZE:
100 * This is the minimum chunk size we will ask the kernel for using
101 * malloc(); this should be a multiple of the page size and must
102 * be a power of 2.
103 */
104 #ifndef _KLIBC_MALLOC_CHUNK_SIZE
105 # define _KLIBC_MALLOC_CHUNK_SIZE 65536
106 #endif
107
108
109 /*
110 * _KLIBC_SBRK_ALIGNMENT:
111 *
112 * This is the minimum alignment for the memory returned by
113 * sbrk(). It must be a power of 2. If _KLIBC_MALLOC_USES_SBRK
114 * is set it should be no smaller than the size of struct
115 * arena_header in malloc.h (== 4 pointers.)
116 */
117 #ifndef _KLIBC_SBRK_ALIGNMENT
118 # define _KLIBC_SBRK_ALIGNMENT 32
119 #endif
120
121
122 /*
123 * _KLIBC_USE_RT_SIG:
124 *
125 * Indicates that this architecture should use the rt_sig*()
126 * family of system calls, even if the older system calls are
127 * provided. This requires that <asm/signal.h> is correct for
128 * using with the rt_sig*() system calls. This is the default if
129 * the older system calls are undefined in <asm/unistd.h>.
130 *
131 */
132 #ifndef _KLIBC_USE_RT_SIG
133 # ifdef __NR_sigaction
134 # define _KLIBC_USE_RT_SIG 0
135 # else
136 # define _KLIBC_USE_RT_SIG 1
137 # endif
138 #endif
139
140
141 /*
142 * _KLIBC_NEEDS_SA_RESTORER:
143 *
144 * Some architectures, like x86-64 and some i386 Fedora kernels,
145 * do not provide a default sigreturn, and therefore must have
146 * SA_RESTORER set.
147 */
148 #ifndef _KLIBC_NEEDS_SA_RESTORER
149 # define _KLIBC_NEEDS_SA_RESTORER 0
150 #endif
151
152
153 /*
154 * _KLIBC_STATFS_F_TYPE_64:
155 *
156 * This indicates that the f_type, f_bsize, f_namelen,
157 * f_frsize, and f_spare fields of struct statfs are
158 * 64 bits long. This is normally the case for 64-bit
159 * platforms, and so is the default for those. See
160 * usr/include/sys/vfs.h for the exact details.
161 */
162 #ifndef _KLIBC_STATFS_F_TYPE_64
163 # define _KLIBC_STATFS_F_TYPE_64 (_BITSIZE == 64)
164 #endif
165
166
167 /*
168 * _KLIBC_STATFS_F_TYPE_32B:
169 *
170 * mips has it's own definition of statfs, which is
171 * different from any other 32 bit arch.
172 */
173 #ifndef _KLIBC_STATFS_F_TYPE_32B
174 # define _KLIBC_STATFS_F_TYPE_32B 0
175 #endif
176
177
178 /*
179 * _KLIBC_HAS_ARCHSOCKET_H
180 *
181 * This architecture has <klibc/archsocket.h>
182 */
183 #ifndef _KLIBC_HAS_ARCHSOCKET_H
184 # define _KLIBC_HAS_ARCHSOCKET_H 0
185 #endif
186
187
188 /*
189 * _KLIBC_SYS_SOCKETCALL
190 *
191 * This architecture (e.g. SPARC) advertises socket-related
192 * system calls, which are not actually implemented. Use
193 * socketcalls unconditionally instead.
194 */
195 #ifndef _KLIBC_SYS_SOCKETCALL
196 # define _KLIBC_SYS_SOCKETCALL 0
197 #endif
198
199 #endif /* _KLIBC_SYSCONFIG_H */