Remove native uconv. Bug 644801, r=smontagu
authorMasatoshi Kimura <VYV03354@nifty.ne.jp>
Tue, 05 Apr 2011 11:13:21 +0300
changeset 64673 7fc2d583504454bd0dfd7a35b6a07670aa55639e
parent 64672 6008b74c193fccd373dda83e973dbddac6f64d6a
child 64674 385684ad7eed256c1710d37e31da6c3e3a92837d
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmontagu
bugs644801
milestone2.2a1pre
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
Remove native uconv. Bug 644801, r=smontagu
browser/installer/package-manifest.in
config/autoconf.mk.in
configure.in
intl/uconv/Makefile.in
intl/uconv/directory.txt
intl/uconv/native/Makefile.in
intl/uconv/native/nsINativeUConvService.idl
intl/uconv/native/nsNativeUConvService.cpp
intl/uconv/native/nsNativeUConvService.h
intl/uconv/native/nsWinCEUConvService.cpp
intl/uconv/src/Makefile.in
intl/uconv/src/nsCharsetConverterManager.cpp
intl/uconv/src/nsCharsetConverterManager.h
intl/uconv/src/nsUConvModule.cpp
toolkit/toolkit-makefiles.sh
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -236,19 +236,16 @@
 @BINPATH@/components/spellchecker.xpt
 @BINPATH@/components/storage.xpt
 @BINPATH@/components/toolkitprofile.xpt
 #ifdef MOZ_ENABLE_XREMOTE
 @BINPATH@/components/toolkitremote.xpt
 #endif
 @BINPATH@/components/txtsvc.xpt
 @BINPATH@/components/txmgr.xpt
-#ifdef MOZ_USE_NATIVE_UCONV
-@BINPATH@/components/ucnative.xpt
-#endif
 @BINPATH@/components/uconv.xpt
 @BINPATH@/components/unicharutil.xpt
 @BINPATH@/components/update.xpt
 @BINPATH@/components/uriloader.xpt
 @BINPATH@/components/urlformatter.xpt
 @BINPATH@/components/webBrowser_core.xpt
 @BINPATH@/components/webbrowserpersist.xpt
 @BINPATH@/components/webshell_idls.xpt
--- a/config/autoconf.mk.in
+++ b/config/autoconf.mk.in
@@ -122,17 +122,16 @@ INCREMENTAL_LINKER = @INCREMENTAL_LINKER
 MACOSX_DEPLOYMENT_TARGET = @MACOSX_DEPLOYMENT_TARGET@
 MOZ_MAIL_NEWS	= @MOZ_MAIL_NEWS@
 BUILD_STATIC_LIBS = @BUILD_STATIC_LIBS@
 MOZ_ENABLE_LIBXUL = @MOZ_ENABLE_LIBXUL@
 ENABLE_TESTS	= @ENABLE_TESTS@
 IBMBIDI = @IBMBIDI@
 MOZ_UNIVERSALCHARDET = @MOZ_UNIVERSALCHARDET@
 ACCESSIBILITY = @ACCESSIBILITY@
-MOZ_USE_NATIVE_UCONV = @MOZ_USE_NATIVE_UCONV@
 MOZ_BRANDING_DIRECTORY = @MOZ_BRANDING_DIRECTORY@
 XPCOM_USE_LEA = @XPCOM_USE_LEA@
 MOZ_INSTALLER	= @MOZ_INSTALLER@
 MOZ_UPDATER	= @MOZ_UPDATER@
 MOZ_UPDATE_CHANNEL	= @MOZ_UPDATE_CHANNEL@
 MOZ_UPDATE_PACKAGING	= @MOZ_UPDATE_PACKAGING@
 MOZ_NO_ACTIVEX_SUPPORT = @MOZ_NO_ACTIVEX_SUPPORT@
 MOZ_ACTIVEX_SCRIPTING_SUPPORT = @MOZ_ACTIVEX_SCRIPTING_SUPPORT@
--- a/configure.in
+++ b/configure.in
@@ -4995,17 +4995,16 @@ MOZ_SPLASHSCREEN=
 MOZ_STORAGE=1
 MOZ_SVG=1
 MOZ_THUMB2=
 MOZ_TIMELINE=
 MOZ_TOOLKIT_SEARCH=1
 MOZ_UI_LOCALE=en-US
 MOZ_UNIVERSALCHARDET=1
 MOZ_URL_CLASSIFIER=
-MOZ_USE_NATIVE_UCONV=
 MOZ_XSLT_STANDALONE=
 MOZ_XTF=1
 MOZ_XUL=1
 MOZ_ZIPWRITER=1
 NS_PRINTING=1
 MOZ_PDF_PRINTING=
 MOZ_DISABLE_DOMCRYPTO=
 NSS_DISABLE_DBM=
@@ -5896,30 +5895,16 @@ MOZ_ARG_DISABLE_BOOL(printing,
 [  --disable-printing      Disable printing support],
     NS_PRINTING=,
     NS_PRINTING=1)
 
 if test "$NS_PRINTING"; then
     AC_DEFINE(NS_PRINTING)
     AC_DEFINE(NS_PRINT_PREVIEW)
 fi
