diff --git a/mozilla/xpcom/io/nsNativeCharsetUtils.cpp b/mozilla/xpcom/io/nsNativeCharsetUtils.cpp index 55b5c63cbee..be859776a20 100644 --- a/mozilla/xpcom/io/nsNativeCharsetUtils.cpp +++ b/mozilla/xpcom/io/nsNativeCharsetUtils.cpp @@ -24,6 +24,7 @@ * Frank Tang * Brendan Eich * Sergei Dolgov + * Jungshik Shin * * 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 @@ -41,10 +42,44 @@ #include "xpcom-private.h" +//----------------------------------------------------------------------------- +// XP_MACOSX or XP_BEOS +//----------------------------------------------------------------------------- +#if defined(XP_BEOS) || defined(XP_MACOSX) + +#include "nsAString.h" +#include "nsReadableUtils.h" +#include "nsString.h" + +NS_COM nsresult +NS_CopyNativeToUnicode(const nsACString &input, nsAString &output) +{ + CopyUTF8toUTF16(input, output); + return NS_OK; +} + +NS_COM nsresult +NS_CopyUnicodeToNative(const nsAString &input, nsACString &output) +{ + CopyUTF16toUTF8(input, output); + return NS_OK; +} + +void +NS_StartupNativeCharsetUtils() +{ +} + +void +NS_ShutdownNativeCharsetUtils() +{ +} + + //----------------------------------------------------------------------------- // XP_UNIX //----------------------------------------------------------------------------- -#if defined(XP_UNIX) +#elif defined(XP_UNIX) #include // mbtowc, wctomb #include // setlocale @@ -824,39 +859,6 @@ NS_ShutdownNativeCharsetUtils() nsNativeCharsetConverter::GlobalShutdown(); } -//----------------------------------------------------------------------------- -// XP_BEOS -//----------------------------------------------------------------------------- -#elif defined(XP_BEOS) - -#include "nsAString.h" -#include "nsReadableUtils.h" -#include "nsString.h" - -NS_COM nsresult -NS_CopyNativeToUnicode(const nsACString &input, nsAString &output) -{ - CopyUTF8toUTF16(input, output); - return NS_OK; -} - -NS_COM nsresult -NS_CopyUnicodeToNative(const nsAString &input, nsACString &output) -{ - CopyUTF16toUTF8(input, output); - return NS_OK; -} - -void -NS_StartupNativeCharsetUtils() -{ -} - -void -NS_ShutdownNativeCharsetUtils() -{ -} - //----------------------------------------------------------------------------- // XP_WIN //-----------------------------------------------------------------------------