Annotation of dietlibc/dietfeatures.h, revision 1.55

1.4       fefe        1: #ifndef _DIETFEATURES_H
                      2: #define _DIETFEATURES_H
1.1       cvs         3: 
                      4: /* feel free to comment some of these out to reduce code size */
                      5: 
1.13      fefe        6: #define WANT_FLOATING_POINT_IN_PRINTF
                      7: #define WANT_FLOATING_POINT_IN_SCANF
1.12      fefe        8: #define WANT_CHARACTER_CLASSES_IN_SCANF
1.1       cvs         9: #define WANT_NULL_PRINTF
1.52      sanjiyan   10: /* #define WANT_ERROR_PRINTF */
1.24      fefe       11: #define WANT_LONGLONG_PRINTF
1.42      olaf       12: #define WANT_LONGLONG_SCANF
1.1       cvs        13: 
1.20      fefe       14: /* 128 or 2048 bytes buffer size? */
                     15: /* #define WANT_SMALL_STDIO_BUFS */
                     16: 
1.40      fefe       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: 
1.34      fefe       22: /* this is only for meaningful for ttyname and sysconf_cpus so far */
1.40      fefe       23: #define SLASH_PROC_OK
1.1       cvs        24: 
                     25: /* use errno_location instead of errno */
1.20      fefe       26: #define WANT_THREAD_SAFE
1.1       cvs        27: 
1.35      olaf       28: /* make the startcode, etc. dynamic aware ({con,de}structors) */
1.38      olaf       29: /* #define WANT_DYNAMIC */
1.1       cvs        30: 
                     31: /* do you want smaller or faster string routines? */
1.2       fefe       32: /* #define WANT_FASTER_STRING_ROUTINES */
1.1       cvs        33: 
1.43      fefe       34: /* define this to have strncpy zero-fill and not just zero-terminate the
                     35:  * string */
                     36: /* #define WANT_FULL_POSIX_COMPAT */
                     37: 
1.47      leitner    38: /* on i386, Linux has an alternate syscall method since 2002/12/16 */
                     39: /* on my Athlon XP, it is twice as fast, but it's only in kernel 2.5 */
1.53      leitner    40: /* 20040118: enabling this breaks User Mode Linux!  It's their fault. */
1.48      leitner    41: #define WANT_SYSENTER
1.47      leitner    42: 
1.4       fefe       43: #define WANT_LINKER_WARNINGS
                     44: 
1.7       fefe       45: /* you need to define this if you want to run your programs with large
1.31      fefe       46:  * file support on kernel 2.2 or 2.0 */
1.7       fefe       47: #define WANT_LARGEFILE_BACKCOMPAT
                     48: 
1.8       fefe       49: /* do you want localtime(3) to read /etc/localtime?
                     50:  * Needed for daylight saving time etc. */
                     51: #define WANT_TZFILE_PARSER
1.1       cvs        52: 
1.21      fefe       53: /* do you want the DNS routines to parse and use "domain" and "search"
                     54:  * lines from /etc/resolv.conf?  Normally not used on boot floppies and
                     55:  * embedded environments. */
                     56: #define WANT_FULL_RESOLV_CONF
                     57: 
1.45      fefe       58: /* do you want IPv6 transport support in the DNS resolver? */
                     59: #define WANT_IPV6_DNS
                     60: 
1.27      fefe       61: /* do you want gethostbyname and friends to consult /etc/hosts? */
                     62: #define WANT_ETC_HOSTS
                     63: 
1.46      fefe       64: /* do you want gethostbyname to understand dotted decimal IP numbers
                     65:  * directly and not try to resolve them? */
                     66: #define WANT_INET_ADDR_DNS
                     67: 
1.29      fefe       68: /* do you want math functions high precision rather than fast/small? */
                     69: #define WANT_HIGH_PRECISION_MATH
                     70: 
                     71: /* do you want support for matherr? */
                     72: #define WANT_MATHERR
                     73: 
1.30      fefe       74: /* do you want crypt(3) to use MD5 if the salt starts with "$1$"? */
                     75: #define WANT_CRYPT_MD5
                     76: 
1.32      fefe       77: /* do you want diet to include a safeguard dependency to make linking
1.45      fefe       78:  * against glibc fail?  This may fail with older binutils. */
1.32      fefe       79: #define WANT_SAFEGUARD
1.38      olaf       80: 
1.49      leitner    81: /* this enables an experimental DNS hack of mine.
                     82:  * See http://www.fefe.de/ipv6pnpdns.html */
1.50      leitner    83: // #define WANT_IPV6_PLUGPLAY_DNS
1.49      leitner    84: 
1.54      leitner    85: /* do you want that malloc(0) return a pointer to a "zero-length" object
1.38      olaf       86:  * that is realloc-able; means realloc(..,size) gives a NEW object (like a
                     87:  * call to malloc(size)).
                     88:  * WARNING: this violates C99 */
                     89: /* #define WANT_MALLOC_ZERO */
                     90: 
1.54      leitner    91: /* This enables a stack gap.  Basically, the start code does not run
                     92:  * main but stackgap, which then does alloca(random()) and calls main.
                     93:  * The effect is that buffer overflow exploits will no longer be able to
                     94:  * know the address of the buffer.  Cost: 62 bytes code on x86. */
                     95: #define WANT_STACKGAP
1.32      fefe       96: 
1.1       cvs        97: /* stop uncommenting here ;-) */
                     98: #ifndef WANT_FASTER_STRING_ROUTINES
                     99: #define WANT_SMALL_STRING_ROUTINES
1.4       fefe      100: #endif
                    101: 
1.22      fefe      102: #ifdef WANT_THREAD_SAFE
1.44      fefe      103: #ifndef __ASSEMBLER__
1.22      fefe      104: #define errno (*__errno_location())
1.23      fefe      105: #define _REENTRANT
1.44      fefe      106: #endif
1.22      fefe      107: #endif
                    108: 
1.33      olaf      109: #ifdef __DYN_LIB
1.39      olaf      110: /* with shared libraries you MUST have a dynamic aware startcode */
1.33      olaf      111: #ifndef WANT_DYNAMIC
                    112: #define WANT_DYNAMIC
1.35      olaf      113: #endif
                    114: /* saveguard crashes with shared objects ... */
                    115: #ifdef WANT_SAFEGUARD
                    116: #undef WANT_SAFEGUARD
1.33      olaf      117: #endif
                    118: #endif
                    119: 
1.1       cvs       120: #endif

LinuxTV legacy CVS <linuxtv.org/cvs>