-dnl ========================================================
-dnl use native unicode converters
-dnl ========================================================
-MOZ_ARG_ENABLE_BOOL(native-uconv,
-[  --enable-native-uconv   Enable iconv support],
-    MOZ_USE_NATIVE_UCONV=1,
-    MOZ_USE_NATIVE_UCONV= )
-if test "$MOZ_USE_NATIVE_UCONV"; then
-    AC_DEFINE(MOZ_USE_NATIVE_UCONV)
-fi
-if test "$OS_ARCH" != "WINCE" -a "$OS_ARCH" != "WINNT" -a "$MOZ_USE_NATIVE_UCONV" -a "$ac_cv_func_iconv" != "yes"; then
-    AC_MSG_ERROR([iconv() not found.  Cannot enable native uconv support.])
-fi
-
 
 dnl ========================================================
 dnl = Disable Fast Load
 dnl ========================================================
 MOZ_ARG_DISABLE_BOOL(xpcom-fastload,
 [  --disable-xpcom-fastload
                           Disable XPCOM fastload support],
     MOZ_NO_FAST_LOAD=1,
@@ -9051,17 +9036,16 @@ AC_SUBST(MOZ_EXTENSIONS)
 AC_SUBST(MOZ_JSDEBUGGER)
 AC_SUBST(MOZ_LOG_REFCNT)
 AC_SUBST(MOZ_LEAKY)
 AC_SUBST(MOZ_JPROF)
 AC_SUBST(MOZ_SHARK)
 AC_SUBST(MOZ_CALLGRIND)
 AC_SUBST(MOZ_VTUNE)
 AC_SUBST(MOZ_PROFILING)
-AC_SUBST(MOZ_USE_NATIVE_UCONV)
 AC_SUBST(MOZ_QUANTIFY)
 AC_SUBST(LIBICONV)
 AC_SUBST(MOZ_PLACES)
 AC_SUBST(MOZ_PLACES_BOOKMARKS)
 AC_SUBST(MOZ_STORAGE)
 AC_SUBST(MOZ_TOOLKIT_SEARCH)
 AC_SUBST(MOZ_FEEDS)
 AC_SUBST(NS_PRINTING)
--- a/intl/uconv/Makefile.in
+++ b/intl/uconv/Makefile.in
@@ -52,24 +52,16 @@ DEPTH		= ../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE		= uconv
 
-DIRS		= idl public util
-
-ifdef MOZ_USE_NATIVE_UCONV
-DIRS		+= native
-else
-DIRS		+= ucvja ucvcn ucvlatin ucvtw ucvtw2 ucvko ucvibm
-endif
-
-DIRS		+= src
+DIRS		= idl public util ucvja ucvcn ucvlatin ucvtw ucvtw2 ucvko ucvibm src
 
 ifdef ENABLE_TESTS
 TOOL_DIRS += tests
 endif
 
 include $(topsrcdir)/config/rules.mk
 
--- a/intl/uconv/directory.txt
+++ b/intl/uconv/directory.txt
@@ -1,13 +1,12 @@
 Directory Structure :
 ================================
 
 idl        - public .idl files
-native     - support for native platform charset conversion
 public     - public header file
 src        - source directory of charset converter manager and utilities, and
              charset converters for ISO-8859-1, CP1252, MacRoman and UTF-8
 tests      - tests program and application for charset converter 
 tests/unit - xpcshell tests
 tools      - tools to build the tables used by the converters
 util       - utility functions used by the converters
 
deleted file mode 100644
--- a/intl/uconv/native/Makefile.in
+++ /dev/null
@@ -1,64 +0,0 @@
-#
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Original Code is mozilla.org code.
-#
-# The Initial Developer of the Original Code is
-# Netscape Communications Corporation.
-# Portions created by the Initial Developer are Copyright (C) 1998
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either of the GNU General Public License Version 2 or later (the "GPL"),
-# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
-
-DEPTH		= ../../..
-topsrcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		= @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-MODULE		= ucnative
-
-LIBRARY_NAME	= ucnative_s
-FORCE_STATIC_LIB=1
-LIBXUL_LIBRARY = 1
-
-
-ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
-CPPSRCS		= nsWinCEUConvService.cpp
-else
-CPPSRCS		= nsNativeUConvService.cpp
-endif
-
-XPIDLSRCS	= \
-		nsINativeUConvService.idl \
-		$(NULL)
-
-LOCAL_INCLUDES = -I$(srcdir)/../util -I$(srcdir)/../src
-
-include $(topsrcdir)/config/rules.mk
deleted file mode 100644
--- a/intl/uconv/native/nsINativeUConvService.idl
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is a Native UCONV interface.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-
-#include "nsISupports.idl"
-
-/*
- * Returns an object that implements the following interfaces:
- *  
- *  nsIUnicodeDecoder 
- *  nsIUnicodeEncoder 
- */
-[uuid(c60097ba-c79d-461b-9116-80a66404c0b0)]
-interface nsINativeUConvService : nsISupports
-{
-  nsISupports getNativeConverter(in string from, in string to);
-};
deleted file mode 100644
--- a/intl/uconv/native/nsNativeUConvService.cpp
+++ /dev/null
@@ -1,393 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-
-#ifdef MOZ_USE_NATIVE_UCONV
-#include "nsString.h"
-#include "nsIGenericFactory.h"
-
-#include "nsINativeUConvService.h"
-
-#include "nsIUnicodeDecoder.h"
-#include "nsIUnicodeEncoder.h"
-
-#include "nsNativeUConvService.h"
-#include "nsAutoPtr.h"
-
-#include <nl_types.h> // CODESET
-#include <langinfo.h> // nl_langinfo
-#include <iconv.h>    // iconv_open, iconv, iconv_close
-#include <errno.h>
-
-
-class IConvAdaptor : public nsIUnicodeDecoder, 
-                     public nsIUnicodeEncoder 
-{
-public:
-    IConvAdaptor();
-    virtual ~IConvAdaptor();
-    
-    nsresult Init(const char* from, const char* to);
-    
-    NS_DECL_ISUPPORTS
-    
-    // Decoder methods:
-    
-    NS_IMETHOD Convert(const char * aSrc, 
-                       PRInt32 * aSrcLength, 
-                       PRUnichar * aDest, 
-                       PRInt32 * aDestLength);
-    
-    NS_IMETHOD GetMaxLength(const char * aSrc, 
-                            PRInt32 aSrcLength, 
-                            PRInt32 * aDestLength);
-    NS_IMETHOD Reset();
-
-    virtual void SetInputErrorBehavior(PRInt32 aBehavior);
-
-    virtual PRUnichar GetCharacterForUnMapped();
-    
-    // Encoder methods:
-    
-    NS_IMETHOD Convert(const PRUnichar * aSrc, 
-                       PRInt32 * aSrcLength, 
-                       char * aDest, 
-                       PRInt32 * aDestLength);
-    
-    
-    NS_IMETHOD Finish(char * aDest, PRInt32 * aDestLength);
-    
-    NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, 
-                            PRInt32 aSrcLength, 
-                            PRInt32 * aDestLength);
-    
-    // defined by the Decoder:  NS_IMETHOD Reset();
-    
-    NS_IMETHOD SetOutputErrorBehavior(PRInt32 aBehavior, 
-                                      nsIUnicharEncoder * aEncoder, 
-                                      PRUnichar aChar);
-    
-    
-private:
-    nsresult ConvertInternal(void * aSrc, 
-                             PRInt32 * aSrcLength, 
-                             PRInt32 aSrcCharSize,
-                             void * aDest, 
-                             PRInt32 * aDestLength,
-                             PRInt32 aDestCharSize);
-    
-    
-    iconv_t mConverter;
-    PRBool    mReplaceOnError;
-    PRUnichar mReplaceChar;
-
-#ifdef DEBUG
-    nsCString mFrom, mTo;
-#endif
-};
-
-NS_IMPL_ISUPPORTS2(IConvAdaptor, 
-                   nsIUnicodeEncoder, 
-                   nsIUnicodeDecoder)
-
-IConvAdaptor::IConvAdaptor()
-{
-    mConverter = 0;
-    mReplaceOnError = PR_FALSE;
-}
-
-IConvAdaptor::~IConvAdaptor()
-{
-    if (mConverter)
-        iconv_close(mConverter);
-}
-
-nsresult 
-IConvAdaptor::Init(const char* from, const char* to)
-{
-#ifdef DEBUG
-    mFrom = from;
-    mTo = to;
-#endif
-
-    mConverter = iconv_open(to, from);
-    if (mConverter == (iconv_t) -1 )    
-    {
-#ifdef DEBUG
-        printf(" * IConvAdaptor - FAILED Initing: %s ==> %s\n", from, to);
-#endif
-        mConverter = nsnull;
-        return NS_ERROR_FAILURE;
-    }
-    return NS_OK;
-}
-
-// From some charset to ucs2
-nsresult 
-IConvAdaptor::Convert(const char * aSrc, 
-                     PRInt32 * aSrcLength, 
-                     PRUnichar * aDest, 
-                     PRInt32 * aDestLength)
-{
-    return ConvertInternal( (void*) aSrc, 
-                            aSrcLength, 
-                            1,
-                            (void*) aDest, 
-                            aDestLength,
-                            2);
-}
-
-nsresult
-IConvAdaptor::GetMaxLength(const char * aSrc, 
-                          PRInt32 aSrcLength, 
-                          PRInt32 * aDestLength)
-{
-    if (!mConverter)
-        return NS_ERROR_UENC_NOMAPPING;
-
-    *aDestLength = aSrcLength*4; // sick
-#ifdef DEBUG
-    printf(" * IConvAdaptor - - GetMaxLength %d ( %s -> %s )\n", *aDestLength, mFrom.get(), mTo.get());
-#endif
-    return NS_OK;
-}
-
-
-nsresult 
-IConvAdaptor::Reset()
-{
-    const char *zero_char_in_ptr  = NULL;
-    char       *zero_char_out_ptr = NULL;
-    size_t      zero_size_in      = 0,
-                zero_size_out     = 0;
-
-    iconv(mConverter, 
-          (char **)&zero_char_in_ptr,
-          &zero_size_in,
-          &zero_char_out_ptr,
-          &zero_size_out);
-
-#ifdef DEBUG
-    printf(" * IConvAdaptor - - Reset\n");
-#endif
-    return NS_OK;
-}
-
-
-void
-IConvAdaptor::SetInputErrorBehavior(PRInt32 aBehavior)
-{
-}
-
-
-PRUnichar
-IConvAdaptor::GetCharacterForUnMapped()
-{
-    return PRUnichar(0xfffd); // Unicode REPLACEMENT CHARACTER
-}
-
-// convert unicode data into some charset.
-nsresult 
-IConvAdaptor::Convert(const PRUnichar * aSrc, 
-                     PRInt32 * aSrcLength, 
-                     char * aDest, 
-                     PRInt32 * aDestLength)
-{
-    return ConvertInternal( (void*) aSrc, 
-                            aSrcLength, 
-                            2,
-                            (void*) aDest, 
-                            aDestLength,
-                            1);
-}
-
-
-nsresult 
-IConvAdaptor::Finish(char * aDest, PRInt32 * aDestLength)
-{
-    *aDestLength = 0;
-    return NS_OK;
-}
-
-nsresult 
-IConvAdaptor::GetMaxLength(const PRUnichar * aSrc, 
-                          PRInt32 aSrcLength, 
-                          PRInt32 * aDestLength)
-{
-    if (!mConverter)
-        return NS_ERROR_UENC_NOMAPPING;
-
-    *aDestLength = aSrcLength*4; // sick
-
-    return NS_OK;
-}
-
-
-nsresult 
-IConvAdaptor::SetOutputErrorBehavior(PRInt32 aBehavior, 
-                                    nsIUnicharEncoder * aEncoder, 
-                                    PRUnichar aChar)
-{
-    if (aBehavior == nsIUnicodeEncoder::kOnError_Signal) {
-        mReplaceOnError = PR_FALSE;
-        return NS_OK;
-    }
-    else if (aBehavior == nsIUnicodeEncoder::kOnError_Replace) {
-        mReplaceOnError = PR_TRUE;
-        mReplaceChar = aChar;
-        return NS_OK;
-    }
-
-    NS_WARNING("Uconv Error Behavior not support");
-    return NS_ERROR_FAILURE;
-}
-
-
-nsresult 
-IConvAdaptor::ConvertInternal(void * aSrc, 
-                             PRInt32 * aSrcLength, 
-                             PRInt32 aSrcCharSize,
-                             void * aDest, 
-                             PRInt32 * aDestLength,
-                             PRInt32 aDestCharSize)
-{
-    if (!mConverter) {
-        NS_WARNING("Converter Not Initialize");
-        return NS_ERROR_NOT_INITIALIZED;
-    }
-    size_t res = 0;
-    size_t inLeft = (size_t) *aSrcLength * aSrcCharSize;
-    size_t outLeft = (size_t) *aDestLength * aDestCharSize;
-    size_t outputAvail = outLeft;
-
-    while (true){
-
-        res = iconv(mConverter, 
-                    (char**)&aSrc, 
-                    &inLeft, 
-                    (char**)&aDest, 
-                    &outLeft);
-        
-        if (res == (size_t) -1) {
-            // on some platforms (e.g., linux) iconv will fail with
-            // E2BIG if it cannot convert _all_ of its input.  it'll
-            // still adjust all of the in/out params correctly, so we
-            // can ignore this error.  the assumption is that we will
-            // be called again to complete the conversion.
-            if ((errno == E2BIG) && (outLeft < outputAvail)) {
-                res = 0;
-                break;
-            }
-            
-            if (errno == EILSEQ) {
-
-                if (mReplaceOnError) {
-                    if (aDestCharSize == 1) {
-                        (*(char*)aDest) = (char)mReplaceChar;
-                        aDest = (char*)aDest + sizeof(char);
-                    }
-                    else
-                    {
-                        (*(PRUnichar*)aDest) = (PRUnichar)mReplaceChar;
-                        aDest = (PRUnichar*)aDest + sizeof(PRUnichar);
-                    
-                    }
-                    inLeft -= aSrcCharSize;
-                    outLeft -= aDestCharSize;
-
-#ifdef DEBUG
-                    printf(" * IConvAdaptor - replacing char in output  ( %s -> %s )\n", 
-                           mFrom.get(), mTo.get());
-
-#endif
-                    res = 0;
-                }
-            }
-
-            if (res == -1) {
-#ifdef DEBUG
-                printf(" * IConvAdaptor - Bad input ( %s -> %s )\n", mFrom.get(), mTo.get());
-#endif
-                return NS_ERROR_UENC_NOMAPPING;
-            }
-        }
-
-        if (inLeft <= 0 || outLeft <= 0 || res == -1)
-            break;
-    }
-
-
-    if (res != (size_t) -1) {
-
-        // xp_iconv deals with how much is remaining in a given buffer
-        // but what uconv wants how much we read/written already.  So
-        // we fix it up here.
-        *aSrcLength  -= (inLeft  / aSrcCharSize);
-        *aDestLength -= (outLeft / aDestCharSize);
-        return NS_OK;
-    }
-    
-#ifdef DEBUG
-    printf(" * IConvAdaptor - - xp_iconv error( %s -> %s )\n", mFrom.get(), mTo.get());
-#endif
-    Reset();    
-    return NS_ERROR_UENC_NOMAPPING;
-}
-
-NS_IMPL_ISUPPORTS1(NativeUConvService, nsINativeUConvService)
-
-NS_IMETHODIMP 
-NativeUConvService::GetNativeConverter(const char* from,
-                                       const char* to,
-                                       nsISupports** aResult) 
-{
-    *aResult = nsnull;
-
-    //nsRefPtr<IConvAdaptor> ucl = new IConvAdaptor();
-    IConvAdaptor *adaptor=new IConvAdaptor();
-    nsCOMPtr<nsISupports> ucl(static_cast<nsIUnicodeDecoder*>(adaptor));
-    if (!ucl)
-        return NS_ERROR_OUT_OF_MEMORY;
-
-    //nsresult rv = ucl->Init(from, to);
-    nsresult rv=adaptor->Init(from,to);   
-    if (NS_SUCCEEDED(rv))
-        NS_ADDREF(*aResult = ucl);
-
-    return rv;
-}
-#endif
deleted file mode 100644
--- a/intl/uconv/native/nsNativeUConvService.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is a Native UCONV interface.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#define NS_NATIVE_UCONV_SERVICE_CONTRACT_ID "@mozilla.org/uconv/native-service"
-
-#define NS_NATIVE_UCONV_SERVICE_CID \
-{ 0xbd3e94ba, 0xd46f, 0x4026, \
-{ 0xa1, 0xc3, 0x6e, 0xd0, 0xc1, 0x6e, 0xa0, 0x22 } }
-
-#include "nsINativeUConvService.h"
-
-class NativeUConvService : public nsINativeUConvService
-{
-public:
-
-    NativeUConvService() {};
-    virtual ~NativeUConvService() {};
-
-    NS_DECL_ISUPPORTS
-    NS_DECL_NSINATIVEUCONVSERVICE
-};
-
deleted file mode 100644
--- a/intl/uconv/native/nsWinCEUConvService.cpp
+++ /dev/null
@@ -1,442 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is WinCEUConvAdapter for Windows CE
- *
- * The Initial Developer of the Original Code is
- * Doug Turner <dougt@meer.net>.
- * Portions created by the Initial Developer are Copyright (C) 2005
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include <windows.h>
-
-#include "nsNativeUConvService.h"
-#include "nsIUnicodeDecoder.h"
-#include "nsIUnicodeEncoder.h"
-#include "nsIPlatformCharset.h"
-#include "nsIServiceManager.h"
-
-#include "nsUCSupport.h"
-#include "nsUTF8ToUnicode.h"
-#include "nsUnicodeToUTF8.h"
-
-#ifdef ALERT_DBG
-void DisplayLastError(const char * msg)
-{
-  int flags = MB_APPLMODAL | MB_TOPMOST | MB_SETFOREGROUND;
-    int error = GetLastError();
-    switch (error)
-    {
-    case ERROR_NO_UNICODE_TRANSLATION:
-      MessageBox(0, "ERROR_NO_UNICODE_TRANSLATION", msg, flags);
-      break;
-    case ERROR_INVALID_PARAMETER:
-      MessageBox(0, "ERROR_INVALID_PARAMETER", msg, flags);
-      break;
-    case ERROR_INVALID_FLAGS:
-      MessageBox(0, "ERROR_INVALID_FLAGS", msg, flags);
-      break;
-    case ERROR_INSUFFICIENT_BUFFER:
-      MessageBox(0, "ERROR_INSUFFICIENT_BUFFER", msg, flags);
-      break;
-    default:
-      MessageBox(0, "other...", msg, flags);
-    }
-}
-#endif
-
-
-class WinCEUConvAdapter : public nsIUnicodeDecoder,
-                          public nsIUnicodeEncoder
-{
-public:
-  
-  WinCEUConvAdapter();
-  virtual ~WinCEUConvAdapter();
-  
-  nsresult Init(const char* from, const char* to);
-  
-  NS_DECL_ISUPPORTS;
-  
-  // Decoder methods:
-  
-  NS_IMETHOD Convert(const char * aSrc, 
-                     PRInt32 * aSrcLength, 
-                     PRUnichar * aDest, 
-                     PRInt32 * aDestLength);
-  
-  NS_IMETHOD GetMaxLength(const char * aSrc, 
-                          PRInt32 aSrcLength, 
-                          PRInt32 * aDestLength);
-  NS_IMETHOD Reset();
-  
-  virtual void SetInputErrorBehavior(PRInt32 aBehavior);
-  virtual PRUnichar GetCharacterForUnMapped();
-
-  // Encoder methods:
-  
-  NS_IMETHOD Convert(const PRUnichar * aSrc, 
-                     PRInt32 * aSrcLength, 
-                     char * aDest, 
-                     PRInt32 * aDestLength);
-  
-  
-  NS_IMETHOD Finish(char * aDest, PRInt32 * aDestLength);
-  
-  NS_IMETHOD GetMaxLength(const PRUnichar * aSrc, 
-                          PRInt32 aSrcLength, 
-                          PRInt32 * aDestLength);
-  
-  // defined by the Decoder:  NS_IMETHOD Reset();
-  
-  NS_IMETHOD SetOutputErrorBehavior(PRInt32 aBehavior, 
-                                    nsIUnicharEncoder * aEncoder, 
-                                    PRUnichar aChar);
-  
-  PRUint32 mCodepage;
-};
-
-NS_IMPL_ISUPPORTS2(WinCEUConvAdapter,
-                   nsIUnicodeDecoder,
-                   nsIUnicodeEncoder)
-
-WinCEUConvAdapter::WinCEUConvAdapter()
-{
-  mCodepage = -1;
-}
-
-WinCEUConvAdapter::~WinCEUConvAdapter()
-{
-}
-
-typedef struct CharsetCodePageMap {
-  char      charset[32];
-  PRUint16  codepage;
-} CsCpMap;
-
-
-static CsCpMap theCsCPMap[] = {
-  {"Big5",    950},
-  {"EUC-JP", 51932},     
-  {"EUC-KR", 949},  
-  {"GB2312", 936},  
-  {"HZ-GB-2312    ", 52936},     
-  {"IBM850", 850},   
-  {"IBM852", 852},   
-  {"IBM855", 855},   
-  {"IBM857", 857},   
-  {"IBM862", 862},   
-  {"IBM866", 866},   
-  {"IBM869", 869},   
-  {"ISO-2022-JP", 50220},     
-  {"ISO-2022-KR", 50225},     
-  {"ISO-8859-15", 28605},     
-  {"ISO-8859-1", 28591},     
-  {"ISO-8859-2", 28592},     
-  {"ISO-8859-3", 28593},     
-  {"ISO-8859-4", 28594},     
-  {"ISO-8859-5", 28595},     
-  {"ISO-8859-6", 28596},     
-  {"ISO-8859-7", 28597},     
-  {"ISO-8859-8", 28598},     
-  {"ISO-8859-8-I", 1255},      
-  {"ISO-8859-9", 28599},     
-  {"Shift_JIS", 932},       
-  {"TIS-620", 874},       
-  {"UTF-16", 1200},      
-  {"UTF-7", 65000},     
-  {"UTF-8", 65001},     
-  {"gb_2312-80", 936},       
-  {"ks_c_5601-1987", 949},       
-  {"us-ascii", 20127},     
-  {"windows-1250", 1250},      
-  {"windows-1251", 1251},      
-  {"windows-1252", 1252},      
-  {"windows-1253", 1253},      
-  {"windows-1254", 1254},      
-  {"windows-1255", 1255},      
-  {"windows-1256", 1256},      
-  {"windows-1257", 1257},      
-  {"windows-1258", 1258},      
-  {"windows-874", 874},       
-  {"windows-936", 936},       
-  {"x-mac-arabic", 10004},     
-  {"x-mac-ce", 10029},     
-  {"x-mac-cyrillic", 10007},     
-  {"x-mac-greek", 10006},     
-  {"x-mac-hebrew", 10005},     
-  {"x-mac-icelandi", 10079},     
-  {"x-x-big5", 950},       
-  {nsnull, 0}
-};
-
-
-nsresult
-WinCEUConvAdapter::Init(const char* from, const char* to)
-{
-  const char* cpstring = nsnull;
-  
-  if (!strcmp(from, "UCS-2"))
-  {
-    cpstring = to;
-  }
-  else
-  {
-    cpstring = from;
-  }
-  
-  int i = 0;
-  while (1)
-  {
-    if (theCsCPMap[i].charset[0] == nsnull)
-      break;
-    
-    if (!strcmp(theCsCPMap[i].charset, cpstring))
-    {
-      mCodepage = theCsCPMap[i].codepage;
-      break;
-    }
-    i++;
-  }
-  
-  if (mCodepage == -1)
-    return NS_ERROR_FAILURE;
-  
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-WinCEUConvAdapter::Convert(const char * aSrc, 
-                           PRInt32 * aSrcLength, 
-                           PRUnichar * aDest, 
-                           PRInt32 * aDestLength)
-{
-  if (mCodepage == -1)
-    return NS_ERROR_FAILURE;
-  
-  int count = MultiByteToWideChar(mCodepage,
-                                  0,
-                                  aSrc,
-                                  *aSrcLength,
-                                  aDest,
-                                  *aDestLength);
-  
-  if (count == 0 && GetLastError() == ERROR_INVALID_PARAMETER)
-  {
-    // fall back on the current system Windows "ANSI" code page
-    count = MultiByteToWideChar(CP_ACP,
-                                0,
-                                aSrc,
-                                *aSrcLength,
-                                aDest,
-                                *aDestLength);
-  }
-  
-#ifdef ALERT_DBG
-  if (count == 0)
-    DisplayLastError("MultiByteToWideChar");
-#endif
-  
-  *aDestLength = count;
-  *aSrcLength  = count;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-WinCEUConvAdapter::GetMaxLength(const char * aSrc, 
-                                PRInt32 aSrcLength, 
-                                PRInt32 * aDestLength)
-{
-  if (mCodepage == -1 || aSrc == nsnull )
-    return NS_ERROR_FAILURE;
-  
-  int count = MultiByteToWideChar(mCodepage,
-                                  MB_PRECOMPOSED,
-                                  aSrc,
-                                  aSrcLength,
-                                  NULL,
-                                  NULL);
-  
-  if (count == 0 && GetLastError() == ERROR_INVALID_PARAMETER)
-  {
-    // fall back on the current system Windows "ANSI" code page
-    
-    count = MultiByteToWideChar(CP_ACP,
-                                MB_PRECOMPOSED,
-                                aSrc,
-                                aSrcLength,
-                                NULL,
-                                NULL);
-  }
-  
-#ifdef ALERT_DBG  
-  if (count == 0)
-    DisplayLastError("MultiByteToWideChar (0)");
-#endif
-  
-  *aDestLength = count;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-WinCEUConvAdapter::Reset()
-{
-  return NS_OK;
-}
-
-void
-WinCEUConvAdapter::SetInputErrorBehavior(PRInt32 aBehavior)
-{
-}
-
-PRUnichar
-WinCEUConvAdapter::GetCharacterForUnMapped()
-{
-  return PRUnichar(0xfffd); // Unicode REPLACEMENT CHARACTER
-}
-
-// Encoder methods:
-
-NS_IMETHODIMP
-WinCEUConvAdapter::Convert(const PRUnichar * aSrc, 
-                           PRInt32 * aSrcLength, 
-                           char * aDest, 
-                           PRInt32 * aDestLength)
-{
-  if (mCodepage == -1)
-    return NS_ERROR_FAILURE;
-  
-  char * defaultChar = "?";
-  int count = WideCharToMultiByte(mCodepage,
-                                  0,
-                                  aSrc,
-                                  *aSrcLength,
-                                  aDest,
-                                  *aDestLength,
-                                  defaultChar,
-                                  NULL);
-  
-#ifdef ALERT_DBG
-  if (count == 0)
-    DisplayLastError("WideCharToMultiByte");
-#endif
-  
-  *aSrcLength = count;
-  *aDestLength = count;
-  
-  return NS_OK;
-}
-
-
-NS_IMETHODIMP
-WinCEUConvAdapter::Finish(char * aDest, PRInt32 * aDestLength)
-{
-  *aDestLength = 0;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-WinCEUConvAdapter::GetMaxLength(const PRUnichar * aSrc, 
-                                PRInt32 aSrcLength, 
-                                PRInt32 * aDestLength)
-{
-  if (mCodepage == -1)
-    return NS_ERROR_FAILURE;
-  
-  int count = WideCharToMultiByte(mCodepage,
-                                  0,
-                                  aSrc,
-                                  aSrcLength,
-                                  NULL,
-                                  NULL,
-                                  NULL,
-                                  NULL);
-#ifdef ALERT_DBG
-  if (count == 0)
-    DisplayLastError("WideCharToMultiByte (0)");
-#endif
-  
-  *aDestLength = count;
-  return NS_OK;
-}
-
-// defined by the Decoder:  NS_IMETHOD Reset();
-
-NS_IMETHODIMP
-WinCEUConvAdapter::SetOutputErrorBehavior(PRInt32 aBehavior, 
-                                          nsIUnicharEncoder * aEncoder, 
-                                          PRUnichar aChar)
-{
-  return NS_OK;
-}
-
-// NativeUConvService
-
-NS_IMPL_ISUPPORTS1(NativeUConvService, 
-                   nsINativeUConvService);
-
-NS_IMETHODIMP 
-NativeUConvService::GetNativeConverter(const char* from,
-                                       const char* to,
-                                       nsISupports** aResult) 
-{
-  *aResult = nsnull;
-  
-  
-  
-  if (!strcmp(from, "UCS-2") && 
-      !strcmp(to,   "UTF-8") )
-  {
-    nsUnicodeToUTF8 * inst = new nsUnicodeToUTF8();
-    inst->AddRef();
-    *aResult = inst;
-    return NS_OK;
-  }
-  
-  if (!strcmp(from, "UTF-8") &&
-      !strcmp(to,   "UCS-2") )
-  {
-    nsUTF8ToUnicode * inst = new nsUTF8ToUnicode();
-    inst->AddRef();
-    *aResult = (nsIUnicodeDecoder*) inst;
-    return NS_OK;
-  }
-  
-  WinCEUConvAdapter* ucl = new WinCEUConvAdapter();
-  if (!ucl)
-    return NS_ERROR_OUT_OF_MEMORY;
-  
-  nsresult rv = ucl->Init(from, to);
-  
-  if (NS_SUCCEEDED(rv)) {
-    NS_ADDREF(*aResult = (nsISupports*)(nsIUnicharEncoder*)ucl);
-  }
-  
-  return rv;
-}
--- a/intl/uconv/src/Makefile.in
+++ b/intl/uconv/src/Makefile.in
@@ -57,28 +57,23 @@ CPPSRCS		= \
 		nsConverterInputStream.cpp \
 		nsConverterOutputStream.cpp \
 		nsTextToSubURI.cpp \
 		nsCharsetConverterManager.cpp \
 		nsUTF8ConverterService.cpp \
 		nsUTF8ToUnicode.cpp \
 		nsUnicodeToUTF8.cpp \
 		nsScriptableUConv.cpp \
-		$(NULL)
-
-ifndef MOZ_USE_NATIVE_UCONV
-CPPSRCS         += \
 		nsISO88591ToUnicode.cpp \
 		nsCP1252ToUnicode.cpp \
 		nsMacRomanToUnicode.cpp \
 		nsUnicodeToISO88591.cpp \
 		nsUnicodeToCP1252.cpp \
 		nsUnicodeToMacRoman.cpp \
 		$(NULL)
-endif
 
 # Are we targeting x86-32 or x86-64?  If so, we want to include the SSE2
 # version of nsUTF8ToUnicodeSSE2.cpp.
 ifneq (,$(INTEL_ARCHITECTURE))
 CPPSRCS			+= nsUTF8ToUnicodeSSE2.cpp
 
 # nsUTF8ToUnicodeSSE2.cpp uses SSE2 intrinsics, so we need to pass -msse2 if
 # we're using gcc. (See bug 585538 comment 12.)
@@ -107,28 +102,21 @@ endif
 LOCAL_INCLUDES	= -I$(srcdir)/../util \
 		  -I$(srcdir)/../ucvlatin \
 		  -I$(srcdir)/../ucvibm \
 		  -I$(srcdir)/../ucvja \
 		  -I$(srcdir)/../ucvtw2 \
 		  -I$(srcdir)/../ucvtw \
 		  -I$(srcdir)/../ucvko \
 		  -I$(srcdir)/../ucvcn \
-		  -I$(srcdir)/../native \
 		  $(NULL)
 
-ifndef MOZ_USE_NATIVE_UCONV
 SHARED_LIBRARY_LIBS += \
 	../ucvlatin/$(LIB_PREFIX)ucvlatin_s.$(LIB_SUFFIX) \
 	../ucvibm/$(LIB_PREFIX)ucvibm_s.$(LIB_SUFFIX) \
 	../ucvja/$(LIB_PREFIX)ucvja_s.$(LIB_SUFFIX) \
 	../ucvtw2/$(LIB_PREFIX)ucvtw2_s.$(LIB_SUFFIX) \
 	../ucvtw/$(LIB_PREFIX)ucvtw_s.$(LIB_SUFFIX) \
 	../ucvko/$(LIB_PREFIX)ucvko_s.$(LIB_SUFFIX) \
 	../ucvcn/$(LIB_PREFIX)ucvcn_s.$(LIB_SUFFIX) \
 	$(NULL)
-else
-SHARED_LIBRARY_LIBS += \
-	../native/$(LIB_PREFIX)ucnative_s.$(LIB_SUFFIX) \
-	$(NULL)
-endif
 
 include $(topsrcdir)/config/rules.mk
--- a/intl/uconv/src/nsCharsetConverterManager.cpp
+++ b/intl/uconv/src/nsCharsetConverterManager.cpp
@@ -56,20 +56,16 @@
 
 #include "nsXPCOM.h"
 #include "nsComponentManagerUtils.h"
 #include "nsISupportsPrimitives.h"
 
 // just for CONTRACTIDs
 #include "nsCharsetConverterManager.h"
 
-#ifdef MOZ_USE_NATIVE_UCONV
-#include "nsNativeUConvService.h"
-#endif
-
 // Class nsCharsetConverterManager [implementation]
 
 NS_IMPL_THREADSAFE_ISUPPORTS1(nsCharsetConverterManager,
                               nsICharsetConverterManager)
 
 nsCharsetConverterManager::nsCharsetConverterManager() 
   : mDataBundle(NULL)
   , mTitleBundle(NULL)
@@ -149,31 +145,16 @@ nsCharsetConverterManager::GetUnicodeEnc
 
 NS_IMETHODIMP
 nsCharsetConverterManager::GetUnicodeEncoderRaw(const char * aDest, 
                                                 nsIUnicodeEncoder ** aResult)
 {
   *aResult= nsnull;
   nsCOMPtr<nsIUnicodeEncoder> encoder;
 
-#ifdef MOZ_USE_NATIVE_UCONV
-  if (mNativeUC) {
-    nsCOMPtr<nsISupports> supports;
-    mNativeUC->GetNativeConverter("UCS-2", 
-                                  aDest,
-                                  getter_AddRefs(supports));
-
-    encoder = do_QueryInterface(supports);
-
-    if (encoder) {
-      NS_ADDREF(*aResult = encoder);
-      return NS_OK;
-    }
-  }
-#endif  
   nsresult rv = NS_OK;
 
   nsCAutoString
     contractid(NS_LITERAL_CSTRING(NS_UNICODEENCODER_CONTRACTID_BASE) +
                nsDependentCString(aDest));
 
   // Always create an instance since encoders hold state.
   encoder = do_CreateInstance(contractid.get(), &rv);
@@ -232,31 +213,16 @@ nsCharsetConverterManager::GetUnicodeDec
 
 NS_IMETHODIMP
 nsCharsetConverterManager::GetUnicodeDecoderRawInternal(const char * aSrc, 
                                                         nsIUnicodeDecoder ** aResult)
 {
   *aResult= nsnull;
   nsCOMPtr<nsIUnicodeDecoder> decoder;
 
-#ifdef MOZ_USE_NATIVE_UCONV
-  if (mNativeUC) {
-    nsCOMPtr<nsISupports> supports;
-    mNativeUC->GetNativeConverter(aSrc,
-                                  "UCS-2", 
-                                  getter_AddRefs(supports));
-    
-    decoder = do_QueryInterface(supports);
-
-    if (decoder) {
-      NS_ADDREF(*aResult = decoder);
-      return NS_OK;
-    }
-  }
-#endif
   nsresult rv = NS_OK;
 
   NS_NAMED_LITERAL_CSTRING(contractbase, NS_UNICODEDECODER_CONTRACTID_BASE);
   nsDependentCString src(aSrc);
   
   decoder = do_CreateInstance(PromiseFlatCString(contractbase + src).get(),
                               &rv);
   NS_ENSURE_SUCCESS(rv, NS_ERROR_UCONV_NOCONV);
--- a/intl/uconv/src/nsCharsetConverterManager.h
+++ b/intl/uconv/src/nsCharsetConverterManager.h
@@ -38,39 +38,31 @@
 #define nsCharsetConverterManager_h__
 
 #include "nsISupports.h"
 #include "nsICharsetConverterManager.h"
 #include "nsIStringBundle.h"
 #include "nsInterfaceHashtable.h"
 #include "mozilla/Mutex.h"
 
-#ifdef MOZ_USE_NATIVE_UCONV
-#include "nsINativeUConvService.h"
-#endif
-
 class nsCharsetConverterManager : public nsICharsetConverterManager
 {
   NS_DECL_ISUPPORTS
   NS_DECL_NSICHARSETCONVERTERMANAGER
 
 public:
 
   nsCharsetConverterManager();
   virtual ~nsCharsetConverterManager();
 
 private:
 
   nsIStringBundle * mDataBundle;
   nsIStringBundle * mTitleBundle;
 
-#ifdef MOZ_USE_NATIVE_UCONV
-  nsCOMPtr<nsINativeUConvService> mNativeUC;
-#endif
-
   nsresult LoadExtensibleBundle(const char * aRegistryKey, 
       nsIStringBundle ** aResult);
 
   nsresult GetBundleValue(nsIStringBundle * aBundle,
                           const char * aName, 
                           const nsAFlatString& aProp, PRUnichar ** aResult);
   nsresult GetBundleValue(nsIStringBundle * aBundle,
                           const char * aName, 
--- a/intl/uconv/src/nsUConvModule.cpp
+++ b/intl/uconv/src/nsUConvModule.cpp
@@ -51,17 +51,16 @@
 #include "nsUConvCID.h"
 #include "nsCharsetConverterManager.h"
 #include "nsTextToSubURI.h"
 #include "nsUTF8ConverterService.h"
 #include "nsConverterInputStream.h"
 #include "nsConverterOutputStream.h"
 #include "nsScriptableUConv.h"
 
-#ifndef MOZ_USE_NATIVE_UCONV
 #include "nsITextToSubURI.h"
 
 #include "nsUConvDll.h"
 #include "nsIFile.h"
 
 #include "nsCRT.h"
 
 #include "nsUCSupport.h"
@@ -557,40 +556,28 @@ const PRUint16 g_ucvko_AsciiMapping[] = 
 const PRUint16 g_HangulNullMapping[] ={
   0x0001, 0x0004, 0x0005, 0x0008, 0x0000, 0xAC00, 0xD7A3, 0xAC00
 };
 
 const PRUint16 g_ufJohabJamoMapping[] ={   
 #include "johabjamo.uf"
 };
 
-#else // MOZ_USE_NATIVE_UCONV
-
-#include "nsINativeUConvService.h"
-#include "nsNativeUConvService.h"
-
-NS_GENERIC_FACTORY_CONSTRUCTOR(NativeUConvService)
-
-#endif // #ifndef MOZ_USE_NATIVE_UCONV
-
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsCharsetConverterManager)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsTextToSubURI)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsUTF8ConverterService)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsConverterInputStream)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsConverterOutputStream)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsScriptableUnicodeConverter)
 
 NS_DEFINE_NAMED_CID(NS_ICHARSETCONVERTERMANAGER_CID);
 NS_DEFINE_NAMED_CID(NS_TEXTTOSUBURI_CID);
 NS_DEFINE_NAMED_CID(NS_CONVERTERINPUTSTREAM_CID);
 NS_DEFINE_NAMED_CID(NS_CONVERTEROUTPUTSTREAM_CID);
 NS_DEFINE_NAMED_CID(NS_ISCRIPTABLEUNICODECONVERTER_CID);
-#ifdef MOZ_USE_NATIVE_UCONV
-NS_DEFINE_NAMED_CID(NS_NATIVE_UCONV_SERVICE_CID);
-#else
 NS_DEFINE_NAMED_CID(NS_UTF8CONVERTERSERVICE_CID);
 NS_DEFINE_NAMED_CID(NS_ISO88591TOUNICODE_CID);
 NS_DEFINE_NAMED_CID(NS_CP1252TOUNICODE_CID);
 NS_DEFINE_NAMED_CID(NS_MACROMANTOUNICODE_CID);
 NS_DEFINE_NAMED_CID(NS_UTF8TOUNICODE_CID);
 NS_DEFINE_NAMED_CID(NS_UNICODETOISO88591_CID);
 NS_DEFINE_NAMED_CID(NS_UNICODETOCP1252_CID);
 NS_DEFINE_NAMED_CID(NS_UNICODETOMACROMAN_CID);
@@ -767,27 +754,23 @@ NS_DEFINE_NAMED_CID(NS_CP936TOUNICODE_CI
 NS_DEFINE_NAMED_CID(NS_UNICODETOCP936_CID);
 NS_DEFINE_NAMED_CID(NS_GBKTOUNICODE_CID);
 NS_DEFINE_NAMED_CID(NS_UNICODETOGBK_CID);
 NS_DEFINE_NAMED_CID(NS_HZTOUNICODE_CID);
 NS_DEFINE_NAMED_CID(NS_UNICODETOHZ_CID);
 NS_DEFINE_NAMED_CID(NS_GB18030TOUNICODE_CID);
 NS_DEFINE_NAMED_CID(NS_UNICODETOGB18030_CID);
 NS_DEFINE_NAMED_CID(NS_ISO2022CNTOUNICODE_CID);
-#endif
 
 static const mozilla::Module::CIDEntry kUConvCIDs[] = {
   { &kNS_ICHARSETCONVERTERMANAGER_CID, false, NULL, nsCharsetConverterManagerConstructor },
   { &kNS_TEXTTOSUBURI_CID, false, NULL, nsTextToSubURIConstructor },
   { &kNS_CONVERTERINPUTSTREAM_CID, false, NULL, nsConverterInputStreamConstructor },
   { &kNS_CONVERTEROUTPUTSTREAM_CID, false, NULL, nsConverterOutputStreamConstructor },
   { &kNS_ISCRIPTABLEUNICODECONVERTER_CID, false, NULL, nsScriptableUnicodeConverterConstructor },
-#ifdef MOZ_USE_NATIVE_ICONV
-  { &kNS_NATIVE_UCONV_SERVICE_CID, false, NULL, NativeUConvServiceConstructor },
-#else
   { &kNS_UTF8CONVERTERSERVICE_CID, false, NULL, nsUTF8ConverterServiceConstructor },
   { &kNS_ISO88591TOUNICODE_CID, false, NULL, nsISO88591ToUnicodeConstructor },
   { &kNS_CP1252TOUNICODE_CID, false, NULL, nsCP1252ToUnicodeConstructor },
   { &kNS_MACROMANTOUNICODE_CID, false, NULL, nsMacRomanToUnicodeConstructor },
   { &kNS_UTF8TOUNICODE_CID, false, NULL, nsUTF8ToUnicodeConstructor },
   { &kNS_UNICODETOISO88591_CID, false, NULL, nsUnicodeToISO88591Constructor },
   { &kNS_UNICODETOCP1252_CID, false, NULL, nsUnicodeToCP1252Constructor },
   { &kNS_UNICODETOMACROMAN_CID, false, NULL, nsUnicodeToMacRomanConstructor },
@@ -964,29 +947,25 @@ static const mozilla::Module::CIDEntry k
   { &kNS_UNICODETOCP936_CID, false, NULL, nsUnicodeToCP936Constructor },
   { &kNS_GBKTOUNICODE_CID, false, NULL, nsGBKToUnicodeConstructor },
   { &kNS_UNICODETOGBK_CID, false, NULL, nsUnicodeToGBKConstructor },
   { &kNS_HZTOUNICODE_CID, false, NULL, nsHZToUnicodeConstructor },
   { &kNS_UNICODETOHZ_CID, false, NULL, nsUnicodeToHZConstructor },
   { &kNS_GB18030TOUNICODE_CID, false, NULL, nsGB18030ToUnicodeConstructor },
   { &kNS_UNICODETOGB18030_CID, false, NULL, nsUnicodeToGB18030Constructor },
   { &kNS_ISO2022CNTOUNICODE_CID, false, NULL, nsISO2022CNToUnicodeConstructor },
-#endif
   { NULL },
 };
 
 static const mozilla::Module::ContractIDEntry kUConvContracts[] = {
   { NS_CHARSETCONVERTERMANAGER_CONTRACTID, &kNS_ICHARSETCONVERTERMANAGER_CID },
   { NS_ITEXTTOSUBURI_CONTRACTID, &kNS_TEXTTOSUBURI_CID },
   { NS_CONVERTERINPUTSTREAM_CONTRACTID, &kNS_CONVERTERINPUTSTREAM_CID },
   { "@mozilla.org/intl/converter-output-stream;1", &kNS_CONVERTEROUTPUTSTREAM_CID },
   { NS_ISCRIPTABLEUNICODECONVERTER_CONTRACTID, &kNS_ISCRIPTABLEUNICODECONVERTER_CID },
-#ifdef MOZ_USE_NATIVE_ICONV
-  { NS_NATIVE_UCONV_SERVICE_CONTRACT_ID, &kNS_NATIVE_UCONV_SERVICE_CID },
-#else
   { NS_UTF8CONVERTERSERVICE_CONTRACTID, &kNS_UTF8CONVERTERSERVICE_CID },
   { NS_ISO88591TOUNICODE_CONTRACTID, &kNS_ISO88591TOUNICODE_CID },
   { NS_CP1252TOUNICODE_CONTRACTID, &kNS_CP1252TOUNICODE_CID },
   { NS_MACROMANTOUNICODE_CONTRACTID, &kNS_MACROMANTOUNICODE_CID },
   { NS_UTF8TOUNICODE_CONTRACTID, &kNS_UTF8TOUNICODE_CID },
   { NS_UNICODETOISO88591_CONTRACTID, &kNS_UNICODETOISO88591_CID },
   { NS_UNICODETOCP1252_CONTRACTID, &kNS_UNICODETOCP1252_CID },
   { NS_UNICODETOMACROMAN_CONTRACTID, &kNS_UNICODETOMACROMAN_CID },
@@ -1163,17 +1142,16 @@ static const mozilla::Module::ContractID
   { NS_UNICODEENCODER_CONTRACTID_BASE "windows-936", &kNS_UNICODETOCP936_CID },
   { NS_UNICODEDECODER_CONTRACTID_BASE "gbk", &kNS_GBKTOUNICODE_CID },
   { NS_UNICODEENCODER_CONTRACTID_BASE "gbk", &kNS_UNICODETOGBK_CID },
   { NS_UNICODEDECODER_CONTRACTID_BASE "HZ-GB-2312", &kNS_HZTOUNICODE_CID },
   { NS_UNICODEENCODER_CONTRACTID_BASE "HZ-GB-2312", &kNS_UNICODETOHZ_CID },
   { NS_UNICODEDECODER_CONTRACTID_BASE "gb18030", &kNS_GB18030TOUNICODE_CID },
   { NS_UNICODEENCODER_CONTRACTID_BASE "gb18030", &kNS_UNICODETOGB18030_CID },
   { NS_UNICODEDECODER_CONTRACTID_BASE "ISO-2022-CN", &kNS_ISO2022CNTOUNICODE_CID },
-#endif
   { NULL }
 };
 
 static const mozilla::Module kUConvModule = {
   mozilla::Module::kVersion,
   kUConvCIDs,
   kUConvContracts,
   kUConvCategories
--- a/toolkit/toolkit-makefiles.sh
+++ b/toolkit/toolkit-makefiles.sh
@@ -155,17 +155,16 @@ MAKEFILES_intl="
   intl/uconv/tests/Makefile
   intl/uconv/ucvja/Makefile
   intl/uconv/ucvlatin/Makefile
   intl/uconv/ucvcn/Makefile
   intl/uconv/ucvtw/Makefile
   intl/uconv/ucvtw2/Makefile
   intl/uconv/ucvko/Makefile
   intl/uconv/ucvibm/Makefile
-  intl/uconv/native/Makefile
   intl/locale/Makefile
   intl/locale/public/Makefile
   intl/locale/idl/Makefile
   intl/locale/src/Makefile
   intl/locale/src/mac/Makefile
   intl/locale/src/unix/Makefile
   intl/locale/src/os2/Makefile
   intl/locale/src/windows/Makefile