aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/stdlib/wcstoull.c
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2008-11-24 21:27:33 +0000
committerJeff Johnston <jjohnstn@redhat.com>2008-11-24 21:27:33 +0000
commit0aca33c8236bec45e6acc238a1af0c5f2f6f8959 (patch)
tree11e45ea869c4aadf49a65449195e8c7733089321 /newlib/libc/stdlib/wcstoull.c
parent0ef912dfc442abcadcc8a6f01c6a6de86a8a2ea9 (diff)
downloadnewlib-0aca33c8236bec45e6acc238a1af0c5f2f6f8959.zip
newlib-0aca33c8236bec45e6acc238a1af0c5f2f6f8959.tar.gz
newlib-0aca33c8236bec45e6acc238a1af0c5f2f6f8959.tar.bz2
2008-11-24 Craig Howland <howland@LGSInnovations.com>
* libc/stdlib/wcstoull_r.c: Add EINVAL return for bad base value, include wchar.h for prototype, remove extraneous includes, use C99/POSIX ULLONG_MAX (but allow for poor limits.h). * libc/stdlib/wcstoull.c: Fix usage comments (mistakes and to add base value check noted above), remove extraneous includes. * libc/stdio/asnprintf.c: Add #include "local.h" to get function prototype for _svfprintf_r(). * libc/stdio/vasnprintf.c: Ditto. * libc/stdio/local.h: Add function prototype for __submore(). * libc/include/stdio.h: Add function prototypes for _fseeko_r and _ftello_r. * libc/posix/namespace.h: Commented out define for write to eliminate write() prototype being missing for collate.c (which is the only file that presently includes namespace.h). * libc/include/reent.h: Added _rename_r. * libc/reent/renamer.c: Corrected function prototypes in synopses. * libc/locale/ldpart.c: Use struct stat64 when calling fstat64.
Diffstat (limited to 'newlib/libc/stdlib/wcstoull.c')
-rw-r--r--newlib/libc/stdlib/wcstoull.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/newlib/libc/stdlib/wcstoull.c b/newlib/libc/stdlib/wcstoull.c
index 861009b..76caadf 100644
--- a/newlib/libc/stdlib/wcstoull.c
+++ b/newlib/libc/stdlib/wcstoull.c
@@ -16,7 +16,7 @@ ANSI_SYNOPSIS
wchar_t **<[ptr]>, int <[base]>);
TRAD_SYNOPSIS
- #include <stdlib.h>
+ #include <wchar.h>
unsigned long long wcstoull(<[s]>, <[ptr]>, <[base]>)
wchar_t *<[s]>;
wchar_t **<[ptr]>;
@@ -40,8 +40,9 @@ to convert the subject string into an unsigned long long integer, and returns th
result.
If the value of <[base]> is zero, the subject string is expected to look
-like a normal C integer constant (save that no optional sign is permitted):
-a possible <<0x>> indicating hexadecimal radix, and a number.
+like a normal C integer constant: an optional sign (<<+>> or <<->>),
+a possible <<0x>> indicating hexadecimal radix or a possible <0> indicating
+octal radix, and a number.
If <[base]> is between 2 and 36, the expected form of the subject is a
sequence of digits (which may include letters, depending on the
base) representing an integer in the radix specified by <[base]>.
@@ -73,10 +74,13 @@ extra argument <[reent]> is a pointer to a reentrancy structure.
RETURNS
+<<wcstoull>> returns <<0>> and sets <<errno>> to <<EINVAL>> if the value of
+<[base]> is not supported.
+
<<wcstoull>> returns the converted value, if any. If no conversion was
made, <<0>> is returned.
-<<wcstoull>> returns <<ULONG_LONG_MAX>> if the magnitude of the converted
+<<wcstoull>> returns <<ULLONG_MAX>> if the magnitude of the converted
value is too large, and sets <<errno>> to <<ERANGE>>.
PORTABILITY
@@ -119,10 +123,7 @@ PORTABILITY
*/
#include <_ansi.h>
-#include <limits.h>
-#include <wctype.h>
-#include <errno.h>
-#include <stdlib.h>
+#include <wchar.h>
#include <reent.h>
#ifndef _REENT_ONLY