Bug 1423846 - Remove configure script checks for iconv and mbrtowc/tcrtomb. r=glandium
authorHenri Sivonen <hsivonen@hsivonen.fi>
Thu, 07 Dec 2017 14:06:53 +0200
changeset 395642 52e5558067afa895711f66816b9a8baa736d8504
parent 395641 5a1a53d1fd0282be82ae1355896213a0a093e216
child 395643 6d82ed0ba805616a31504a038190c042a9696c32
push id56770
push userhsivonen@mozilla.com
push dateFri, 08 Dec 2017 07:35:21 +0000
treeherderautoland@52e5558067af [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1423846
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1423846 - Remove configure script checks for iconv and mbrtowc/tcrtomb. r=glandium MozReview-Commit-ID: LCQ0yoSsvi1
old-configure.in
xpcom/xpcom-private.h.in
--- a/old-configure.in
+++ b/old-configure.in
@@ -1502,42 +1502,16 @@ AC_CACHE_CHECK(for pthread_cond_timedwai
                AC_TRY_LINK([#include <pthread.h>],
                            [pthread_cond_timedwait_monotonic_np(0, 0, 0);],
                            ac_cv_pthread_cond_timewait_monotonic_np=yes,
                            ac_cv_pthread_cond_timewait_monotonic_np=no))
 if test "$ac_cv_pthread_cond_timewait_monotonic_np" != "no"; then
     AC_DEFINE(HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC)
 fi
 
-dnl check for wcrtomb/mbrtowc
-dnl =======================================================================
-if test -z "$MACOS_DEPLOYMENT_TARGET" || test "$MACOS_DEPLOYMENT_TARGET" -ge "100300"; then
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-AC_CACHE_CHECK(for wcrtomb,
-    ac_cv_have_wcrtomb,
-    [AC_TRY_LINK([#include <wchar.h>],
-                 [mbstate_t ps={0};wcrtomb(0,'f',&ps);],
-                 ac_cv_have_wcrtomb="yes",
-                 ac_cv_have_wcrtomb="no")])
-if test "$ac_cv_have_wcrtomb" = "yes"; then
-    AC_DEFINE(HAVE_WCRTOMB)
-fi
-AC_CACHE_CHECK(for mbrtowc,
-    ac_cv_have_mbrtowc,
-    [AC_TRY_LINK([#include <wchar.h>],
-                 [mbstate_t ps={0};mbrtowc(0,0,0,&ps);],
-                 ac_cv_have_mbrtowc="yes",
-                 ac_cv_have_mbrtowc="no")])
-if test "$ac_cv_have_mbrtowc" = "yes"; then
-    AC_DEFINE(HAVE_MBRTOWC)
-fi
-AC_LANG_RESTORE
-fi
-
 AC_CACHE_CHECK(
     [for res_ninit()],
     ac_cv_func_res_ninit,
     [if test "$OS_TARGET" = NetBSD -o "$OS_TARGET" = OpenBSD; then
         dnl no need for res_ninit() on NetBSD and OpenBSD
         ac_cv_func_res_ninit=no
      else
         AC_TRY_LINK([
@@ -1558,79 +1532,16 @@ AC_CACHE_CHECK(
 if test "$ac_cv_func_res_ninit" = "yes"; then
     AC_DEFINE(HAVE_RES_NINIT)
 dnl must add the link line we do something as foolish as this... dougt
 dnl else
 dnl    AC_CHECK_LIB(bind, res_ninit, AC_DEFINE(HAVE_RES_NINIT),
 dnl        AC_CHECK_LIB(resolv, res_ninit, AC_DEFINE(HAVE_RES_NINIT)))
 fi
 
-AC_LANG_CPLUSPLUS
-
-ICONV_LIBS=
-
-case $target_os in
-    darwin*|mingw*)
-        ;;
-    *)
-
-AC_CHECK_LIB(c, iconv, [ICONV_LIBS=],
-    AC_CHECK_LIB(iconv, iconv, [ICONV_LIBS="-liconv"],
-        AC_CHECK_LIB(iconv, libiconv, [ICONV_LIBS="-liconv"])))
-_SAVE_LIBS=$LIBS
-LIBS="$LIBS $ICONV_LIBS"
-AC_CACHE_CHECK(
-    [for iconv()],
-    ac_cv_func_iconv,
-    [AC_TRY_LINK([
-        #include <stdlib.h>
-        #include <iconv.h>
-        ],
-        [
-            iconv_t h = iconv_open("", "");
-            iconv(h, NULL, NULL, NULL, NULL);
-            iconv_close(h);
-        ],
-        [ac_cv_func_iconv=yes],
-        [ac_cv_func_iconv=no]
-        )]
-    )
-if test "$ac_cv_func_iconv" = "yes"; then
-    AC_DEFINE(HAVE_ICONV)
-    LIBICONV="$ICONV_LIBS"
-    AC_CACHE_CHECK(
-        [for iconv() with const input],
-        ac_cv_func_const_iconv,
-        [AC_TRY_COMPILE([
-            #include <stdlib.h>
-            #include <iconv.h>
-            ],
-            [
-                const char *input = "testing";
-                iconv_t h = iconv_open("", "");
-                iconv(h, &input, NULL, NULL, NULL);
-                iconv_close(h);
-            ],
-            [ac_cv_func_const_iconv=yes],
-            [ac_cv_func_const_iconv=no]
-            )]
-        )
-    if test "$ac_cv_func_const_iconv" = "yes"; then
-        AC_DEFINE(HAVE_ICONV_WITH_CONST_INPUT)
-    fi
-fi
-LIBS=$_SAVE_LIBS
-
-    ;;
-esac
-
-AC_SUBST_LIST(ICONV_LIBS)
-
-AM_LANGINFO_CODESET
-
 AC_LANG_C
 
 dnl **********************
 dnl *** va_copy checks ***
 AC_CACHE_CHECK([for an implementation of va_copy()],
                ac_cv_va_copy,
     [AC_TRY_COMPILE([#include <stdarg.h>
                      #include <stdlib.h>
@@ -4462,17 +4373,16 @@ AC_SUBST(RCFLAGS)
 AC_SUBST(WINDRES)
 AC_SUBST(IMPLIB)
 AC_SUBST(FILTER)
 AC_SUBST(MOZ_AUTH_EXTENSION)
 AC_SUBST(MOZ_PREF_EXTENSIONS)
 AC_SUBST_LIST(MOZ_DEBUG_LDFLAGS)
 AC_SUBST(WARNINGS_AS_ERRORS)
 AC_SUBST_SET(MOZ_EXTENSIONS)
-AC_SUBST(LIBICONV)
 AC_SUBST(MOZ_TOOLKIT_SEARCH)
 AC_SUBST(MOZ_FEEDS)
 
 AC_SUBST(MOZ_UNIVERSALCHARDET)
 AC_SUBST(ACCESSIBILITY)
 AC_SUBST(MOZ_SPELLCHECK)
 AC_SUBST(MOZ_ANDROID_ANR_REPORTER)
 AC_SUBST(MOZ_CRASHREPORTER)
@@ -4942,20 +4852,16 @@ AC_SUBST(MOZILLA_VERSION)
 dnl Spit out some output
 dnl ========================================================
 
 dnl The following defines are used by xpcom
 _NON_GLOBAL_ACDEFINES="$_NON_GLOBAL_ACDEFINES
 CPP_THROW_NEW
 HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR
 HAVE_GETPAGESIZE
-HAVE_ICONV
-HAVE_ICONV_WITH_CONST_INPUT
-HAVE_MBRTOWC
-HAVE_WCRTOMB
 HAVE_STATVFS64
 HAVE_STATVFS
 HAVE_STATFS64
 HAVE_STATFS
 HAVE_SYS_STATVFS_H
 HAVE_SYS_STATFS_H
 HAVE_SYS_VFS_H
 HAVE_SYS_MOUNT_H
--- a/xpcom/xpcom-private.h.in
+++ b/xpcom/xpcom-private.h.in
@@ -5,28 +5,16 @@
 /* The following defines are only used by the xpcom implementation */
 
 #ifndef _XPCOM_PRIVATE_H_
 #define _XPCOM_PRIVATE_H_
 
 /* Define if getpagesize() is available */
 #undef HAVE_GETPAGESIZE
 
-/* Define if iconv() is available */
-#undef HAVE_ICONV
-
-/* Define if iconv() supports const input */
-#undef HAVE_ICONV_WITH_CONST_INPUT
-
-/* Define if mbrtowc() is available */
-#undef HAVE_MBRTOWC
-
-/* Define if wcrtomb() is available */
-#undef HAVE_WCRTOMB
-
 /* Define if statvfs64() is available */
 #undef HAVE_STATVFS64
 
 /* Define if statvfs() is available */
 #undef HAVE_STATVFS
 
 /* Define if statfs64() is available */
 #undef HAVE_STATFS64