зеркало из https://github.com/mozilla/gecko-dev.git
Use standard AM_LANGINFO_CODESET macro instead of assume CODESET is available if nl_langinfo is.
Thanks to Adrian Bunk <bunk@fs.tum.de> for the patch. Bug #160180 r=cls
This commit is contained in:
Родитель
7af6998949
Коммит
7f246234b3
|
@ -11,6 +11,7 @@ builtin(include, build/autoconf/nspr.m4)dnl
|
|||
builtin(include, build/autoconf/libart.m4)dnl
|
||||
builtin(include, build/autoconf/pkg.m4)dnl
|
||||
builtin(include, build/autoconf/freetype2.m4)dnl
|
||||
builtin(include, build/autoconf/codeset.m4)dnl
|
||||
dnl
|
||||
define(MOZ_TOPSRCDIR,.)dnl MOZ_TOPSRCDIR is used in altoptions.m4
|
||||
builtin(include, build/autoconf/altoptions.m4)dnl
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
# codeset.m4 serial AM1 (gettext-0.10.40)
|
||||
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License. As a special exception to the GNU General
|
||||
dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
AC_DEFUN([AM_LANGINFO_CODESET],
|
||||
[
|
||||
AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
|
||||
[AC_TRY_LINK([#include <langinfo.h>],
|
||||
[char* cs = nl_langinfo(CODESET);],
|
||||
am_cv_langinfo_codeset=yes,
|
||||
am_cv_langinfo_codeset=no)
|
||||
])
|
||||
if test $am_cv_langinfo_codeset = yes; then
|
||||
AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
|
||||
[Define if you have <langinfo.h> and nl_langinfo(CODESET).])
|
||||
HAVE_LANGINFO_CODESET=1
|
||||
fi
|
||||
])
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -2313,7 +2313,7 @@ dnl ========================================================
|
|||
AC_PROG_GCC_TRADITIONAL
|
||||
AC_FUNC_MEMCMP
|
||||
AC_CHECK_FUNCS(random strerror lchown fchmod snprintf statvfs memmove rint stat64 lstat64)
|
||||
AC_CHECK_FUNCS(nl_langinfo flockfile getpagesize)
|
||||
AC_CHECK_FUNCS(flockfile getpagesize)
|
||||
|
||||
dnl localtime_r and strtok_r are only present on MacOS version 10.2 and higher
|
||||
if test -z "$MACOS_DEPLOYMENT_TARGET" || test "$MACOS_DEPLOYMENT_TARGET" -ge "100200"; then
|
||||
|
@ -2443,6 +2443,8 @@ LIBS=$_SAVE_LIBS
|
|||
;;
|
||||
esac
|
||||
|
||||
AM_LANGINFO_CODESET
|
||||
|
||||
AC_LANG_C
|
||||
|
||||
dnl **********************
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
#ifdef HAVE_NL_TYPES_H
|
||||
#include <nl_types.h>
|
||||
#endif
|
||||
#if HAVE_NL_LANGINFO
|
||||
#if HAVE_LANGINFO_CODESET
|
||||
#include <langinfo.h>
|
||||
#endif
|
||||
#include "nsPlatformCharset.h"
|
||||
|
@ -170,7 +170,7 @@ nsPlatformCharset::GetDefaultCharsetForLocale(const nsAString& localeName, nsACS
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
#if HAVE_NL_LANGINFO
|
||||
#if HAVE_LANGINFO_CODESET
|
||||
//
|
||||
// This locale appears to be a different locale from the user's locale.
|
||||
// To do this we would need to lock the global resource we are currently
|
||||
|
@ -216,7 +216,7 @@ nsPlatformCharset::InitGetCharset(nsACString &oString)
|
|||
nsCString aCharset;
|
||||
nsresult res;
|
||||
|
||||
#if HAVE_NL_LANGINFO && defined(CODESET)
|
||||
#if HAVE_LANGINFO_CODESET
|
||||
nl_langinfo_codeset = nl_langinfo(CODESET);
|
||||
NS_ASSERTION(nl_langinfo_codeset, "cannot get nl_langinfo(CODESET)");
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
// iconv for all platforms where nltypes.h and nllanginfo.h are present
|
||||
// along with iconv.
|
||||
//
|
||||
#if defined(HAVE_ICONV) && defined(HAVE_NL_TYPES_H) && defined(HAVE_NL_LANGINFO)
|
||||
#if defined(HAVE_ICONV) && defined(HAVE_NL_TYPES_H) && defined(HAVE_LANGINFO_CODESET)
|
||||
#define USE_ICONV 1
|
||||
#else
|
||||
#define USE_STDCONV 1
|
||||
|
|
Загрузка…
Ссылка в новой задаче