intl: Update from gnulib

* config.charset, localcharset.c, relocatable.c, vasnprintf.c:
Update from gnulib.
* codeset.m4, extern-inline.m4, fcntl-o.m4, gettext.m4, glibc2.m4:
* glibc21.m4, iconv.m4, intdiv0.m4, intldir.m4, intlmacosx.m4:
* intmax.m4, inttypes-pri.m4, inttypes_h.m4, lcmessage.m4, lock.m4:
* longlong.m4, nls.m4, printf-posix.m4, progtest.m4:
* size_max.m4, stdint_h.m4, threadlib.m4, uintmax_t.m4:
* visibility.m4, wchar_t.m4, wint_t.m4, xsize.m4: Update copyright
year.
This commit is contained in:
Daiki Ueno 2015-01-22 17:40:17 +09:00
parent 48a9263bab
commit fe642a4949
34 changed files with 177 additions and 53 deletions

View File

@ -1,3 +1,16 @@
2015-01-22 Daiki Ueno <ueno@gnu.org>
intl: Update from gnulib
* config.charset, localcharset.c, relocatable.c, vasnprintf.c:
Update from gnulib.
* codeset.m4, extern-inline.m4, fcntl-o.m4, gettext.m4, glibc2.m4:
* glibc21.m4, iconv.m4, intdiv0.m4, intldir.m4, intlmacosx.m4:
* intmax.m4, inttypes-pri.m4, inttypes_h.m4, lcmessage.m4, lock.m4:
* longlong.m4, nls.m4, printf-posix.m4, progtest.m4:
* size_max.m4, stdint_h.m4, threadlib.m4, uintmax_t.m4:
* visibility.m4, wchar_t.m4, wint_t.m4, xsize.m4: Update copyright
year.
2015-01-21 Will Newton <will.newton@linaro.org>
intl: Merge from glibc

View File

@ -1,7 +1,7 @@
#! /bin/sh
# Output a system dependent table of character encoding aliases.
#
# Copyright (C) 2000-2004, 2006-2010 Free Software Foundation, Inc.
# Copyright (C) 2000-2004, 2006-2015 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
@ -348,12 +348,10 @@ case "$os" in
#echo "sun_eu_greek ?" # what is this?
echo "UTF-8 UTF-8"
;;
freebsd* | os2*)
freebsd*)
# FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
# localcharset.c falls back to using the full locale name
# from the environment variables.
# Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just
# reuse FreeBSD's locale data for OS/2.
echo "C ASCII"
echo "US-ASCII ASCII"
for l in la_LN lt_LN; do

View File

