You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@apache.org on 2009/12/17 00:53:17 UTC

svn commit: r891488 - in /apr/apr/trunk: build/aprenv.py build/apu-iconv.m4 configure.in include/apu.h.in include/apu.hnw include/apu.hw test/testxlate.c xlate/xlate.c

Author: wrowe
Date: Wed Dec 16 23:53:16 2009
New Revision: 891488

URL: http://svn.apache.org/viewvc?rev=891488&view=rev
Log:
remove apr-iconv references; it was built upon apr so cannot exist before apr

Modified:
    apr/apr/trunk/build/aprenv.py
    apr/apr/trunk/build/apu-iconv.m4
    apr/apr/trunk/configure.in
    apr/apr/trunk/include/apu.h.in
    apr/apr/trunk/include/apu.hnw
    apr/apr/trunk/include/apu.hw
    apr/apr/trunk/test/testxlate.c
    apr/apr/trunk/xlate/xlate.c

Modified: apr/apr/trunk/build/aprenv.py
URL: http://svn.apache.org/viewvc/apr/apr/trunk/build/aprenv.py?rev=891488&r1=891487&r2=891488&view=diff
==============================================================================
--- apr/apr/trunk/build/aprenv.py (original)
+++ apr/apr/trunk/build/aprenv.py Wed Dec 16 23:53:16 2009
@@ -681,7 +681,6 @@
     subst['@apu_have_openssl@'] = 0
     subst['@apu_have_nss@'] = 0
 
-    subst['@have_apr_iconv@'] = 0
     subst['@have_iconv@'] = 0
     
     # ldap stuff, remove soon.

