summaryrefslogtreecommitdiff
path: root/include/stdlib.h
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2002-05-06 07:37:32 +0000
committerManuel Novoa III <mjn3@codepoet.org>2002-05-06 07:37:32 +0000
commitd07fdf8b9ece2c4339b325921add50792077bf97 (patch)
treeb0886656bdd854728f2d1c05597368c4739ecc1b /include/stdlib.h
parent7f09a14cabbec158d683542e53f53ccfe75031fa (diff)
New locale support (in development). Supports LC_CTYPE, LC_NUMERIC,
LC_TIME, LC_MONETARY, and LC_MESSAGES for the SUSv3 items. Also, nl_langinfo() when real locale support is enabled. New implementation of ctype.h. New implementation of wctype.h. New implementation of most of the string functions (smaller). New implementation of the wcs/wmem functions. These are untested, but they're also just preprocessor-modified versions ot the corresponding str/mem functions. Tweaked qsort and new bsearch. Stuff still pending: stdlib.h and wchar.h mb<->wc functions. I actually have working versions of the stdlib ones, but the reentrant versions from wchar.h require some reworking. Basic replacement and translit support for wc->mb conversions. (groundwork laid). Simple-minded collate support such as was provided by the previous locale implementation. (mostly done -- 8-bit codesets only) Shared mmaping of the locale data and strerror message text.
Diffstat (limited to 'include/stdlib.h')
-rw-r--r--include/stdlib.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/stdlib.h b/include/stdlib.h
index 302f2819a..1920e418a 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -27,7 +27,7 @@
/* Get size_t, wchar_t and NULL from <stddef.h>. */
#define __need_size_t
#ifndef __need_malloc_and_calloc
-#if 0
+#ifdef __UCLIBC_HAS_WCHAR__
# define __need_wchar_t
#endif
# define __need_NULL
@@ -130,10 +130,10 @@ __extension__ typedef struct
#define EXIT_SUCCESS 0 /* Successful exit status. */
-#if 0
+#ifdef __UCLIBC_HAS_WCHAR__
/* Maximum length of a multibyte character in the current locale. */
-#define MB_CUR_MAX (__ctype_get_mb_cur_max ())
-extern size_t __ctype_get_mb_cur_max (void) __THROW;
+#define MB_CUR_MAX (_stdlib_mb_cur_max ())
+extern size_t _stdlib_mb_cur_max (void) __THROW;
#endif
/* Convert a string to a floating-point number. */
@@ -776,7 +776,7 @@ extern int qfcvt_r (long double __value, int __ndigit,
# endif /* misc */
#endif /* use MISC || use X/Open Unix */
-#if 0
+#ifdef __UCLIBC_HAS_WCHAR__
/* Return the length of the multibyte character
in S, which is no longer than N. */
extern int mblen (__const char *__s, size_t __n) __THROW;
@@ -796,7 +796,7 @@ extern size_t mbstowcs (wchar_t *__restrict __pwcs,
extern size_t wcstombs (char *__restrict __s,
__const wchar_t *__restrict __pwcs, size_t __n)
__THROW;
-#endif
+#endif /* def __UCLIBC_HAS_WCHAR__ */
#ifdef __USE_SVID
/* Determine whether the string value of RESPONSE matches the affirmation