@ -128,7 +128,7 @@ get_charset_aliases (void)
cp = charset_aliases;
if (cp == NULL)
{
#if !(defined DARWIN7 || defined VMS || defined WINDOWS_NATIVE || defined __CYGWIN__)
#if !(defined DARWIN7 || defined VMS || defined WINDOWS_NATIVE || defined __CYGWIN__ || defined OS2)
const char *dir;
const char *base = "charset.alias";
char *file_name;
@ -342,6 +342,36 @@ get_charset_aliases (void)
"CP54936" "\0" "GB18030" "\0"
"CP65001" "\0" "UTF-8" "\0";
# endif
# if defined OS2
/* To avoid the troubles of installing a separate file in the same
directory as the DLL and of retrieving the DLL's directory at
runtime, simply inline the aliases here. */
/* The list of encodings is taken from "List of OS/2 Codepages"
by Alex Taylor:
<http://altsan.org/os2/toolkits/uls/index.html#codepages>.
See also "IBM Globalization - Code page identifiers":
<http://www-01.ibm.com/software/globalization/cp/cp_cpgid.html>. */
cp = "CP813" "\0" "ISO-8859-7" "\0"
"CP878" "\0" "KOI8-R" "\0"
"CP819" "\0" "ISO-8859-1" "\0"
"CP912" "\0" "ISO-8859-2" "\0"
"CP913" "\0" "ISO-8859-3" "\0"
"CP914" "\0" "ISO-8859-4" "\0"
"CP915" "\0" "ISO-8859-5" "\0"
"CP916" "\0" "ISO-8859-8" "\0"
"CP920" "\0" "ISO-8859-9" "\0"
"CP921" "\0" "ISO-8859-13" "\0"
"CP923" "\0" "ISO-8859-15" "\0"
"CP954" "\0" "EUC-JP" "\0"
"CP964" "\0" "EUC-TW" "\0"
"CP970" "\0" "EUC-KR" "\0"
"CP1089" "\0" "ISO-8859-6" "\0"
"CP1208" "\0" "UTF-8" "\0"
"CP1381" "\0" "GB2312" "\0"
"CP1386" "\0" "GBK" "\0"
"CP3372" "\0" "EUC-JP" "\0";
# endif
#endif
charset_aliases = cp;
@ -499,6 +529,8 @@ locale_charset (void)
ULONG cp[3];
ULONG cplen;
codeset = NULL;
/* Allow user to override the codeset, as set in the operating system,
with standard language environment variables. */
locale = getenv ("LC_ALL");
@ -530,10 +562,12 @@ locale_charset (void)
}
}
/* Resolve through the charset.alias file. */
codeset = locale;
/* For the POSIX locale, don't use the system's codepage. */
if (strcmp (locale, "C") == 0 || strcmp (locale, "POSIX") == 0)
codeset = "";
}
else
if (codeset == NULL)
{
/* OS/2 has a function returning the locale's codepage as a number. */
if (DosQueryCp (sizeof (cp), cp, &cplen))

View File

@ -1,5 +1,5 @@
/* Provide relocatable packages.
Copyright (C) 2003-2006, 2008-2011 Free Software Foundation, Inc.
Copyright (C) 2003-2006, 2008-2015 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
@ -47,6 +47,14 @@
# include <windows.h>
#endif
#ifdef __EMX__
# define INCL_DOS
# include <os2.h>
# define strcmp stricmp
# define strncmp strnicmp
#endif
#if DEPENDS_ON_LIBCHARSET
# include <libcharset.h>
#endif
@ -335,6 +343,45 @@ DllMain (HINSTANCE module_handle, DWORD event, LPVOID reserved)
return TRUE;
}
#elif defined __EMX__
extern int _CRT_init (void);
extern void _CRT_term (void);
extern void __ctordtorInit (void);
extern void __ctordtorTerm (void);
unsigned long _System
_DLL_InitTerm (unsigned long hModule, unsigned long ulFlag)
{
static char location[CCHMAXPATH];
switch (ulFlag)
{
case 0:
if (_CRT_init () == -1)
return 0;
__ctordtorInit();
/* See http://cyberkinetica.homeunix.net/os2tk45/cp1/1247_L2H_DosQueryModuleNameSy.html
for specification of DosQueryModuleName(). */
if (DosQueryModuleName (hModule, sizeof (location), location))
return 0;
_fnslashify (location);
shared_library_fullname = strdup (location);
break;
case 1:
__ctordtorTerm();
_CRT_term ();
break;
}
return 1;
}
#else /* Unix */
static void
@ -390,15 +437,16 @@ find_shared_library_fullname ()
#endif
}
#endif /* Native Windows / Unix */
#endif /* Native Windows / EMX / Unix */
/* Return the full pathname of the current shared library.
Return NULL if unknown.
Guaranteed to work only on Linux, Cygwin, and native Windows. */
Guaranteed to work only on Linux, EMX, Cygwin, and native Windows. */
static char *
get_shared_library_fullname ()
{
#if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__)
#if (!((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) \
&& !defined __EMX__)
static bool tried_find_shared_library_fullname;
if (!tried_find_shared_library_fullname)
{
@ -489,6 +537,27 @@ relocate (const char *pathname)
}
}
}
#ifdef __EMX__
if (pathname && ISSLASH (pathname[0]))
{
const char *unixroot = getenv ("UNIXROOT");
if (unixroot && HAS_DEVICE (unixroot) && !unixroot[2])
{
char *result = (char *) xmalloc (2 + strlen (pathname) + 1);
#ifdef NO_XMALLOC
if (result != NULL)
#endif
{
strcpy (result, unixroot);
strcpy (result + 2, pathname);
return result;
}
}
}
#endif
/* Nothing to relocate. */
return pathname;
}

View File