Modified: apr/apr/trunk/build/apu-iconv.m4
URL: http://svn.apache.org/viewvc/apr/apr/trunk/build/apu-iconv.m4?rev=891488&r1=891487&r2=891488&view=diff
==============================================================================
--- apr/apr/trunk/build/apu-iconv.m4 (original)
+++ apr/apr/trunk/build/apu-iconv.m4 Wed Dec 16 23:53:16 2009
@@ -34,23 +34,14 @@
 AC_DEFUN([APU_FIND_ICONV], [
 
 apu_iconv_dir="unknown"
-have_apr_iconv="0"
 want_iconv="1"
 AC_ARG_WITH(iconv,[  --with-iconv[=DIR]        path to iconv installation],
   [ apu_iconv_dir="$withval"
     if test "$apu_iconv_dir" = "no"; then
-      have_apr_iconv="0"
       have_iconv="0"
       want_iconv="0"
     elif test "$apu_iconv_dir" != "yes"; then
-      if test -f "$apu_iconv_dir/include/apr-1/api_version.h"; then
-        have_apr_iconv="1"
-        have_iconv="0"
-        APR_ADDTO(INCLUDES,[-I$apu_iconv_dir/include/apr-1])
-        APR_ADDTO(LIBS,[$apu_iconv_dir/lib/libapriconv-1.la])
-        AC_MSG_RESULT(using apr-iconv)
-      elif test -f "$apu_iconv_dir/include/iconv.h"; then
-        have_apr_iconv="0"
+      if test -f "$apu_iconv_dir/include/iconv.h"; then
         have_iconv="1"
         APR_ADDTO(CPPFLAGS,[-I$apu_iconv_dir/include])
         APR_ADDTO(LDFLAGS,[-L$apu_iconv_dir/lib])
@@ -58,7 +49,7 @@
     fi
   ])
 
-if test "$want_iconv" = "1" -a "$have_apr_iconv" != "1"; then
+if test "$want_iconv" = "1"; then
   AC_CHECK_HEADER(iconv.h, [
     APU_TRY_ICONV([ have_iconv="1" ], [
 
@@ -78,9 +69,7 @@
 
 if test "$want_iconv" = "1" -a "$apu_iconv_dir" != "unknown"; then
   if test "$have_iconv" != "1"; then
-    if test "$have_apr_iconv" != "1"; then 
-      AC_MSG_ERROR([iconv support requested, but not found])
-    fi
+    AC_MSG_ERROR([iconv support requested, but not found])
   fi
   APR_REMOVEFROM(CPPFLAGS,[-I$apu_iconv_dir/include])
   APR_ADDTO(INCLUDES,[-I$apu_iconv_dir/include])
@@ -96,7 +85,6 @@
 APR_CHECK_DEFINE(CODESET, langinfo.h, [CODESET defined in langinfo.h])
 
 AC_SUBST(have_iconv)
-AC_SUBST(have_apr_iconv)
 ])dnl
 
 dnl

Modified: apr/apr/trunk/configure.in
URL: http://svn.apache.org/viewvc/apr/apr/trunk/configure.in?rev=891488&r1=891487&r2=891488&view=diff
==============================================================================
--- apr/apr/trunk/configure.in (original)
+++ apr/apr/trunk/configure.in Wed Dec 16 23:53:16 2009
@@ -27,7 +27,6 @@
 sinclude(build/lt~obsolete.m4)
 
 sinclude(build/apu-conf.m4)
-sinclude(build/apu-iconv.m4)
 sinclude(build/apu-hints.m4)
 sinclude(build/crypto.m4)
 sinclude(build/dbm.m4)
@@ -2483,45 +2482,15 @@
 
 APU_PRELOAD
 
-dnl
-dnl  Find the APR-ICONV directory.
-dnl
-AC_ARG_WITH(apr-iconv,
-            [  --with-apr-iconv=DIR    relative path to apr-iconv source],
-  [ apu_apriconv_dir="$withval"
-    if test "$apu_apriconv_dir" != "no"; then
-      if test -d "$apu_apriconv_dir"; then
-        APR_SUBDIR_CONFIG("$apu_apriconv_dir",
-                          [$apache_apr_flags \
-                             --prefix=$prefix \
-                             --exec-prefix=$exec_prefix \
-                             --libdir=$libdir \
-                             --includedir=$includedir \
-                             --bindir=$bindir \
-                             --datadir=$datadir \
-                             --with-installbuilddir=$installbuilddir],
-                          [--enable-layout=*|\'--enable-layout=*])
-        APRUTIL_EXPORT_LIBS="$abs_srcdir/$apu_apriconv_dir/lib/libapriconv.la \
-                             $APRUTIL_EXPORT_LIBS"
-        APR_ADDTO(INCLUDES, [-I$abs_srcdir/$apu_apriconv_dir/include])
-        APR_ICONV_DIR="$apu_apriconv_dir"
-      else
-       APR_ICONV_DIR=""
-      fi
-    else
-      APR_ICONV_DIR=""
-    fi
-  ])
-AC_SUBST(APR_ICONV_DIR)
-
-dnl Find LDAP library
-dnl Determine what DBM backend type to use.
-dnl Find Expat
-dnl Find an iconv library
+dnl Find crpyto libraries
 APU_CHECK_CRYPTO
 APU_CHECK_CRYPTO_OPENSSL
 APU_CHECK_CRYPTO_NSS
+
+dnl Find LDAP library
 APU_FIND_LDAP
+
+dnl Find DBM and DBD backends to use.
 APU_CHECK_DBM
 APU_CHECK_DBD
 APU_CHECK_DBD_MYSQL
@@ -2530,7 +2499,11 @@
 APU_CHECK_DBD_ORACLE
 APU_CHECK_DBD_FREETDS
 APU_CHECK_DBD_ODBC
+
+dnl Find Expat
 APU_FIND_EXPAT
+
+dnl Find iconv implementations
 APU_FIND_ICONV
 
 dnl Enable DSO build; must be last:

Modified: apr/apr/trunk/include/apu.h.in
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/apu.h.in?rev=891488&r1=891487&r2=891488&view=diff
==============================================================================
--- apr/apr/trunk/include/apu.h.in (original)
+++ apr/apr/trunk/include/apu.h.in Wed Dec 16 23:53:16 2009
@@ -106,7 +106,6 @@
 #define APU_HAVE_OPENSSL       @apu_have_openssl@
 #define APU_HAVE_NSS           @apu_have_nss@
 
-#define APU_HAVE_APR_ICONV     @have_apr_iconv@
 #define APU_HAVE_ICONV         @have_iconv@
 #define APR_HAS_XLATE          (APU_HAVE_APR_ICONV || APU_HAVE_ICONV)
 

Modified: apr/apr/trunk/include/apu.hnw
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/apu.hnw?rev=891488&r1=891487&r2=891488&view=diff
==============================================================================
--- apr/apr/trunk/include/apu.hnw (original)
+++ apr/apr/trunk/include/apu.hnw Wed Dec 16 23:53:16 2009
@@ -115,9 +115,8 @@
 #define APU_HAVE_NSS            0
 #endif
 
-#define APU_HAVE_APR_ICONV      0
 #define APU_HAVE_ICONV          1
-#define APR_HAS_XLATE           (APU_HAVE_APR_ICONV || APU_HAVE_ICONV)
+#define APR_HAS_XLATE           (APU_HAVE_ICONV)
 
 #endif /* APU_H */
 #endif /* NETWARE */

Modified: apr/apr/trunk/include/apu.hw
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/apu.hw?rev=891488&r1=891487&r2=891488&view=diff
==============================================================================
--- apr/apr/trunk/include/apu.hw (original)
+++ apr/apr/trunk/include/apu.hw Wed Dec 16 23:53:16 2009
@@ -132,9 +132,8 @@
 #define APU_HAVE_NSS            0
 #endif
 
-#define APU_HAVE_APR_ICONV      1
 #define APU_HAVE_ICONV          0
-#define APR_HAS_XLATE           (APU_HAVE_APR_ICONV || APU_HAVE_ICONV)
+#define APR_HAS_XLATE           (APU_HAVE_ICONV)
 
 #endif /* APU_H */
 /** @} */

Modified: apr/apr/trunk/test/testxlate.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testxlate.c?rev=891488&r1=891487&r2=891488&view=diff
==============================================================================
--- apr/apr/trunk/test/testxlate.c (original)
+++ apr/apr/trunk/test/testxlate.c Wed Dec 16 23:53:16 2009
@@ -71,13 +71,6 @@
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 }
 
-#if APU_HAVE_APR_ICONV
-/* it is a bug if iconv_open() fails */
-static int is_transform_supported(abts_case *tc, const char *cs1,
-                                  const char *cs2, apr_pool_t *pool) {
-    return 1;
-}
-#else
 /* some iconv implementations don't support all tested transforms;
  * example: 8859-1 <-> 8859-2 using native Solaris iconv
  */
@@ -96,7 +89,6 @@
 
     return 1;
 }
-#endif
 
 static void test_transformation(abts_case *tc, void *data)
 {

Modified: apr/apr/trunk/xlate/xlate.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/xlate/xlate.c?rev=891488&r1=891487&r2=891488&view=diff
==============================================================================
--- apr/apr/trunk/xlate/xlate.c (original)
+++ apr/apr/trunk/xlate/xlate.c Wed Dec 16 23:53:16 2009
@@ -39,11 +39,8 @@
 #ifdef HAVE_ICONV_H
 #include <iconv.h>
 #endif
-#if APU_HAVE_APR_ICONV
-#include <apr_iconv.h>
-#endif
 
-#if defined(APU_ICONV_INBUF_CONST) || APU_HAVE_APR_ICONV
+#if defined(APU_ICONV_INBUF_CONST)
 #define ICONV_INBUF_TYPE const char **
 #else
 #define ICONV_INBUF_TYPE char **
@@ -60,8 +57,6 @@
     char *sbcs_table;
 #if APU_HAVE_ICONV
     iconv_t ich;
-#elif APU_HAVE_APR_ICONV
-    apr_iconv_t ich;
 #endif
 };
 
@@ -83,12 +78,7 @@
 {
     apr_xlate_t *old = convset;
 
-#if APU_HAVE_APR_ICONV
-    if (old->ich != (apr_iconv_t)-1) {
-        return apr_iconv_close(old->ich, old->pool);
-    }
-
-#elif APU_HAVE_ICONV
+#if APU_HAVE_ICONV
     if (old->ich != (iconv_t)-1) {
         if (iconv_close(old->ich)) {
             int rv = errno;
@@ -288,54 +278,7 @@
 {
     apr_status_t status = APR_SUCCESS;
 
-#if APU_HAVE_APR_ICONV
-    if (convset->ich != (apr_iconv_t)-1) {
-        const char *inbufptr = inbuf;
-        apr_size_t translated;
-        char *outbufptr = outbuf;
-        status = apr_iconv(convset->ich, &inbufptr, inbytes_left,
-                           &outbufptr, outbytes_left, &translated);
-
-        /* If everything went fine but we ran out of buffer, don't
-         * report it as an error.  Caller needs to look at the two
-         * bytes-left values anyway.
-         *
-         * There are three expected cases where rc is -1.  In each of
-         * these cases, *inbytes_left != 0.
-         * a) the non-error condition where we ran out of output
-         *    buffer
-         * b) the non-error condition where we ran out of input (i.e.,
-         *    the last input character is incomplete)
-         * c) the error condition where the input is invalid
-         */
-        switch (status) {
-
-            case APR_BADARG:  /* out of space on output */
-                status = 0; /* change table lookup code below if you
-                               make this an error */
-                break;
-
-            case APR_EINVAL: /* input character not complete (yet) */
-                status = APR_INCOMPLETE;
-                break;
-
-            case APR_BADCH: /* bad input byte */
-                status = APR_EINVAL;
-                break;
-
-             /* Sometimes, iconv is not good about setting errno. */
-            case 0:
-                if (inbytes_left && *inbytes_left)
-                    status = APR_INCOMPLETE;
-                break;
-
-            default:
-                break;
-        }
-    }
-    else
-
-#elif APU_HAVE_ICONV
+#if APU_HAVE_ICONV
     if (convset->ich != (iconv_t)-1) {
         const char *inbufptr = inbuf;
         char *outbufptr = outbuf;



Re: svn commit: r891488 - in /apr/apr/trunk: build/aprenv.py build/apu-iconv.m4 configure.in include/apu.h.in include/apu.hnw include/apu.hw test/testxlate.c xlate/xlate.c

Posted by Ruediger Pluem <rp...@apache.org>.
On 17.12.2009 18:46, William A. Rowe Jr. wrote:
> Ruediger Pluem wrote:
>> On 17.12.2009 00:53, wrowe@apache.org wrote:
>>> Author: wrowe
>>> Date: Wed Dec 16 23:53:16 2009
>>> New Revision: 891488
> 
>> Please fix or revert.
> 
> Will do.  I presume you replaced with the immediate-prior rev of apu_config.h
> before your test?
> 
> 

yes.


Regards

Rüdiger

Re: svn commit: r891488 - in /apr/apr/trunk: build/aprenv.py build/apu-iconv.m4 configure.in include/apu.h.in include/apu.hnw include/apu.hw test/testxlate.c xlate/xlate.c

Posted by "William A. Rowe Jr." <wr...@rowe-clan.net>.
Ruediger Pluem wrote:
> On 17.12.2009 00:53, wrowe@apache.org wrote:
>> Author: wrowe
>> Date: Wed Dec 16 23:53:16 2009
>> New Revision: 891488

> Please fix or revert.

Will do.  I presume you replaced with the immediate-prior rev of apu_config.h
before your test?

Re: svn commit: r891488 - in /apr/apr/trunk: build/aprenv.py build/apu-iconv.m4 configure.in include/apu.h.in include/apu.hnw include/apu.hw test/testxlate.c xlate/xlate.c

Posted by Ruediger Pluem <rp...@apache.org>.
On 17.12.2009 00:53, wrowe@apache.org wrote:
> Author: wrowe
> Date: Wed Dec 16 23:53:16 2009
> New Revision: 891488
> 
> URL: http://svn.apache.org/viewvc?rev=891488&view=rev
> Log:
> remove apr-iconv references; it was built upon apr so cannot exist before apr
> 
> Modified:
>     apr/apr/trunk/build/aprenv.py
>     apr/apr/trunk/build/apu-iconv.m4
>     apr/apr/trunk/configure.in
>     apr/apr/trunk/include/apu.h.in
>     apr/apr/trunk/include/apu.hnw
>     apr/apr/trunk/include/apu.hw
>     apr/apr/trunk/test/testxlate.c
>     apr/apr/trunk/xlate/xlate.c
> 

This breaks compilation of trunk.

In file included from crypto/apr_md4.c:42:
./include/apr_md4.h:74:5: error: token "@" is not valid in preprocessor expressions
./include/apr_md4.h:86:5: error: token "@" is not valid in preprocessor expressions
crypto/apr_md4.c:123:5: error: token "@" is not valid in preprocessor expressions
crypto/apr_md4.c:130:5: error: token "@" is not valid in preprocessor expressions
crypto/apr_md4.c:164:5: error: token "@" is not valid in preprocessor expressions
crypto/apr_md4.c:180:6: error: token "@" is not valid in preprocessor expressions
crypto/apr_md4.c: In function ‘apr_md4_update’:
crypto/apr_md4.c:197: error: ‘apr_md4_ctx_t’ has no member named ‘xlate’
crypto/apr_md4.c:198: error: ‘inbytes_left’ undeclared (first use in this function)
crypto/apr_md4.c:198: error: (Each undeclared identifier is reported only once
crypto/apr_md4.c:198: error: for each function it appears in.)
crypto/apr_md4.c:198: error: ‘outbytes_left’ undeclared (first use in this function)
crypto/apr_md4.c:199: error: ‘apr_md4_ctx_t’ has no member named ‘xlate’
crypto/apr_md4.c:210: error: ‘apr_md4_ctx_t’ has no member named ‘xlate’
crypto/apr_md4.c:213: error: ‘apr_md4_ctx_t’ has no member named ‘xlate’
crypto/apr_md4.c:229: error: ‘apr_md4_ctx_t’ has no member named ‘xlate’
crypto/apr_md4.c:231: error: ‘apr_md4_ctx_t’ has no member named ‘xlate’
crypto/apr_md4.c:255:5: error: token "@" is not valid in preprocessor expressions
make[3]: *** [crypto/apr_md4.lo] Fehler 1
make[3]: *** Warte auf noch nicht beendete Prozesse...
make[2]: *** [all-recursive] Fehler 1
make[1]: *** [all-recursive] Fehler 1
make: *** [all-recursive] Fehler 1


Please fix or revert.


Regards

Rüdiger