summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2002-08-03 19:31:36 +0000
committerwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2002-08-03 19:31:36 +0000
commitddb9696132cf0e42e1a77dc416149ce590cdb9e1 (patch)
tree7f2152a42873e281428007e36a7494e19045b08c
parent973aba6127f4310a2a04bfc9989cd1025177f54b (diff)
downloadlibapr-ddb9696132cf0e42e1a77dc416149ce590cdb9e1.tar.gz
Step one, rename from the meaningless 'll' to 'i64'.
I have nothing against spelling out apr_atoint64 but I think that's probably excessive. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63780 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--CHANGES5
-rw-r--r--include/apr_strings.h6
-rw-r--r--strings/apr_strings.c8
3 files changed, 12 insertions, 7 deletions
diff --git a/CHANGES b/CHANGES
index 787730454..78cbbbbe2 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,10 @@
Changes with APR b1
+ *) Renamed apr_strtoll()/apr_atoll() to follow int64 convention,
+ so these new helpers are apr_strtoi64/apr_atoi64(), since
+ 'll' (long long) is a nonportable and aspecific construct.
+ [William Rowe]
+
*) don't perform a strlen on that name value without checking for NULL
first (in getopt)
[David Waite <mass@akuma.org>, Ian Holsman]
diff --git a/include/apr_strings.h b/include/apr_strings.h
index 58c61bda4..d9406f683 100644
--- a/include/apr_strings.h
+++ b/include/apr_strings.h
@@ -340,15 +340,15 @@ APR_DECLARE(char *) apr_off_t_toa(apr_pool_t *p, apr_off_t n);
* base 16.
* @return The numeric value of the string.
*/
-APR_DECLARE(apr_int64_t) apr_strtoll(const char *buf, char **end, int base);
+APR_DECLARE(apr_int64_t) apr_strtoi64(const char *buf, char **end, int base);
/**
* parse a base-10 numeric string into a 64-bit numeric value.
- * Equivalent to apr_strtoll(buf, (char**)NULL, 10).
+ * Equivalent to apr_strtoi64(buf, (char**)NULL, 10).
* @param buf The string to parse
* @return The numeric value of the string
*/
-APR_DECLARE(apr_int64_t) apr_atoll(const char *buf);
+APR_DECLARE(apr_int64_t) apr_atoi64(const char *buf);
/**
* Format a binary size (magnitiudes are 2^10 rather than 10^3) from an apr_off_t,
diff --git a/strings/apr_strings.c b/strings/apr_strings.c
index dddf694b1..e58c88dc3 100644
--- a/strings/apr_strings.c
+++ b/strings/apr_strings.c
@@ -233,19 +233,19 @@ void *memchr(const void *s, int c, size_t n)
}
#endif
-APR_DECLARE(apr_int64_t) apr_strtoll(const char *buf, char **end, int base)
+APR_DECLARE(apr_int64_t) apr_strtoi64(const char *buf, char **end, int base)
{
#if (APR_HAVE_STRTOLL)
return (apr_int64_t)strtoll(buf, end, base);
#else
- /* best-effort function. If no strtoll, use strtol */
+ /* XXX This Is Absolutely Bogus */
return (apr_int64_t)strtol(buf, end, base);
#endif
}
-APR_DECLARE(apr_int64_t) apr_atoll(const char *buf)
+APR_DECLARE(apr_int64_t) apr_atoi64(const char *buf)
{
- return apr_strtoll(buf, NULL, 0);
+ return apr_strtoi64(buf, NULL, 0);
}
APR_DECLARE(char *) apr_itoa(apr_pool_t *p, int n)