source: trunk/sys/dietlibc/dietfeatures.h @ 152

Last change on this file since 152 was 1, checked in by alain, 8 years ago

First import

File size: 4.8 KB
Line 
1#ifndef _DIETFEATURES_H
2#define _DIETFEATURES_H
3
4/* feel free to comment some of these out to reduce code size */
5
6#define WANT_FLOATING_POINT_IN_PRINTF
7#define WANT_FLOATING_POINT_IN_SCANF
8#define WANT_CHARACTER_CLASSES_IN_SCANF
9#define WANT_NULL_PRINTF
10/* #define WANT_ERROR_PRINTF */
11#define WANT_LONGLONG_PRINTF
12#define WANT_LONGLONG_SCANF
13
14/* 128 or 2048 bytes buffer size? */
15/* #define WANT_SMALL_STDIO_BUFS */
16
17/* want fread to read() directly if size of data is larger than buffer?
18 * This costs a few bytes but is worth it if the application is already
19 * buffering. */
20#define WANT_FREAD_OPTIMIZATION
21
22/* this is only for meaningful for ttyname and sysconf_cpus so far */
23#define SLASH_PROC_OK
24
25/* use errno_location instead of errno */
26//#define WANT_THREAD_SAFE
27
28/* support __thread */
29//#define WANT_TLS
30
31/* make the startcode, etc. dynamic aware ({con,de}structors) */
32/* #define WANT_DYNAMIC */
33
34/* GDB support in the dynamic linker */
35#define WANT_LD_SO_GDB_SUPPORT
36
37/* do you want smaller or faster string routines? */
38#define WANT_FASTER_STRING_ROUTINES
39
40/* define this to have strncpy zero-fill and not just zero-terminate the
41 * string */
42/* #define WANT_FULL_POSIX_COMPAT */
43
44/* on i386, Linux has an alternate syscall method since 2002/12/16 */
45/* on my Athlon XP, it is twice as fast, but it's only in kernel 2.5 */
46/* 20040118: enabling this breaks User Mode Linux!  It's their fault. */
47//#define WANT_SYSENTER
48
49/* #define WANT_LINKER_WARNINGS */
50
51/* you need to define this if you want to run your programs with large
52 * file support on kernel 2.2 or 2.0 */
53//#define WANT_LARGEFILE_BACKCOMPAT
54
55/* do you want localtime(3) to read /etc/localtime?
56 * Needed for daylight saving time etc. */
57//#define WANT_TZFILE_PARSER
58
59/* do you want the DNS routines to parse and use "domain" and "search"
60 * lines from /etc/resolv.conf?  Normally not used on boot floppies and
61 * embedded environments. */
62//#define WANT_FULL_RESOLV_CONF
63
64/* do you want IPv6 transport support in the DNS resolver? */
65//#define WANT_IPV6_DNS
66
67/* do you want gethostbyname and friends to consult /etc/hosts? */
68//#define WANT_ETC_HOSTS
69
70/* do you want gethostbyname to understand dotted decimal IP numbers
71 * directly and not try to resolve them? */
72//#define WANT_INET_ADDR_DNS
73
74/* do you want math functions high precision rather than fast/small? */
75//#define WANT_HIGH_PRECISION_MATH
76
77/* do you want support for matherr? */
78//#define WANT_MATHERR
79
80/* do you want crypt(3) to use MD5 if the salt starts with "$1$"? */
81#define WANT_CRYPT_MD5
82
83/* do you want diet to include a safeguard dependency to make linking
84 * against glibc fail?  This may fail with older binutils. */
85//#define WANT_SAFEGUARD
86
87/* This enables zeroconf DNS aka Rendezvous aka Bonjour. */
88/* This code will try zeroconf DNS if you ask for host.local or if you
89 * ask for an unqualified hostname */
90//#define WANT_PLUGPLAY_DNS
91
92/* do you want that malloc(0) return a pointer to a "zero-length" object
93 * that is realloc-able; means realloc(..,size) gives a NEW object (like a
94 * call to malloc(size)).
95 * WARNING: this violates C99 */
96/* #define WANT_MALLOC_ZERO */
97
98/* do you want free to overwrite freed data immediately, in the hope of
99 * catching people accessing pointers after they were freed?  This does
100 * a memset with 0x55 as a value. which is not NULL and not -1.  Please
101 * note that this is the shotgun method for debugging, what you really
102 * want is valgrind. */
103/* #define WANT_FREE_OVERWRITE */
104
105/* This enables a stack gap.  Basically, the start code does not run
106 * main but stackgap, which then does alloca(random()) and calls main.
107 * The effect is that buffer overflow exploits will no longer be able to
108 * know the address of the buffer.  Cost: 62 bytes code on x86. */
109/* WARNING: this appears to break with some binutils versions.  Works
110 * for me with binutils 2.15.  The symptom is an error message that
111 * `main' can not be found. */
112/* #define WANT_STACKGAP */
113
114/* Include support for ProPolice/SSP, calls guard_setup */
115/* ProPolice is part of gcc 4.1 and up, there were patches for earlier
116 * versions.  To make use of this, compile your application with
117 * -fstack-protector. */
118#if (__GNUC__>4) || ((__GNUC__==4) && (__GNUC_MINOR__>=1))
119#define WANT_SSP
120#endif
121
122
123
124/* stop uncommenting here ;-) */
125#if defined(WANT_SSP) || defined(WANT_STACKGAP)
126#define CALL_IN_STARTCODE stackgap
127#else
128#define CALL_IN_STARTCODE main
129#endif
130
131#ifndef WANT_FASTER_STRING_ROUTINES
132#define WANT_SMALL_STRING_ROUTINES
133#endif
134
135#ifdef WANT_THREAD_SAFE
136#ifndef __ASSEMBLER__
137#define errno (*__errno_location())
138#define _REENTRANT
139#endif
140#endif
141
142#ifdef __DYN_LIB
143/* with shared libraries you MUST have a dynamic aware startcode */
144#ifndef WANT_DYNAMIC
145#define WANT_DYNAMIC
146#endif
147/* saveguard crashes with shared objects ... */
148#ifdef WANT_SAFEGUARD
149#undef WANT_SAFEGUARD
150#endif
151#endif
152
153#endif
Note: See TracBrowser for help on using the repository browser.