Commit e50c5f39 authored by Werner Koch's avatar Werner Koch

No more warnings for AMD64 (at least when cross-compiling). Thus tehre is a

good chance that gpg2 will now work. 
Other cleanups.
Updated gettext.
parent 5885142c
This source diff could not be displayed because it is too large. You can view the blob instead.
2006-11-21 Werner Koch <wk@g10code.com>
* configure.ac [AH_BOTTOM]: Disable PTH soft mapping.
(AC_CHECK_SIZEOF): Check for time_t.
(BUILD_INCLUDED_LIBINTL): Remove AM_PO_SUBDIRS as it is not
required for C.
2006-11-15 Werner Koch <wk@g10code.com> 2006-11-15 Werner Koch <wk@g10code.com>
* autogen.sh: Add convenience option --build-amd64. * autogen.sh: Add convenience option --build-amd64.
......
2006-11-21 Werner Koch <wk@g10code.com>
* estream.c: Remove explicit Pth soft mapping diabling becuase it
is now done in config.h.
2006-11-15 Werner Koch <wk@g10code.com> 2006-11-15 Werner Koch <wk@g10code.com>
* estream.c: Disabled Pth soft mapping. * estream.c: Disabled Pth soft mapping.
......
...@@ -46,9 +46,6 @@ ...@@ -46,9 +46,6 @@
#endif #endif
#ifdef HAVE_PTH #ifdef HAVE_PTH
/* We explicitly need to disable soft mapping as Debian currently
enables it for no reason. */
# define PTH_SYSCALL_SOFT 0
# include <pth.h> # include <pth.h>
#endif #endif
......
...@@ -422,6 +422,11 @@ AH_BOTTOM([ ...@@ -422,6 +422,11 @@ AH_BOTTOM([
/* We don't want the old assuan codes anymore. */ /* We don't want the old assuan codes anymore. */
#define _ASSUAN_ONLY_GPG_ERRORS 1 #define _ASSUAN_ONLY_GPG_ERRORS 1
/* We explicitly need to disable PTH's soft mapping as Debian
currently enables it by default for no reason. */
#define PTH_SYSCALL_SOFT 0
#endif /*GNUPG_CONFIG_H_INCLUDED*/ #endif /*GNUPG_CONFIG_H_INCLUDED*/
]) ])
...@@ -847,7 +852,7 @@ AC_DEFINE_UNQUOTED(PRINTABLE_OS_NAME, "$PRINTABLE_OS_NAME", ...@@ -847,7 +852,7 @@ AC_DEFINE_UNQUOTED(PRINTABLE_OS_NAME, "$PRINTABLE_OS_NAME",
# #
# Check for gettext # Check for gettext
# #
AM_GNU_GETTEXT_VERSION(0.14.1) AM_GNU_GETTEXT_VERSION([0.15])
if test "$try_gettext" = yes; then if test "$try_gettext" = yes; then
AM_GNU_GETTEXT(,[need-ngettext]) AM_GNU_GETTEXT(,[need-ngettext])
...@@ -863,7 +868,6 @@ else ...@@ -863,7 +868,6 @@ else
AC_SUBST(USE_NLS) AC_SUBST(USE_NLS)
AC_SUBST(USE_INCLUDED_LIBINTL) AC_SUBST(USE_INCLUDED_LIBINTL)
AC_SUBST(BUILD_INCLUDED_LIBINTL) AC_SUBST(BUILD_INCLUDED_LIBINTL)
AM_PO_SUBDIRS
fi fi
...@@ -881,6 +885,7 @@ fi ...@@ -881,6 +885,7 @@ fi
AC_HEADER_STDC AC_HEADER_STDC
AC_CHECK_HEADERS([string.h unistd.h langinfo.h termio.h locale.h getopt.h]) AC_CHECK_HEADERS([string.h unistd.h langinfo.h termio.h locale.h getopt.h])
AC_CHECK_HEADERS([pty.h pwd.h inttypes.h]) AC_CHECK_HEADERS([pty.h pwd.h inttypes.h])
AC_HEADER_TIME
# #
...@@ -914,6 +919,21 @@ AC_CHECK_SIZEOF(unsigned short) ...@@ -914,6 +919,21 @@ AC_CHECK_SIZEOF(unsigned short)
AC_CHECK_SIZEOF(unsigned int) AC_CHECK_SIZEOF(unsigned int)
AC_CHECK_SIZEOF(unsigned long) AC_CHECK_SIZEOF(unsigned long)
AC_CHECK_SIZEOF(unsigned long long) AC_CHECK_SIZEOF(unsigned long long)
AC_CHECK_SIZEOF(time_t,,[[
#include <stdio.h>
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
#else
# if HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
#endif
]])
# Ensure that we have UINT64_C before we bother to check for uint64_t # Ensure that we have UINT64_C before we bother to check for uint64_t
# Fixme: really needed in gnupg? I think it is only useful in libcgrypt. # Fixme: really needed in gnupg? I think it is only useful in libcgrypt.
AC_CACHE_CHECK([for UINT64_C],[gnupg_cv_uint64_c_works], AC_CACHE_CHECK([for UINT64_C],[gnupg_cv_uint64_c_works],
......
2006-11-21 Werner Koch <wk@g10code.com>
* keygen.c (ask_expire_interval): Print y2038 warning only for 32
bit time_t.
(save_unprotected_key_to_card): Made RSA_N_LEN et al a size_t.
Cast printf args.
* seckey-cert.c (do_check): Made NBYTES a size_t.
(do_check): Made NDATA a size_t.
(protect_secret_key): Made NARR a size_t.
(protect_secret_key): Made NVYES a size_t.
* pubkey-enc.c (get_it): Made INDATALEN a size_t.
(get_it): Made NFRAME a size_t.
* keyid.c (hash_public_key): Made NBITS an unsigned int.
* misc.c (checksum_mpi): Made NBYTES a size_t.
(openpgp_pk_test_algo2): Made USE_BUF a size_t.
* seskey.c (encode_session_key): Made NFRAME a size_t.
(do_encode_md): Ditto.
(encode_md_value): Cast size_t argument of printf.
(encode_md_value): Ditto.
2006-11-10 Werner Koch <wk@g10code.com> 2006-11-10 Werner Koch <wk@g10code.com>
* parse-packet.c (mpi_read): Changed NREAD to size_t to match the * parse-packet.c (mpi_read): Changed NREAD to size_t to match the
......
...@@ -1849,12 +1849,12 @@ ask_expire_interval(int object,const char *def_expire) ...@@ -1849,12 +1849,12 @@ ask_expire_interval(int object,const char *def_expire)
? _("Key expires at %s\n") ? _("Key expires at %s\n")
: _("Signature expires at %s\n"), : _("Signature expires at %s\n"),
asctimestamp((ulong)(curtime + interval) ) ); asctimestamp((ulong)(curtime + interval) ) );
/* FIXME: This check yields warning on alhas: Write a #if SIZEOF_TIME_T <= 4
configure check and to this check here only for 32 bit if ( (time_t)((ulong)(curtime+interval)) < 0 )
machines */ tty_printf (_("Your system can't display dates beyond 2038.\n"
if( (time_t)((ulong)(curtime+interval)) < 0 ) "However, it will be correctly handled up to"
tty_printf(_("Your system can't display dates beyond 2038.\n" " 2106.\n"));
"However, it will be correctly handled up to 2106.\n")); #endif /*SIZEOF_TIME_T*/
} }
if( cpr_enabled() || cpr_get_answer_is_yes("keygen.valid.okay", if( cpr_enabled() || cpr_get_answer_is_yes("keygen.valid.okay",
...@@ -3824,7 +3824,7 @@ save_unprotected_key_to_card (PKT_secret_key *sk, int keyno) ...@@ -3824,7 +3824,7 @@ save_unprotected_key_to_card (PKT_secret_key *sk, int keyno)
unsigned char *rsa_e = NULL; unsigned char *rsa_e = NULL;
unsigned char *rsa_p = NULL; unsigned char *rsa_p = NULL;
unsigned char *rsa_q = NULL; unsigned char *rsa_q = NULL;
unsigned int rsa_n_len, rsa_e_len, rsa_p_len, rsa_q_len; size_t rsa_n_len, rsa_e_len, rsa_p_len, rsa_q_len;
unsigned char *sexp = NULL; unsigned char *sexp = NULL;
unsigned char *p; unsigned char *p;
char numbuf[55], numbuf2[50]; char numbuf[55], numbuf2[50];
...@@ -3849,22 +3849,22 @@ save_unprotected_key_to_card (PKT_secret_key *sk, int keyno) ...@@ -3849,22 +3849,22 @@ save_unprotected_key_to_card (PKT_secret_key *sk, int keyno)
+ 4*sizeof (numbuf) + 25 + sizeof(numbuf) + 20); + 4*sizeof (numbuf) + 25 + sizeof(numbuf) + 20);
p = stpcpy (p,"(11:private-key(3:rsa(1:n"); p = stpcpy (p,"(11:private-key(3:rsa(1:n");
sprintf (numbuf, "%u:", rsa_n_len); sprintf (numbuf, "%u:", (unsigned int)rsa_n_len);
p = stpcpy (p, numbuf); p = stpcpy (p, numbuf);
memcpy (p, rsa_n, rsa_n_len); memcpy (p, rsa_n, rsa_n_len);
p += rsa_n_len; p += rsa_n_len;
sprintf (numbuf, ")(1:e%u:", rsa_e_len); sprintf (numbuf, ")(1:e%u:", (unsigned int)rsa_e_len);
p = stpcpy (p, numbuf); p = stpcpy (p, numbuf);
memcpy (p, rsa_e, rsa_e_len); memcpy (p, rsa_e, rsa_e_len);
p += rsa_e_len; p += rsa_e_len;
sprintf (numbuf, ")(1:p%u:", rsa_p_len); sprintf (numbuf, ")(1:p%u:", (unsigned int)rsa_p_len);
p = stpcpy (p, numbuf); p = stpcpy (p, numbuf);
memcpy (p, rsa_p, rsa_p_len); memcpy (p, rsa_p, rsa_p_len);
p += rsa_p_len; p += rsa_p_len;
sprintf (numbuf, ")(1:q%u:", rsa_q_len); sprintf (numbuf, ")(1:q%u:", (unsigned int)rsa_q_len);
p = stpcpy (p, numbuf); p = stpcpy (p, numbuf);
memcpy (p, rsa_q, rsa_q_len); memcpy (p, rsa_q, rsa_q_len);
p += rsa_q_len; p += rsa_q_len;
......
...@@ -59,7 +59,8 @@ hash_public_key( gcry_md_hd_t md, PKT_public_key *pk ) ...@@ -59,7 +59,8 @@ hash_public_key( gcry_md_hd_t md, PKT_public_key *pk )
unsigned int nn[PUBKEY_MAX_NPKEY]; unsigned int nn[PUBKEY_MAX_NPKEY];
byte *pp[PUBKEY_MAX_NPKEY]; byte *pp[PUBKEY_MAX_NPKEY];
int i; int i;
size_t nbits, nbytes; unsigned int nbits;
size_t nbytes;
int npkey = pubkey_get_npkey (pk->pubkey_algo); int npkey = pubkey_get_npkey (pk->pubkey_algo);
/* Two extra bytes for the expiration date in v3 */ /* Two extra bytes for the expiration date in v3 */
......
...@@ -297,7 +297,7 @@ checksum_mpi (gcry_mpi_t a) ...@@ -297,7 +297,7 @@ checksum_mpi (gcry_mpi_t a)
{ {
u16 csum; u16 csum;
byte *buffer; byte *buffer;
unsigned int nbytes; size_t nbytes;
if ( gcry_mpi_print (GCRYMPI_FMT_PGP, NULL, 0, &nbytes, a) ) if ( gcry_mpi_print (GCRYMPI_FMT_PGP, NULL, 0, &nbytes, a) )
BUG (); BUG ();
...@@ -426,7 +426,7 @@ openpgp_pk_test_algo( int algo ) ...@@ -426,7 +426,7 @@ openpgp_pk_test_algo( int algo )
int int
openpgp_pk_test_algo2( int algo, unsigned int use ) openpgp_pk_test_algo2( int algo, unsigned int use )
{ {
int use_buf = use; size_t use_buf = use;
if (algo == GCRY_PK_ELG_E) if (algo == GCRY_PK_ELG_E)
algo = GCRY_PK_ELG; algo = GCRY_PK_ELG;
......
...@@ -155,7 +155,8 @@ get_it( PKT_pubkey_enc *enc, DEK *dek, PKT_secret_key *sk, u32 *keyid ) ...@@ -155,7 +155,8 @@ get_it( PKT_pubkey_enc *enc, DEK *dek, PKT_secret_key *sk, u32 *keyid )
int rc; int rc;
gcry_mpi_t plain_dek = NULL; gcry_mpi_t plain_dek = NULL;
byte *frame = NULL; byte *frame = NULL;
unsigned n, nframe; unsigned int n;
size_t nframe;
u16 csum, csum2; u16 csum, csum2;
int card = 0; int card = 0;
...@@ -167,7 +168,7 @@ get_it( PKT_pubkey_enc *enc, DEK *dek, PKT_secret_key *sk, u32 *keyid ) ...@@ -167,7 +168,7 @@ get_it( PKT_pubkey_enc *enc, DEK *dek, PKT_secret_key *sk, u32 *keyid )
size_t rbuflen; size_t rbuflen;
char *snbuf; char *snbuf;
unsigned char *indata = NULL; unsigned char *indata = NULL;
unsigned int indatalen; size_t indatalen;
snbuf = serialno_and_fpr_from_sk (sk->protect.iv, sk->protect.ivlen, sk); snbuf = serialno_and_fpr_from_sk (sk->protect.iv, sk->protect.ivlen, sk);
......
...@@ -45,7 +45,7 @@ do_check( PKT_secret_key *sk, const char *tryagain_text, int mode, ...@@ -45,7 +45,7 @@ do_check( PKT_secret_key *sk, const char *tryagain_text, int mode,
byte *buffer; byte *buffer;
u16 csum=0; u16 csum=0;
int i, res; int i, res;
unsigned int nbytes; size_t nbytes;
if( sk->is_protected ) { /* remove the protection */ if( sk->is_protected ) { /* remove the protection */
DEK *dek = NULL; DEK *dek = NULL;
...@@ -194,7 +194,7 @@ do_check( PKT_secret_key *sk, const char *tryagain_text, int mode, ...@@ -194,7 +194,7 @@ do_check( PKT_secret_key *sk, const char *tryagain_text, int mode,
for(i=pubkey_get_npkey(sk->pubkey_algo); for(i=pubkey_get_npkey(sk->pubkey_algo);
i < pubkey_get_nskey(sk->pubkey_algo); i++ ) { i < pubkey_get_nskey(sk->pubkey_algo); i++ ) {
byte *p; byte *p;
int ndata; size_t ndata;
unsigned int ndatabits; unsigned int ndatabits;
assert (gcry_mpi_get_flag (sk->skey[i], GCRYMPI_FLAG_OPAQUE)); assert (gcry_mpi_get_flag (sk->skey[i], GCRYMPI_FLAG_OPAQUE));
...@@ -337,7 +337,7 @@ protect_secret_key( PKT_secret_key *sk, DEK *dek ) ...@@ -337,7 +337,7 @@ protect_secret_key( PKT_secret_key *sk, DEK *dek )
{ {
int i,j, rc = 0; int i,j, rc = 0;
byte *buffer; byte *buffer;
unsigned nbytes; size_t nbytes;
u16 csum; u16 csum;
if( !dek ) if( !dek )
...@@ -370,8 +370,8 @@ protect_secret_key( PKT_secret_key *sk, DEK *dek ) ...@@ -370,8 +370,8 @@ protect_secret_key( PKT_secret_key *sk, DEK *dek )
gcry_cipher_setiv (cipher_hd, sk->protect.iv, sk->protect.ivlen); gcry_cipher_setiv (cipher_hd, sk->protect.iv, sk->protect.ivlen);
if( sk->version >= 4 ) { if( sk->version >= 4 ) {
byte *bufarr[PUBKEY_MAX_NSKEY]; byte *bufarr[PUBKEY_MAX_NSKEY];
unsigned narr[PUBKEY_MAX_NSKEY]; size_t narr[PUBKEY_MAX_NSKEY];
unsigned nbits[PUBKEY_MAX_NSKEY]; unsigned int nbits[PUBKEY_MAX_NSKEY];
int ndata=0; int ndata=0;
byte *p, *data; byte *p, *data;
......
...@@ -77,7 +77,7 @@ make_session_key( DEK *dek ) ...@@ -77,7 +77,7 @@ make_session_key( DEK *dek )
gcry_mpi_t gcry_mpi_t
encode_session_key (DEK *dek, unsigned int nbits) encode_session_key (DEK *dek, unsigned int nbits)
{ {
int nframe = (nbits+7) / 8; size_t nframe = (nbits+7) / 8;
byte *p; byte *p;
byte *frame; byte *frame;
int i,n; int i,n;
...@@ -157,7 +157,7 @@ static gcry_mpi_t ...@@ -157,7 +157,7 @@ static gcry_mpi_t
do_encode_md( gcry_md_hd_t md, int algo, size_t len, unsigned nbits, do_encode_md( gcry_md_hd_t md, int algo, size_t len, unsigned nbits,
const byte *asn, size_t asnlen ) const byte *asn, size_t asnlen )
{ {
int nframe = (nbits+7) / 8; size_t nframe = (nbits+7) / 8;
byte *frame; byte *frame;
int i,n; int i,n;
gcry_mpi_t a; gcry_mpi_t a;
...@@ -237,11 +237,11 @@ encode_md_value (PKT_public_key *pk, PKT_secret_key *sk, ...@@ -237,11 +237,11 @@ encode_md_value (PKT_public_key *pk, PKT_secret_key *sk,
or something like that, which would look correct but allow or something like that, which would look correct but allow
trivial forgeries. Yes, I know this rules out using MD5 with trivial forgeries. Yes, I know this rules out using MD5 with
DSA. ;) */ DSA. ;) */
if (qbytes < 160)
if(qbytes<160)
{ {
log_error(_("DSA key %s uses an unsafe (%u bit) hash\n"), log_error (_("DSA key %s uses an unsafe (%u bit) hash\n"),
pk?keystr_from_pk(pk):keystr_from_sk(sk),qbytes); pk?keystr_from_pk(pk):keystr_from_sk(sk),
(unsigned int)qbytes);
return NULL; return NULL;
} }
...@@ -249,11 +249,11 @@ encode_md_value (PKT_public_key *pk, PKT_secret_key *sk, ...@@ -249,11 +249,11 @@ encode_md_value (PKT_public_key *pk, PKT_secret_key *sk,
/* Check if we're too short. Too long is safe as we'll /* Check if we're too short. Too long is safe as we'll
automatically left-truncate. */ automatically left-truncate. */
if (gcry_md_get_algo_dlen (hash_algo) < qbytes)
if(gcry_md_get_algo_dlen (hash_algo) < qbytes)
{ {
log_error(_("DSA key %s requires a %u bit or larger hash\n"), log_error (_("DSA key %s requires a %u bit or larger hash\n"),
pk?keystr_from_pk(pk):keystr_from_sk(sk),qbytes*8); pk?keystr_from_pk(pk):keystr_from_sk(sk),
(unsigned int)(qbytes*8));
return NULL; return NULL;
} }
......
2004-01-29 GNU <bug-gnu-gettext@gnu.org> 2006-07-21 GNU <bug-gnu-gettext@gnu.org>
* Version 0.14.1 released. * Version 0.15 released.
This diff is collapsed.
GNU gettext library from gettext-0.14.1 GNU gettext library from gettext-0.15
/* Implementation of the bindtextdomain(3) function /* Implementation of the bindtextdomain(3) function
Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc. Copyright (C) 1995-1998, 2000-2003, 2005-2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published under the terms of the GNU Library General Public License as published
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
You should have received a copy of the GNU Library General Public You should have received a copy of the GNU Library General Public
License along with this program; if not, write to the Free Software License along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA. */ USA. */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
...@@ -24,21 +24,21 @@ ...@@ -24,21 +24,21 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "gettextP.h"
#ifdef _LIBC #ifdef _LIBC
# include <libintl.h> # include <libintl.h>
#else #else
# include "libgnuintl.h" # include "libgnuintl.h"
#endif #endif
#include "gettextP.h"
/* Handle multi-threaded applications. */
#ifdef _LIBC #ifdef _LIBC
/* We have to handle multi-threaded applications. */
# include <bits/libc-lock.h> # include <bits/libc-lock.h>
# define gl_rwlock_define __libc_rwlock_define
# define gl_rwlock_wrlock __libc_rwlock_wrlock
# define gl_rwlock_unlock __libc_rwlock_unlock
#else #else
/* Provide dummy implementation if this is outside glibc. */ # include "lock.h"
# define __libc_rwlock_define(CLASS, NAME)
# define __libc_rwlock_wrlock(NAME)
# define __libc_rwlock_unlock(NAME)
#endif #endif
/* The internal variables in the standalone libintl.a must have different /* The internal variables in the standalone libintl.a must have different
...@@ -59,16 +59,14 @@ ...@@ -59,16 +59,14 @@
/* Contains the default location of the message catalogs. */ /* Contains the default location of the message catalogs. */
extern const char _nl_default_dirname[]; extern const char _nl_default_dirname[];
#ifdef _LIBC #ifdef _LIBC
extern const char _nl_default_dirname_internal[] attribute_hidden; libc_hidden_proto (_nl_default_dirname)
#else
# define INTUSE(name) name
#endif #endif
/* List with bindings of specific domains. */ /* List with bindings of specific domains. */
extern struct binding *_nl_domain_bindings; extern struct binding *_nl_domain_bindings;
/* Lock variable to protect the global data in the gettext implementation. */ /* Lock variable to protect the global data in the gettext implementation. */
__libc_rwlock_define (extern, _nl_state_lock attribute_hidden) gl_rwlock_define (extern, _nl_state_lock attribute_hidden)
/* Names for the libintl functions are a problem. They must not clash /* Names for the libintl functions are a problem. They must not clash
...@@ -109,7 +107,7 @@ set_binding_values (const char *domainname, ...@@ -109,7 +107,7 @@ set_binding_values (const char *domainname,
return; return;
} }
__libc_rwlock_wrlock (_nl_state_lock); gl_rwlock_wrlock (_nl_state_lock);
modified = 0; modified = 0;
...@@ -144,8 +142,8 @@ set_binding_values (const char *domainname, ...@@ -144,8 +142,8 @@ set_binding_values (const char *domainname,
char *result = binding->dirname; char *result = binding->dirname;
if (strcmp (dirname, result) != 0) if (strcmp (dirname, result) != 0)
{ {
if (strcmp (dirname, INTUSE(_nl_default_dirname)) == 0) if (strcmp (dirname, _nl_default_dirname) == 0)
result = (char *) INTUSE(_nl_default_dirname); result = (char *) _nl_default_dirname;
else else
{ {
#if defined _LIBC || defined HAVE_STRDUP #if defined _LIBC || defined HAVE_STRDUP
...@@ -160,7 +158,7 @@ set_binding_values (const char *domainname, ...@@ -160,7 +158,7 @@ set_binding_values (const char *domainname,
if (__builtin_expect (result != NULL, 1)) if (__builtin_expect (result != NULL, 1))
{ {
if (binding->dirname != INTUSE(_nl_default_dirname)) if (binding->dirname != _nl_default_dirname)
free (binding->dirname); free (binding->dirname);
binding->dirname = result; binding->dirname = result;
...@@ -201,7 +199,6 @@ set_binding_values (const char *domainname, ...@@ -201,7 +199,6 @@ set_binding_values (const char *domainname,
free (binding->codeset); free (binding->codeset);
binding->codeset = result; binding->codeset = result;
binding->codeset_cntr++;
modified = 1; modified = 1;
} }
} }
...@@ -214,7 +211,7 @@ set_binding_values (const char *domainname, ...@@ -214,7 +211,7 @@ set_binding_values (const char *domainname,
{ {
/* Simply return the default values. */ /* Simply return the default values. */
if (dirnamep) if (dirnamep)
*dirnamep = INTUSE(_nl_default_dirname); *dirnamep = _nl_default_dirname;
if (codesetp) if (codesetp)
*codesetp = NULL; *codesetp = NULL;
} }
...@@ -236,11 +233,11 @@ set_binding_values (const char *domainname, ...@@ -236,11 +233,11 @@ set_binding_values (const char *domainname,
if (dirname == NULL) if (dirname == NULL)
/* The default value. */ /* The default value. */
dirname = INTUSE(_nl_default_dirname); dirname = _nl_default_dirname;
else else
{ {
if (strcmp (dirname, INTUSE(_nl_default_dirname)) == 0) if (strcmp (dirname, _nl_default_dirname) == 0)
dirname = INTUSE(_nl_default_dirname); dirname = _nl_default_dirname;
else else
{ {
char *result; char *result;
...@@ -263,9 +260,7 @@ set_binding_values (const char *domainname, ...@@ -263,9 +260,7 @@ set_binding_values (const char *domainname,
} }
else else
/* The default value. */ /* The default value. */
new_binding->dirname = (char *) INTUSE(_nl_default_dirname); new_binding->dirname = (char *) _nl_default_dirname;
new_binding->codeset_cntr = 0;
if (codesetp) if (codesetp)
{ {
...@@ -287,7 +282,6 @@ set_binding_values (const char *domainname, ...@@ -287,7 +282,6 @@ set_binding_values (const char *domainname,
memcpy (result, codeset, len); memcpy (result, codeset, len);
#endif #endif
codeset = result; codeset = result;
new_binding->codeset_cntr++;
} }
*codesetp = codeset; *codesetp = codeset;
new_binding->codeset = (char *) codeset; new_binding->codeset = (char *) codeset;
...@@ -319,7 +313,7 @@ set_binding_values (const char *domainname, ...@@ -319,7 +313,7 @@ set_binding_values (const char *domainname,
if (0) if (0)
{ {
failed_codeset: failed_codeset:
if (new_binding->dirname != INTUSE(_nl_default_dirname)) if (new_binding->dirname != _nl_default_dirname)
free (new_binding->dirname); free (new_binding->dirname);
failed_dirname: failed_dirname:
free (new_binding); free (new_binding);
...@@ -335,7 +329,7 @@ set_binding_values (const char *domainname, ...@@ -335,7 +329,7 @@ set_binding_values (const char *domainname,
if (modified) if (modified)
++_nl_msg_cat_cntr; ++_nl_msg_cat_cntr;
__libc_rwlock_unlock (_nl_state_lock); gl_rwlock_unlock (_nl_state_lock);
} }
/* Specify that the DOMAINNAME message catalog will be found /* Specify that the DOMAINNAME message catalog will be found
......
#! /bin/sh #! /bin/sh
# Output a system dependent table of character encoding aliases. # Output a system dependent table of character encoding aliases.
# #
# Copyright (C) 2000-2004 Free Software Foundation, Inc. # Copyright (C) 2000-2004, 2006 Free Software Foundation, Inc.
# #
# This program is free software; you can redistribute it and/or modify it # This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU Library General Public License as published # under the terms of the GNU Library General Public License as published
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
# #
# You should have received a copy of the GNU Library General Public # You should have received a copy of the GNU Library General Public
# License along with this program; if not, write to the Free Software # License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA. # USA.
# #
# The table consists of lines of the form # The table consists of lines of the form
...@@ -31,21 +31,21 @@ ...@@ -31,21 +31,21 @@
# The current list of GNU canonical charset names is as follows. # The current list of GNU canonical charset names is as follows.
# #
# name MIME? used by which systems # name MIME? used by which systems
# ASCII, ANSI_X3.4-1968 glibc solaris freebsd darwin # ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin
# ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd darwin # ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd darwin
# ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd darwin # ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd darwin
# ISO-8859-3 Y glibc solaris # ISO-8859-3 Y glibc solaris
# ISO-8859-4 Y osf solaris freebsd darwin # ISO-8859-4 Y osf solaris freebsd netbsd darwin
# ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd darwin