summaryrefslogtreecommitdiff
path: root/extra/Configs/Config.in
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2003-08-01 20:08:59 +0000
committerManuel Novoa III <mjn3@codepoet.org>2003-08-01 20:08:59 +0000
commit1217289737588e65b088b3535428b27c7287d699 (patch)
tree6a292ac767d219702e26a6a2111737f84a96900c /extra/Configs/Config.in
parent32b76c5ec3c257b7287913d0d1a96e0cbb2e9c6a (diff)
Add a new *scanf implementation, includeing the *wscanf functions.
Should be standards compliant and with several optional features, including support for hexadecimal float notation, locale awareness, glibc-like locale-specific digit grouping with the `'' flag, and positional arg support. I tested it pretty well (finding several bugs in glibc's scanf in the process), but it is brand new so be aware. The *wprintf functions now support floating point output. Also, a couple of bugs were squashed. Finally, %a/%A conversions are now implemented. Implement the glibc xlocale interface for thread-specific locale support. Also add the various *_l(args, locale_t loc_arg) funcs. NOTE!!! setlocale() is NOT threadsafe! NOTE!!! The strto{floating point} conversion functions are now locale aware. The also now support hexadecimal floating point notation. Add the wcsto{floating point} conversion functions. Fix a bug in mktime() related to dst. Note that unlike glibc's mktime, uClibc's version always normalizes the struct tm before attempting to determine the correct dst setting if tm_isdst == -1 on entry. Add a stub version of the libintl functions. (untested) Fixed a known memory leak in setlocale() related to the collation data. Add lots of new config options (which Erik agreed to sort out :-), including finally exposing some of the stripped down stdio configs. Be careful with those though, as they haven't been tested in a long time. (temporary) GOTCHAs... The ctype functions are currently incorrect for 8-bit locales. They will be fixed shortly. The ctype functions are now table-based, resulting in larger staticly linked binaries. I'll be adding an option to use the old approach in the stub locale configuration.
Diffstat (limited to 'extra/Configs/Config.in')
-rw-r--r--extra/Configs/Config.in393
1 files changed, 390 insertions, 3 deletions
diff --git a/extra/Configs/Config.in b/extra/Configs/Config.in
index bbfbc854d..9de4a5e6f 100644
--- a/extra/Configs/Config.in
+++ b/extra/Configs/Config.in
@@ -298,12 +298,48 @@ endmenu
menu "String and Stdio Support"
+config UCLIBC_HAS_CTYPE_SIGNED
+ bool "Support Signed Characters In `ctype.h' Functions."
+ default y
+ help
+ Answer Y to enable support for passing signed char values to
+ the `ctype.h' functions. ANSI/ISO C99 and SUSv3 specify that
+ these functions are only defined for unsigned char values and
+ EOF. However, glibc allows negative signed char values as well
+ in order to support 'broken old programs'.
+
+ Most people will answer Y.
+
+choice
+ prompt "`ctype.h' Invalid Arg Behavior."
+ default UCLIBC_HAS_CTYPE_CHECKED
+ help
+ Please select the invalid arg behavior you want for the `ctype' functions.
+
+ The `ctype' functions are now implemented using table lookups, with
+ the arg being the index. This can result in incorrect memory accesses
+ or even segfaults for args outside of the allowed range.
+
+ NOTE: This only affects the `ctype' _functions_. It does not affect
+ the macro implementations.
+
+config UCLIBC_HAS_CTYPE_UNSAFE
+ bool "Do not check. (incorrect array access possible)"
+
+config UCLIBC_HAS_CTYPE_CHECKED
+ bool "Detect and handle appropriately."
+
+config UCLIBC_HAS_CTYPE_ENFORCED
+ bool "Issue a diagnostic and abort()."
+
+endchoice
+
config UCLIBC_HAS_WCHAR
bool "Wide Character Support"
default n
help
Answer Y to enable wide character support. This will make uClibc
- much larger.
+ much larger. It is also currently required for locale support.
Most people will answer N.
@@ -313,11 +349,67 @@ config UCLIBC_HAS_LOCALE
default n
help
Answer Y to enable locale support. This will make uClibc much
- bigger. uClibc's locale support is still under development, and
- should be finished in the next several weeks (November 2002).
+ bigger. uClibc's locale support is still under development.
Most people will wisely answer N.
+config UCLIBC_HAS_XLOCALE
+ bool "Extended Locale Support (experimental/incomplete)"
+ depends on UCLIBC_HAS_LOCALE
+ default n
+ help
+ Answer Y to enable extended locale support similar to that provided
+ by glibc. This is primarily intended to support libstd++ functionality.
+ However, it also allows thread-specific locale selection via uselocale().
+
+ Most people will answer N.
+
+config UCLIBC_HAS_SCANF_GLIBC_A_FLAG
+ bool "Support glibc's `a' flag for scanf string conversions"
+ default n
+ help
+ NOTE!!! Currently Not Implemented!!! Just A Place Holder!! NOTE!!!
+
+ Answer Y to enable support for glibc's `a' flag for the scanf string
+ conversions `%s', `%[', `%ls', `%l[`, and `%S'. This is used to
+ auto-allocate sufficient memory to hold the data retrieved.
+
+ Most people will answer N.
+
+config UCLIBC_HAS_HEXADECIMAL_FLOATS
+ bool "Support hexadecimal float notation"
+ default n
+ help
+ Answer Y to enable support for hexadecimal float notation in the
+ (wchar and) char string to floating point conversion functions, as
+ well as support for the %a and %A conversion specifiers in the
+ *printf() and *scanf() functions.
+
+ Most people will answer N.
+
+config UCLIBC_HAS_GLIBC_DIGIT_GROUPING
+ bool "Support glibc's `'' flag for allowing locale-specific digit grouping"
+ depends on UCLIBC_HAS_LOCALE
+ default n
+ help
+ Answer Y to enable support for glibc's `'' flag for allowing locale-specific
+ digit grouping in base 10 integer conversions and appropriate floating point
+ conversions in the *printf() and *scanf() functions.
+
+ Most people will answer N.
+
+config UCLIBC_HAS_SCANF_LENIENT_DIGIT_GROUPING
+ bool "Do not require digit grouping when the `'' flag is specified"
+ depends on UCLIBC_HAS_GLIBC_DIGIT_GROUPING
+ default y
+ help
+ Answer Y to make digit grouping optional when the `'' flag is specified.
+ This is the standard glibc behavior. If the initial string of digits
+ exceeds the maximum group number, the input will be treated as a normal
+ non-grouped number.
+
+ Most people will answer N.
+
config USE_OLD_VFPRINTF
bool "Use the old vfprintf implementation"
default n
@@ -332,6 +424,293 @@ config USE_OLD_VFPRINTF
Most people will answer N.
+config UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS
+ int "Maximum number of positional args. Either 0 or >= 9."
+ depends on !USE_OLD_VFPRINTF
+ default 9
+ help
+ Set the maximum number of positional args supported by the printf/scanf
+ functions. The Single Unix Specification Version 3 requires a minimum
+ value of 9. Setting this to a value lower than 9 will disable positional
+ arg support and cause the NL_ARGMAX macro in limits.h to be #undef'd.
+ WARNING! The workspace to support positional args is currently allocated
+ on the stack. You probably don't want to set this to too high a value.
+
+ Most people will answer 9.
+
+
+config UCLIBC_HAS_TZ_CACHING
+ bool "Enable caching of the last valid timezone `TZ' string"
+ default y
+ help
+ Answer Y to enable caching of the last valid `TZ' string describing
+ the timezone setting. This allows a quick string compare to avoid
+ repeated parsing of unchanged `TZ' strings when tzset() is called.
+
+ Most people will answer Y.
+
+config UCLIBC_HAS_TZ_FILE
+ bool "Enable `/etc/TZ' file support to set a default timezone (uClibc-specific)"
+ default y
+ help
+ Answer Y to enable the setting of a default timezone for uClibc.
+
+ Ordinarily, uClibc gets the timezone information exclusively from the
+ `TZ' environment variable. In particular, there is no support for
+ the zoneinfo directory tree or the /etc/timezone file used by glibc.
+
+ With this option enabled, uClibc will use the value stored in the
+ file `/etc/TZ' (default path) to obtain timezone information if the
+ `TZ' environment variable is missing or has an invalid value. The
+ file consists of a single line (newline required) of text describing
+ the timezone in the format specified for the TZ environment variable.
+
+ Simply doing `echo CST6CDT > /etc/TZ' is enough to create a valid file.
+ See
+ http://www.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap08.html
+ for details on valid settings of `TZ'.
+
+ Most people will answer Y.
+
+config UCLIBC_TZ_FILE_PATH
+ string "Path to the `TZ' file for setting the global timezone"
+ depends on UCLIBC_HAS_TZ_FILE
+ default "/etc/TZ"
+ help
+ This is the path to the `TZ' file.
+
+ Most people will use the default of `/etc/TZ'.
+
+config UCLIBC_HAS_TZ_FILE_READ_MANY
+ bool "Repeatedly read the `/etc/TZ' file"
+ depends on UCLIBC_HAS_TZ_FILE
+ default y
+ help
+ Answer Y to enable repeated reading of the `/etc/TZ' file even after
+ a valid value has been read. This incurs the overhead of an open/read/close
+ for each tzset() call (explicit or implied). However, setting this
+ will allows applications to update their timezone information if the contents
+ of the file change.
+
+ Most people will answer Y.
+
+choice
+ prompt "Stdio buffer size"
+ default UCLIBC_HAS_STDIO_BUFSIZ_256
+ help
+ Please select a value for BUFSIZ. This will be used by the
+ stdio subsystem as the default buffer size for a file, and
+ affects fopen(), setvbuf(), etc.
+
+ NOTE: Setting this to `none' will disable buffering completely.
+ However, BUFSIZ will still be defined in stdio.h as 256 because
+ many applications use this value.
+
+config UCLIBC_HAS_STDIO_BUFSIZ_NONE
+ bool "none (WARNING - BUFSIZ will be 256 in stdio.h)"
+ depends !UCLIBC_HAS_WCHAR
+
+config UCLIBC_HAS_STDIO_BUFSIZ_256
+ bool "256 (minimum ANSI/ISO C99 value)"
+
+config UCLIBC_HAS_STDIO_BUFSIZ_512
+ bool "512"
+
+config UCLIBC_HAS_STDIO_BUFSIZ_1024
+ bool "1024"
+
+config UCLIBC_HAS_STDIO_BUFSIZ_2048
+ bool "2048"
+
+config UCLIBC_HAS_STDIO_BUFSIZ_4096
+ bool "4096"
+
+config UCLIBC_HAS_STDIO_BUFSIZ_8192
+ bool "8192"
+
+# If you add more choices, you will need to update uClibc_stdio.h.
+
+endchoice
+
+config UCLIBC_HAS_STDIO_GETC_MACRO
+ bool "Provide a macro version of getc()"
+ depends !UCLIBC_HAS_STDIO_BUFSIZ_NONE
+ default y
+ help
+ Provide a macro version of getc().
+
+ Most people will answer Y.
+
+config UCLIBC_HAS_STDIO_PUTC_MACRO
+ bool "Provide a macro version of putc()"
+ depends !UCLIBC_HAS_STDIO_BUFSIZ_NONE
+ default y
+ help
+ Provide a macro version of putc().
+
+ Most people will answer Y.
+
+config UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION
+ bool "Support auto-r/w transition"
+ default y
+ help
+ Answer Y to enable the stdio subsystem to automaticly transition
+ between reading and writing. This relaxes the ANSI/ISO C99 requirement:
+
+ When a file is opened with update mode ('+' as the second or third character
+ in the list of mode argument values), both input and output may be performed
+ on the associated stream. However, output shall not be directly followed by
+ input without an intervening call to the fflush function or to a file
+ positioning function (fseek, fsetpos, or rewind), and input shall not be
+ directly followed by output without an intervening call to a file positioning
+ function, unless the input operation encounters end­of­file.
+
+ Most people will answer Y.
+
+config UCLIBC_HAS_FOPEN_LARGEFILE_MODE
+ bool "Support an fopen() `F' flag for large file mode (uClibc-specific)"
+ depends on UCLIBC_HAS_LFS
+ default n
+ help
+ Answer Y to enable a uClibc-specific extension to allow passing an
+ additional `F' flag in the mode string for fopen() to specify that
+ the file should be open()ed with the O_LARGEFILE flag set.
+
+ Most people will answer N.
+
+config UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE
+ bool "Support an fopen() `x' flag for exclusive mode (glibc-compat)"
+ default n
+ help
+ Answer Y to support a glibc extension to allow passing
+ additional `x' flag in the mode string for fopen() to specify that
+ the file should be open()ed with the O_EXCL flag set.
+
+ Most people will answer N.
+
+config UCLIBC_HAS_GLIBC_CUSTOM_STREAMS
+ bool "Support fmemopen(), open_memstream(), and fopencookie() (glibc-compat)"
+ default n
+ help
+ Answer Y to support the glibc `custom stream' extension functions
+ fmemopen(), open_memstream(), and fopencookie().
+
+ NOTE: There are some minor differences regarding seeking behavior.
+
+ Most people will answer N.
+
+choice
+ prompt "Stdio builtin buffer size (uClibc-specific)"
+ depends !UCLIBC_HAS_STDIO_BUFSIZ_NONE
+ default UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE
+ help
+ When a FILE is created with fopen(), an attempt is made to allocate
+ a BUFSIZ buffer for it. If the allocation fails, fopen() will still
+ succeed but the FILE will be unbuffered.
+
+ This option adds a small amount of space to each FILE to act as an
+ emergeny buffer in the event of a buffer allocation failure.
+
+ Most people will answer None.
+
+config UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE
+ bool "None"
+
+config UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4
+ bool "4"
+
+config UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8
+ bool "8"
+
+# If you add more choices, you will need to update uClibc_stdio.h.
+
+endchoice
+
+config UCLIBC_HAS_PRINTF_M_SPEC
+ bool "Support the `%m' specifier in printf format strings (glibc-compat)"
+ default n
+ help
+ Answer Y to support a glibc extension to interpret `%m' in printf
+ format strings as an instruction to output the error message string
+ (as generated by strerror) corresponding to the current value of `errno'.
+
+ Most people will answer N.
+
+config UCLIBC_HAS_GLIBC_CUSTOM_PRINTF
+ bool "Support glibc's register_printf_function() (glibc-compat)"
+ default n
+ help
+ Answer Y to support glibc's register_printf_function() to allow an
+ application to add its own printf conversion specifiers.
+
+ NOTE: This implementation limits the number or registered specifiers to 10.
+ NOTE: This implementation requires new conversion specifiers to be ASCII
+ characters (0-0x7f). This is to avoid problems with processing
+ format strings in locales with different multibyte conversions.
+
+ Most people will answer N.
+
+config UCLIBC_HAS_ERRNO_MESSAGES
+ bool "Include the errno message text in the library"
+ default y
+ help
+ Answer Y if you want to include the errno message text in the
+ library. This adds about 3K to the library, but enables strerror()
+ to generate text other than `Unknown error <number>'.
+
+ Most people will answer Y.
+
+config UCLIBC_HAS_SYS_ERRLIST
+ bool "Support sys_errlist[] (obsolete-compat)"
+ depends on UCLIBC_HAS_ERRNO_MESSAGES
+ default n
+ help
+ Answer Y if you want to support the obsolete sys_errlist[].
+ This adds about 0.5k to the library, except for the mips
+ arch where it adds over 4K.
+
+ WARNING! In the future, support for sys_errlist[] may be unavailable
+ in at least some configurations. In fact, it may be removed altogether.
+
+ Most people will answer N.
+
+config UCLIBC_HAS_SIGNUM_MESSAGES
+ bool "Include the signum message text in the library"
+ default y
+ help
+ Answer Y if you want to include the signum message text in the
+ library. This adds about 0.5K to the library, but enables strsignal()
+ to generate text other than `Unknown signal <number>'.
+
+ Most people will answer Y.
+
+config UCLIBC_HAS_SYS_SIGLIST
+ bool "Support sys_siglist[] (bsd-compat)"
+ depends on UCLIBC_HAS_SIGNUM_MESSAGES
+ default n
+ help
+ Answer Y if you want to support sys_siglist[].
+
+ WARNING! In the future, support for sys_siglist[] may be unavailable
+ in at least some configurations. In fact, it may be removed altogether.
+
+ Most people will answer N.
+
+config UCLIBC_HAS_GETTEXT_AWARENESS
+ bool "Include gettext awareness"
+ depends on UCLIBC_HAS_LOCALE
+ default n
+ help
+ NOTE!!! Not yet integrated with strerror and strsignal. NOTE!!!
+
+ Answer Y if you want to include weak stub gettext support and
+ make the *strerror*() and strsignal() functions gettext-aware.
+
+ Currently, to get functional gettext functionality you will need
+ to use gnu gettext.
+
+ Most people will answer N.
+
endmenu
menu "Library Installation Options"
@@ -482,4 +861,12 @@ config UCLIBC_MALLOC_DEBUGGING
the size of malloc appreciably (due to strings etc), you
should say N unless you need to debug a malloc problem.
+config UCLIBC_MJN3_ONLY
+ bool "Manuel's hidden warnings"
+ default n
+ help
+ Answer Y here to see all Manuel's personal notes, warnings, and todos.
+
+ Most people will answer N.
+
endmenu