summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2008-10-19 18:50:15 +0200
committerBruno Haible <bruno@clisp.org>2008-10-19 18:50:15 +0200
commit17e17901bb654bcd5659550231c16ca8cbdb92bf (patch)
tree28cf29eafa202c56c7c1086051b461252d61243c /lib
parent6688506d40c960504c892d8f394beaafc01cf007 (diff)
downloadgnulib-17e17901bb654bcd5659550231c16ca8cbdb92bf.tar.gz
Add strtoull() declaration to <stdlib.h>.
Diffstat (limited to 'lib')
-rw-r--r--lib/stdlib.in.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h
index cf8cf77829..5e04b1e304 100644
--- a/lib/stdlib.in.h
+++ b/lib/stdlib.in.h
@@ -265,8 +265,8 @@ extern double strtod (const char *str, char **endp);
"0x").
If ENDPTR is not NULL, the address of the first byte after the integer is
stored in *ENDPTR.
- Upon overflow or underflow, the return value is LLONG_MAX or LLONG_MIN,
- respectively, and errno is set to ERANGE. */
+ Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno is set
+ to ERANGE. */
extern long long strtoll (const char *string, char **endptr, int base);
# endif
#elif defined GNULIB_POSIXCHECK
@@ -278,6 +278,27 @@ extern long long strtoll (const char *string, char **endptr, int base);
#endif
+#if @GNULIB_STRTOULL@
+# if !@HAVE_STRTOULL@
+/* Parse an unsigned integer whose textual representation starts at STRING.
+ The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0,
+ it may be decimal or octal (with prefix "0") or hexadecimal (with prefix
+ "0x").
+ If ENDPTR is not NULL, the address of the first byte after the integer is
+ stored in *ENDPTR.
+ Upon overflow, the return value is ULLONG_MAX, and errno is set to
+ ERANGE. */
+extern unsigned long long strtoull (const char *string, char **endptr, int base);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strtoull
+# define strtoull(s,e,b) \
+ (GL_LINK_WARNING ("strtoull is unportable - " \
+ "use gnulib module strtoull for portability"), \
+ strtoull (s, e, b))
+#endif
+
+
#ifdef __cplusplus
}
#endif