@ -1,5 +1,5 @@
/* vsprintf with automatic memory allocation.
Copyright (C) 1999, 2002-2012 Free Software Foundation, Inc.
Copyright (C) 1999, 2002-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -5179,18 +5179,21 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
/* SNPRINTF or sprintf failed. Save and use the errno
that it has set, if any. */
int saved_errno = errno;
if (saved_errno == 0)
{
if (dp->conversion == 'c' || dp->conversion == 's')
saved_errno = EILSEQ;
else
saved_errno = EINVAL;
}
if (!(result == resultbuf || result == NULL))
free (result);
if (buf_malloced != NULL)
free (buf_malloced);
CLEANUP ();
errno =
(saved_errno != 0
? saved_errno
: (dp->conversion == 'c' || dp->conversion == 's'
? EILSEQ
: EINVAL));
errno = saved_errno;
return NULL;
}

View File

@ -1,3 +1,7 @@
2015-01-22 Daiki Ueno <ueno@gnu.org>
* vasnprintf.c: Update copyright year.
2014-12-24 Daiki Ueno <ueno@gnu.org>
* gettext 0.19.4 released.

View File

@ -1,5 +1,5 @@
/* vsprintf with automatic memory allocation.
Copyright (C) 1999, 2002-2012 Free Software Foundation, Inc.
Copyright (C) 1999, 2002-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -5179,18 +5179,21 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
/* SNPRINTF or sprintf failed. Save and use the errno
that it has set, if any. */
int saved_errno = errno;
if (saved_errno == 0)
{
if (dp->conversion == 'c' || dp->conversion == 's')
saved_errno = EILSEQ;
else
saved_errno = EINVAL;
}
if (!(result == resultbuf || result == NULL))
free (result);
if (buf_malloced != NULL)
free (buf_malloced);
CLEANUP ();
errno =
(saved_errno != 0
? saved_errno
: (dp->conversion == 'c' || dp->conversion == 's'
? EILSEQ
: EINVAL));
errno = saved_errno;
return NULL;
}

View File

@ -1,5 +1,5 @@
# codeset.m4 serial 5 (gettext-0.18.2)
dnl Copyright (C) 2000-2002, 2006, 2008-2014 Free Software Foundation, Inc.
dnl Copyright (C) 2000-2002, 2006, 2008-2015 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.

View File

@ -1,6 +1,6 @@
dnl 'extern inline' a la ISO C99.
dnl Copyright 2012-2014 Free Software Foundation, Inc.
dnl Copyright 2012-2015 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.

View File

@ -1,5 +1,5 @@
# fcntl-o.m4 serial 4
dnl Copyright (C) 2006, 2009-2014 Free Software Foundation, Inc.
dnl Copyright (C) 2006, 2009-2015 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.

View File

@ -1,5 +1,5 @@
# gettext.m4 serial 66 (gettext-0.18.2)
dnl Copyright (C) 1995-2014 Free Software Foundation, Inc.
dnl Copyright (C) 1995-2015 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.

View File

@ -1,5 +1,5 @@
# glibc2.m4 serial 3
dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2014 Free Software Foundation,
dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2015 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,

View File

@ -1,5 +1,5 @@
# glibc21.m4 serial 5
dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2014 Free Software Foundation,
dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2015 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,

View File

@ -1,5 +1,5 @@
# iconv.m4 serial 19 (gettext-0.18.2)
dnl Copyright (C) 2000-2002, 2007-2014 Free Software Foundation, Inc.
dnl Copyright (C) 2000-2002, 2007-2015 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.

View File

@ -1,5 +1,5 @@
# intdiv0.m4 serial 6 (gettext-0.18.2)
dnl Copyright (C) 2002, 2007-2008, 2010-2014 Free Software Foundation, Inc.
dnl Copyright (C) 2002, 2007-2008, 2010-2015 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.

View File

@ -1,5 +1,5 @@
# intldir.m4 serial 2 (gettext-0.18)
dnl Copyright (C) 2006, 2009-2014 Free Software Foundation, Inc.
dnl Copyright (C) 2006, 2009-2015 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.

View File

@ -1,5 +1,5 @@
# intlmacosx.m4 serial 5 (gettext-0.18.2)
dnl Copyright (C) 2004-2014 Free Software Foundation, Inc.
dnl Copyright (C) 2004-2015 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.

View File

@ -1,5 +1,5 @@
# intmax.m4 serial 6 (gettext-0.18.2)
dnl Copyright (C) 2002-2005, 2008-2014 Free Software Foundation, Inc.
dnl Copyright (C) 2002-2005, 2008-2015 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.

