You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by jo...@apache.org on 2004/06/05 01:22:00 UTC
cvs commit: apr/strings apr_strings.c
jorton 2004/06/04 16:22:00
Modified: . configure.in
include apr.h.in apr.hnw apr.hw
include/arch/netware apr_private.h
include/arch/win32 apr_private.h
strings apr_strings.c
Log:
Move APR_INT64_STRFN to apr_private.h and remove redundant
APR_HAVE_INT64_STRFN macro.
* configure.in: Define APR_HAVE_INT64 macro.
* include/apr.h.in, include/apr.hw, include/apr.hnw: Remove
APR_INT64_STRFN, APR_HAVE_INT64_STRFN macros.
* include/arch/win32/apr_private.h,
include/arch/netware/apr_private.h: Define APR_INT64_STRFN (and
correctly for Win32, fix from André).
* strings/apr_strings.c (apr_strtoi64): Just use APR_INT64_STRFN.
Revision Changes Path
1.584 +8 -4 apr/configure.in
Index: configure.in
===================================================================
RCS file: /home/cvs/apr/configure.in,v
retrieving revision 1.583
retrieving revision 1.584
diff -d -w -u -r1.583 -r1.584
--- configure.in 4 Jun 2004 15:23:34 -0000 1.583
+++ configure.in 4 Jun 2004 23:21:59 -0000 1.584
@@ -1336,12 +1336,17 @@
AC_CHECK_FUNCS(strdup, have_strdup="1", have_strdup="0")
AC_CHECK_FUNCS(strstr, have_strstr="1", have_strstr="0")
AC_CHECK_FUNCS(memchr, have_memchr="1", have_memchr="0")
-AC_CHECK_FUNCS($int64_strfn, have_int64_strfn="1", have_int64_strfn="0")
+AC_CHECK_FUNC($int64_strfn, have_int64_strfn="1", have_int64_strfn="0")
dnl ----------------------------- We have a fallback position
if test "$have_int64_strfn" = "0" && test "$int64_strfn" = "strtoll"; then
int64_strfn="strtoq"
- AC_CHECK_FUNCS($int64_strfn, have_int64_strfn="1", have_int64_strfn="0")
+ AC_CHECK_FUNC(strtoq, [have_int64_strfn=1], [have_int64_strfn=0])
+fi
+
+if test "$have_int64_strfn" = "1"; then
+ AC_DEFINE_UNQUOTED(APR_INT64_STRFN, [$int64_strfn],
+ [Define as function which can be used for conversion of strings to apr_int64_t])
fi
AC_SUBST(have_strnicmp)
@@ -1351,8 +1356,7 @@
AC_SUBST(have_strdup)
AC_SUBST(have_strstr)
AC_SUBST(have_memchr)
-AC_SUBST(have_int64_strfn)
-AC_SUBST(int64_strfn)
+
if test "$off_t_strfn" = "apr_strtoi64" && test "$have_int64_strfn" = "1"; then
off_t_strfn=$int64_strfn
fi
1.136 +0 -4 apr/include/apr.h.in
Index: apr.h.in
===================================================================
RCS file: /home/cvs/apr/include/apr.h.in,v
retrieving revision 1.135
retrieving revision 1.136
diff -d -w -u -r1.135 -r1.136
--- apr.h.in 27 Mar 2004 13:11:17 -0000 1.135
+++ apr.h.in 4 Jun 2004 23:21:59 -0000 1.136
@@ -356,10 +356,6 @@
/* And APR_UINT64_T_HEX_FMT */
@uint64_t_hex_fmt@
-/* Deal with atoi64 variables ... these should move to apr_private.h */
-#define APR_HAVE_INT64_STRFN @have_int64_strfn@
-#define APR_INT64_STRFN @int64_strfn@
-
/* Does the proc mutex lock threads too */
#define APR_PROC_MUTEX_IS_GLOBAL @proc_mutex_is_global@
1.46 +0 -4 apr/include/apr.hnw
Index: apr.hnw
===================================================================
RCS file: /home/cvs/apr/include/apr.hnw,v
retrieving revision 1.45
retrieving revision 1.46
diff -d -w -u -r1.45 -r1.46
--- apr.hnw 16 Mar 2004 19:49:17 -0000 1.45
+++ apr.hnw 4 Jun 2004 23:22:00 -0000 1.46
@@ -330,10 +330,6 @@
#define APR_UINT64_T_HEX_FMT "llx"
#define APR_TIME_T_FMT APR_INT64_T_FMT
-/* Deal with atoi64 variables ... these should move to apr_private.h */
-#define APR_HAVE_INT64_STRFN 1
-#define APR_INT64_STRFN strtoll
-
/** @} */
#ifdef __cplusplus
1.124 +0 -10 apr/include/apr.hw
Index: apr.hw
===================================================================
RCS file: /home/cvs/apr/include/apr.hw,v
retrieving revision 1.123
retrieving revision 1.124
diff -d -w -u -r1.123 -r1.124
--- apr.hw 1 Mar 2004 15:55:54 -0000 1.123
+++ apr.hw 4 Jun 2004 23:22:00 -0000 1.124
@@ -464,16 +464,6 @@
#define APR_UINT64_T_FMT "I64u"
#define APR_UINT64_T_HEX_FMT "I64x"
-/* Deal with atoi64 variables ... these should move to apr_private.h */
-/* MSVC 7.0 introduced _strtoui64 */
-#if _MSC_VER >= 1300 && _INTEGRAL_MAX_BITS >= 64
-#define APR_HAVE_INT64_STRFN 1
-#define APR_INT64_STRFN _strtoui64
-#else
-#define APR_HAVE_INT64_STRFN 0
-#define APR_INT64_STRFN undef
-#endif
-
/* Local machine definition for console and log output. */
#define APR_EOL_STR "\r\n"
1.24 +3 -0 apr/include/arch/netware/apr_private.h
Index: apr_private.h
===================================================================
RCS file: /home/cvs/apr/include/arch/netware/apr_private.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -d -w -u -r1.23 -r1.24
--- apr_private.h 24 May 2004 09:33:26 -0000 1.23
+++ apr_private.h 4 Jun 2004 23:22:00 -0000 1.24
@@ -62,6 +62,9 @@
#define HAVE_SETENV 1
#define HAVE_UNSETENV 1
+/* 64-bit integer conversion function */
+#define APR_INT64_STRFN strtoll
+
/*#define DSO_USE_DLFCN */
#ifdef NW_BUILD_IPV6
1.37 +7 -1 apr/include/arch/win32/apr_private.h
Index: apr_private.h
===================================================================
RCS file: /home/cvs/apr/include/arch/win32/apr_private.h,v
retrieving revision 1.36
retrieving revision 1.37
diff -d -w -u -r1.36 -r1.37
--- apr_private.h 24 May 2004 09:33:26 -0000 1.36
+++ apr_private.h 4 Jun 2004 23:22:00 -0000 1.37
@@ -143,8 +143,14 @@
#define HAVE_GETNAMEINFO 1
#endif
+/* Deal with atoi64 variables ... these should move to apr_private.h */
+/* MSVC 7.0 introduced _strtoui64 */
+#if _MSC_VER >= 1300 && _INTEGRAL_MAX_BITS >= 64
+#define APR_INT64_STRFN _strtoi64
+#endif
+
#if APR_HAS_LARGE_FILES
-#if APR_HAVE_INT64_STRFN
+#ifdef APR_INT64_STRFN
#define APR_OFF_T_STRFN APR_INT64_STRFN
#else
#define APR_OFF_T_STRFN apr_strtoi64
1.46 +1 -1 apr/strings/apr_strings.c
Index: apr_strings.c
===================================================================
RCS file: /home/cvs/apr/strings/apr_strings.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -d -w -u -r1.45 -r1.46
--- apr_strings.c 24 May 2004 09:33:27 -0000 1.45
+++ apr_strings.c 4 Jun 2004 23:22:00 -0000 1.46
@@ -243,7 +243,7 @@
APR_DECLARE(apr_int64_t) apr_strtoi64(const char *nptr, char **endptr, int base)
{
-#if (APR_HAVE_INT64_STRFN)
+#ifdef APR_INT64_STRFN
return APR_INT64_STRFN(nptr, endptr, base);
#else
const char *s;