source: rtems-libbsd/rtemsbsd/freebsd/machine/rtems-bsd-config.h.in @ f333955

4.1155-freebsd-126-freebsd-12freebsd-9.3
Last change on this file since f333955 was f333955, checked in by Joel Sherrill <joel.sherrill@…>, on 08/31/12 at 23:50:17

Build System: Add option to disable IPV6 in orderly fashion

If you define DISABLE_IPV6=yes to the config.inc, then the
rtems-bsd-config.h file will be modified accordingly and
the IPV6 kernel sources will not be built. This is easier
to manage and more correct than having a patch to do the same.

  • Property mode set to 100644
File size: 5.8 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup rtems_bsd_machine
5 *
6 * @brief TODO.
7 */
8
9/*
10 * Copyright (c) 2009, 2010 embedded brains GmbH.  All rights reserved.
11 *
12 *  embedded brains GmbH
13 *  Obere Lagerstr. 30
14 *  82178 Puchheim
15 *  Germany
16 *  <rtems@embedded-brains.de>
17 *
18 * The license and distribution terms for this file may be
19 * found in the file LICENSE in this distribution or at
20 * http://www.rtems.com/license/LICENSE.
21 */
22
23#ifndef _RTEMS_BSD_MACHINE_RTEMS_BSD_CONFIG_H_
24#define _RTEMS_BSD_MACHINE_RTEMS_BSD_CONFIG_H_
25
26/* We compile for RTEMS and FreeBSD */
27#define __rtems__ 1
28#define __FreeBSD__ 1
29#define __BSD_VISIBLE 1
30
31/* XXX hack so /opt.../machine/param.h can disable MSIZE and use this one */
32#define __NEW_RTEMS_BSD__
33
34/* Disable procedure call definitions */
35#undef __P
36#undef __strong_reference
37
38#ifndef _RTEMS_BSD_BSD_HH_
39/* General defines to activate BSD kernel parts */
40#define _KERNEL 1
41
42/* Disable standard system headers */
43#undef _SYS_UNISTD_H
44#define _SYS_UNISTD_H 1
45#undef _SYS_FEATURES_H
46#define _SYS_FEATURES_H 1
47#undef _SYS_TTYCOM_H_
48#define _SYS_TTYCOM_H_ 1
49
50/* Disable procedure call definitions */
51#undef __P
52#undef __strong_reference
53
54/* Disable some quirks in the standard headers */
55#define _POSIX_SOURCE 1
56
57/* We need POSIX threads */
58#define _POSIX_THREADS 1
59
60#endif /* !_RTEMS_BSD_BSD_HH_ */
61
62/* Type set from the C standard */
63#include <stdarg.h>
64#include <stddef.h>
65#include <stdint.h>
66#include <limits.h>
67#include <string.h>
68#include <stdio.h>
69#include <stdlib.h>
70#include <errno.h>
71#include <sys/types.h>
72
73/* Ensure that we are RTEMS compatible and can use RTEMS */
74#include <rtems.h>
75#include <rtems/error.h>
76#include <rtems/chain.h>
77#include <rtems/libio.h>
78
79#ifndef _RTEMS_BSD_BSD_HH_
80/* Ensure that we can use POSIX threads */
81#include <pthread.h>
82
83/* The BSD kernel is not a POSIX source */
84#undef _POSIX_SOURCE
85
86/* Symbol undefines */
87#undef MAXPATHLEN
88
89#endif /* !_RTEMS_BSD_BSD_HH_ */
90
91/* Networking */
92#define IPSEC 1
93#define INET  1
94#define INET6 1
95#define TCP_SIGNATURE 1
96
97/* Integer type definitions */
98
99#define __INT_MAX INT_MAX
100#define GID_MAX   UINT_MAX  /* max value for a gid_t */
101#define UID_MAX   UINT_MAX  /* max value for a uid_t */
102
103#define __int8_t int8_t
104#define __int16_t int16_t
105#define __int32_t int32_t
106#define __int64_t int64_t
107
108#define __int_least8_t int_least8_t
109#define __int_least16_t int_least16_t
110#define __int_least32_t int_least32_t
111#define __int_least64_t int_least64_t
112
113#define __int_fast8_t int_fast8_t
114#define __int_fast16_t int_fast16_t
115#define __int_fast32_t int_fast32_t
116#define __int_fast64_t int_fast64_t
117
118#define __uint8_t uint8_t
119#define __uint16_t uint16_t
120#define __uint32_t uint32_t
121#define __uint64_t uint64_t
122
123#define __uint_least8_t uint_least8_t
124#define __uint_least16_t uint_least16_t
125#define __uint_least32_t uint_least32_t
126#define __uint_least64_t uint_least64_t
127
128#define __uint_fast8_t uint_fast8_t
129#define __uint_fast16_t uint_fast16_t
130#define __uint_fast32_t uint_fast32_t
131#define __uint_fast64_t uint_fast64_t
132
133#define __intfptr_t intptr_t
134#define __uintfptr_t uintptr_t
135
136#define __intptr_t intptr_t
137#define __uintptr_t uintptr_t
138
139#define __intmax_t intmax_t
140#define __uintmax_t uintmax_t
141
142#define __register_t int
143#define __u_register_t unsigned int
144
145#define __float_t float
146#define __double_t double
147
148#define __vm_offset_t uintptr_t
149#define __vm_ooffset_t uint64_t
150#define __vm_paddr_t uintptr_t
151#define __vm_pindex_t uint64_t
152#define __vm_size_t uintptr_t
153
154#define __clock_t clock_t
155#define __cpumask_t unsigned int
156#define __critical_t intptr_t
157#define __ptrdiff_t ptrdiff_t
158#define __segsz_t intptr_t
159#define __time_t time_t
160
161#define __va_list va_list
162
163#undef __size_t
164#define __size_t size_t
165
166#define _CLOCKID_T_DECLARED 1
167#define _DEV_T_DECLARED 1
168#define _GID_T_DECLARED 1
169#define _MODE_T_DECLARED 1
170#define _OFF_T_DECLARED 1
171#define _PID_T_DECLARED 1
172#define _SSIZE_T_DECLARED 1
173#define _TIMER_T_DECLARED 1
174#define _TIME_T_DECLARED 1
175#define _UID_T_DECLARED 1
176#define _USECONDS_T_DECLARED 1
177#define _FSBLKCNT_T_DECLARED 1
178#define _BLKSIZE_T_DECLARED 1
179#define _BLKCNT_T_DECLARED 1
180
181#define __dev_t _bsd_dev_t
182#define __gid_t _bsd_gid_t
183#define __off_t _bsd_off_t
184#define __pid_t _bsd_pid_t
185#define __uid_t _bsd_uid_t
186
187/* Missing error number */
188//#define ENOIOCTL EINVAL
189
190#ifndef _RTEMS_BSD_BSD_HH_
191/* Symbol rename */
192
193#include <freebsd/machine/rtems-bsd-symbols.h>
194
195#define gets _bsd_gets
196#define realloc _bsd_realloc
197#define reallocf _bsd_reallocf
198#define setenv _bsd_setenv
199#define abs _bsd_abs
200#define labs _bsd_labs
201
202#define ticks _Watchdog_Ticks_since_boot
203
204/* Debug */
205
206void rtems_bsd_assert_func(const char *file, int line, const char *func, const char *expr);
207
208#define BSD_PRINTF(fmt, ...) printf("%s: " fmt, __func__, ##__VA_ARGS__)
209
210#define BSD_PANIC(fmt, ...) panic("%s: " fmt "\n",  __func__, ##__VA_ARGS__)
211
212#ifdef NDEBUG
213# define BSD_ASSERT(expr) ((void) 0)
214#else
215# define BSD_ASSERT(expr) ((expr) ? (void) 0 : rtems_bsd_assert_func(__FILE__, __LINE__, __func__, #expr))
216#endif
217
218#define BSD_ASSERT_SC(sc) BSD_ASSERT((sc) == RTEMS_SUCCESSFUL)
219
220#define BSD_ASSERT_RV(rv) BSD_ASSERT((rv) == 0)
221
222/* General definitions */
223
224#define BSD_TASK_PRIORITY_NORMAL 120
225
226#define BSD_TASK_PRIORITY_TIMER 110
227
228#define BSD_TASK_PRIORITY_INTERRUPT 100
229
230#define BSD_TASK_PRIORITY_RESOURCE_OWNER 100
231
232/* FIXME */
233#define BSD_MINIMUM_TASK_STACK_SIZE ((size_t) 32 * 1024)
234
235#define M_RTEMS_HEAP 0
236
237#define BSD_MAXIMUM_SLEEP_QUEUES 32
238
239extern rtems_chain_control rtems_bsd_lock_chain;
240
241extern rtems_chain_control rtems_bsd_mtx_chain;
242
243extern rtems_chain_control rtems_bsd_sx_chain;
244
245extern rtems_chain_control rtems_bsd_condvar_chain;
246
247extern rtems_chain_control rtems_bsd_callout_chain;
248
249extern rtems_chain_control rtems_bsd_thread_chain;
250
251extern rtems_chain_control rtems_bsd_malloc_chain;
252
253/* CPU definitions */
254#define cpu_spinwait()    /* nothing */
255
256#endif /* !_RTEMS_BSD_BSD_HH_ */
257
258#endif /* _RTEMS_BSD_MACHINE_RTEMS_BSD_CONFIG_H_ */
Note: See TracBrowser for help on using the repository browser.