View File

@ -1,5 +1,5 @@
# inttypes-pri.m4 serial 7 (gettext-0.18.2)
dnl Copyright (C) 1997-2002, 2006, 2008-2014 Free Software Foundation, Inc.
dnl Copyright (C) 1997-2002, 2006, 2008-2015 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.

View File

@ -1,5 +1,5 @@
# inttypes_h.m4 serial 10
dnl Copyright (C) 1997-2004, 2006, 2008-2014 Free Software Foundation, Inc.
dnl Copyright (C) 1997-2004, 2006, 2008-2015 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.

View File

@ -1,5 +1,5 @@
# lcmessage.m4 serial 7 (gettext-0.18.2)
dnl Copyright (C) 1995-2002, 2004-2005, 2008-2014 Free Software Foundation,
dnl Copyright (C) 1995-2002, 2004-2005, 2008-2015 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,

View File

@ -1,5 +1,5 @@
# lock.m4 serial 13 (gettext-0.18.2)
dnl Copyright (C) 2005-2014 Free Software Foundation, Inc.
dnl Copyright (C) 2005-2015 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.

View File

@ -1,5 +1,5 @@
# longlong.m4 serial 17
dnl Copyright (C) 1999-2007, 2009-2014 Free Software Foundation, Inc.
dnl Copyright (C) 1999-2007, 2009-2015 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.

View File

@ -1,5 +1,5 @@
# nls.m4 serial 5 (gettext-0.18)
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014 Free Software Foundation,
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2015 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,

View File

@ -1,5 +1,5 @@
# printf-posix.m4 serial 6 (gettext-0.18.2)
dnl Copyright (C) 2003, 2007, 2009-2014 Free Software Foundation, Inc.
dnl Copyright (C) 2003, 2007, 2009-2015 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.

View File

@ -1,5 +1,5 @@
# progtest.m4 serial 7 (gettext-0.18.2)
dnl Copyright (C) 1996-2003, 2005, 2008-2014 Free Software Foundation, Inc.
dnl Copyright (C) 1996-2003, 2005, 2008-2015 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.

View File

@ -1,5 +1,5 @@
# size_max.m4 serial 10
dnl Copyright (C) 2003, 2005-2006, 2008-2014 Free Software Foundation, Inc.
dnl Copyright (C) 2003, 2005-2006, 2008-2015 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.

View File

@ -1,5 +1,5 @@
# stdint_h.m4 serial 9
dnl Copyright (C) 1997-2004, 2006, 2008-2014 Free Software Foundation, Inc.
dnl Copyright (C) 1997-2004, 2006, 2008-2015 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.

View File

@ -1,5 +1,5 @@
# threadlib.m4 serial 11 (gettext-0.18.2)
dnl Copyright (C) 2005-2014 Free Software Foundation, Inc.
dnl Copyright (C) 2005-2015 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.

View File

@ -1,5 +1,5 @@
# uintmax_t.m4 serial 12
dnl Copyright (C) 1997-2004, 2007-2014 Free Software Foundation, Inc.
dnl Copyright (C) 1997-2004, 2007-2015 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.

View File

@ -1,5 +1,5 @@
# visibility.m4 serial 5 (gettext-0.18.2)
dnl Copyright (C) 2005, 2008, 2010-2014 Free Software Foundation, Inc.
dnl Copyright (C) 2005, 2008, 2010-2015 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.

View File

@ -1,5 +1,5 @@
# wchar_t.m4 serial 4 (gettext-0.18.2)
dnl Copyright (C) 2002-2003, 2008-2014 Free Software Foundation, Inc.
dnl Copyright (C) 2002-2003, 2008-2015 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.

View File

@ -1,5 +1,5 @@
# wint_t.m4 serial 5 (gettext-0.18.2)
dnl Copyright (C) 2003, 2007-2014 Free Software Foundation, Inc.
dnl Copyright (C) 2003, 2007-2015 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.

View File

@ -1,5 +1,5 @@
# xsize.m4 serial 5
dnl Copyright (C) 2003-2004, 2008-2014 Free Software Foundation, Inc.
dnl Copyright (C) 2003-2004, 2008-2015 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.