Skip to content

Commit

Permalink
Updated to fedora-glibc-20080408T0706
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Jelinek committed Apr 8, 2008
1 parent 09b731a commit e6e467b
Show file tree
Hide file tree
Showing 44 changed files with 1,011 additions and 2,495 deletions.
95 changes: 95 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,98 @@
2008-04-07 Ulrich Drepper <drepper@redhat.com>

[BZ #6042]
* sysdeps/unix/sysv/linux/net/ethernet.h: Add a few more
ETHERTYPE_* definitions.
Patch partly by Aurelien Jarno <aurelien@aurel32.net>.

2008-04-07 Jakub Jelinek <jakub@redhat.com>

* stdlib/mbtowc.c (__no_r_state): Remove.
(mbtowc): New static state variable. Use it instead of
__no_r_state.
* stdlib/wctomb.c (__no_r_state): Remove extern decl.
(__wctomb_state): New hidden variable.
(wctomb): Use __wctomb_state instead of __no_r_state.
* debug/wctomb_chk.c (__no_r_state): Remove extern decl.
(__wctomb_state): New extern decl.
(__wctomb_chk): Use __wctomb_state instead of __no_r_state.

2008-04-07 Ulrich Drepper <drepper@redhat.com>

[BZ #5475]
* resolv/res_init.c: Handle scope IDs in resolv.conf.

2008-04-07 Jakub Jelinek <jakub@redhat.com>

* malloc/mtrace.pl: Use $@ instead of $* to keep perl 5.10 quiet.

2008-04-06 Ulrich Drepper <drepper@redhat.com>

* po/nl.po: Update from translation team.

2008-03-31 Ulrich Drepper <drepper@redhat.com>

[BZ #6007]
* string/strfry.c: Handle empty strings again.

2008-03-30 Ulrich Drepper <drepper@redhat.com>

[BZ #5443]
* intl/dcigettext.c (__dcigettext): Get reader lock for locale data
before looking for translation.
* locale/duplocale.c: Transform __libc_setlocale_lock into rwlock.
* locale/freelocale.c: Likewise.
* locale/newlocale.c: Likewise.
* locale/setlocale.c: Likewise.
Based partially on a patch by ryo@np.css.fujitsu.com.

2008-03-30 Jakub Jelinek <jakub@redhat.com>

* intl/dcigettext.c (_nl_find_msg): Reread nconversions after
acquiring wrlock. Do conv_tab allocation while holding lock.
* intl/Makefile: Add rules to build and run tst-gettext6.
* intl/tst-gettext6.c: New test.
* intl/tst-gettext6.sh: New file.

2008-03-30 Ulrich Drepper <drepper@redhat.com>

* po/nl.po: Update from translation team.

* sysdeps/unix/opendir.c (__alloc_dir): If allocation fails for size
provided through st_blksize, try the default size before giving up.

2008-03-29 Ulrich Drepper <drepper@redhat.com>

* stdio-common/vfprintf.c (vfprintf): Correct overflow test.

[BZ #5939]
* sysdeps/posix/tempname.c (__gen_tempname): Correct flag selection.

* posix/getopt.c (_getopt_internal_r): Remove old POSIX-demanded
error message. POSIX today does not require the messages to be in
a specific form. Suggested by Jim Meyering <jim@meyering.net>.

[BZ #5979]
* sunrpc/auth_unix.c: Unify printed strings.
* sunrpc/clnt_tcp.c: Likewise.
* sunrpc/clnt_udp.c: Likewise.
* sunrpc/clnt_unix.c: Likewise.
* sunrpc/svc_tcp.c: Likewise.
* sunrpc/svc_udp.c: Likewise.
* sunrpc/svc_unix.c: Likewise.
* sunrpc/xdr.c: Likewise.
* sunrpc/xdr_array.c: Likewise.
* sunrpc/xdr_rec.c: Likewise.
* sunrpc/xdr_ref.c: Likewise.
* locale/programs/ld-time.c (time_finish): Unify messages.
* locale/programs/locfile.c (handle_copy): Fix typo.
* nscd/nscd.c (options): Fix typo.

[BZ #5995]
* stdlib/strtod_l.c: Use correct sign for result in one more
underflow case.
Patch by Eric Blake <ebb9@byu.net>.

2008-03-27 Jakub Jelinek <jakub@redhat.com>

* sysdeps/unix/sysv/linux/wordsize-64/syscalls.list: Add open
Expand Down
6 changes: 3 additions & 3 deletions debug/wctomb_chk.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (C) 2005 Free Software Foundation, Inc.
/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
Expand All @@ -21,7 +21,7 @@
#include <wcsmbs/wcsmbsload.h>


extern mbstate_t __no_r_state attribute_hidden; /* Defined in mbtowc.c. */
extern mbstate_t __wctomb_state attribute_hidden; /* Defined in wctomb.c. */


int
Expand All @@ -32,5 +32,5 @@ __wctomb_chk (char *s, wchar_t wchar, size_t buflen)
if (buflen < MB_CUR_MAX)
__chk_fail ();

return __wcrtomb (s, wchar, &__no_r_state);
return __wcrtomb (s, wchar, &__wctomb_state);
}
4 changes: 2 additions & 2 deletions fedora/branch.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ glibc-branch := fedora
glibc-base := HEAD
DIST_BRANCH := devel
COLLECTION := dist-f8
fedora-sync-date := 2008-03-28 13:47 UTC
fedora-sync-tag := fedora-glibc-20080328T1347
fedora-sync-date := 2008-04-08 07:06 UTC
fedora-sync-tag := fedora-glibc-20080408T0706
13 changes: 9 additions & 4 deletions intl/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 1995-2003, 2005 Free Software Foundation, Inc.
# Copyright (C) 1995-2003, 2005, 2008 Free Software Foundation, Inc.
# This file is part of the GNU C Library.

# The GNU C Library is free software; you can redistribute it and/or
Expand Down Expand Up @@ -32,11 +32,11 @@ distribute = gmo.h gettextP.h hash-string.h loadinfo.h locale.alias \
tst-codeset.sh tstcodeset.po \
tst-gettext3.sh \
tst-gettext4.sh tst-gettext4-de.po tst-gettext4-fr.po \
tst-gettext5.sh
tst-gettext5.sh tst-gettext6.sh

include ../Makeconfig

multithread-test-srcs := tst-gettext4 tst-gettext5
multithread-test-srcs := tst-gettext4 tst-gettext5 tst-gettext6
test-srcs := tst-gettext tst-translit tst-gettext2 tst-codeset tst-gettext3
ifeq ($(have-thread-library),yes)
test-srcs += $(multithread-test-srcs)
Expand Down Expand Up @@ -67,7 +67,8 @@ ifneq ($(strip $(MSGFMT)),:)
tests: $(objpfx)tst-translit.out $(objpfx)tst-gettext2.out \
$(objpfx)tst-codeset.out $(objpfx)tst-gettext3.out
ifeq ($(have-thread-library),yes)
tests: $(objpfx)tst-gettext4.out $(objpfx)tst-gettext5.out
tests: $(objpfx)tst-gettext4.out $(objpfx)tst-gettext5.out \
$(objpfx)tst-gettext6.out
endif
ifneq (no,$(PERL))
tests: $(objpfx)mtrace-tst-gettext
Expand All @@ -90,6 +91,8 @@ $(objpfx)tst-gettext4.out: tst-gettext4.sh $(objpfx)tst-gettext4
$(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)intl/
$(objpfx)tst-gettext5.out: tst-gettext5.sh $(objpfx)tst-gettext5
$(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)intl/
$(objpfx)tst-gettext6.out: tst-gettext6.sh $(objpfx)tst-gettext6
$(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)intl/
endif
endif

Expand All @@ -104,6 +107,7 @@ CFLAGS-tst-codeset.c = -DOBJPFX=\"$(objpfx)\"
CFLAGS-tst-gettext3.c = -DOBJPFX=\"$(objpfx)\"
CFLAGS-tst-gettext4.c = -DOBJPFX=\"$(objpfx)\"
CFLAGS-tst-gettext5.c = -DOBJPFX=\"$(objpfx)\"
CFLAGS-tst-gettext6.c = -DOBJPFX=\"$(objpfx)\"

ifeq ($(have-thread-library),yes)
ifeq (yes,$(build-shared))
Expand All @@ -122,6 +126,7 @@ $(objpfx)tst-codeset.out: $(objpfx)tst-gettext.out
$(objpfx)tst-gettext3.out: $(objpfx)tst-gettext.out
$(objpfx)tst-gettext4.out: $(objpfx)tst-gettext.out
$(objpfx)tst-gettext5.out: $(objpfx)tst-gettext.out
$(objpfx)tst-gettext6.out: $(objpfx)tst-gettext.out

CPPFLAGS += -D'LOCALEDIR="$(msgcatdir)"' \
-D'LOCALE_ALIAS_PATH="$(msgcatdir)"'
Expand Down
46 changes: 34 additions & 12 deletions intl/dcigettext.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* Implementation of the internal dcigettext function.
Copyright (C) 1995-2005, 2006, 2007 Free Software Foundation, Inc.
Copyright (C) 1995-2005, 2006, 2007, 2008
Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
Expand Down Expand Up @@ -449,6 +450,11 @@ DCIGETTEXT (domainname, msgid1, msgid2, plural, n, category)
: n == 1 ? (char *) msgid1 : (char *) msgid2);
#endif

#ifdef _LIBC
__libc_rwlock_define (extern, __libc_setlocale_lock attribute_hidden)
__libc_rwlock_rdlock (__libc_setlocale_lock);
#endif

__libc_rwlock_rdlock (_nl_state_lock);

/* If DOMAINNAME is NULL, we are interested in the default domain. If
Expand All @@ -466,7 +472,7 @@ DCIGETTEXT (domainname, msgid1, msgid2, plural, n, category)
search.category = category;
# ifdef HAVE_PER_THREAD_LOCALE
# ifdef _LIBC
localename = __current_locale_name (category);
localename = strdupa (__current_locale_name (category));
# endif
search.localename = localename;
# endif
Expand All @@ -489,6 +495,9 @@ DCIGETTEXT (domainname, msgid1, msgid2, plural, n, category)
else
retval = (char *) (*foundp)->translation;

# ifdef _LIBC
__libc_rwlock_unlock (__libc_setlocale_lock);
# endif
__libc_rwlock_unlock (_nl_state_lock);
return retval;
}
Expand Down Expand Up @@ -548,6 +557,7 @@ DCIGETTEXT (domainname, msgid1, msgid2, plural, n, category)
/* We cannot get the current working directory. Don't signal an
error but simply return the default string. */
FREE_BLOCKS (block_list);
__libc_rwlock_unlock (__libc_setlocale_lock);
__libc_rwlock_unlock (_nl_state_lock);
__set_errno (saved_errno);
return (plural == 0
Expand Down Expand Up @@ -614,6 +624,7 @@ DCIGETTEXT (domainname, msgid1, msgid2, plural, n, category)
{
no_translation:
FREE_BLOCKS (block_list);
__libc_rwlock_unlock (__libc_setlocale_lock);
__libc_rwlock_unlock (_nl_state_lock);
__set_errno (saved_errno);
return (plural == 0
Expand Down Expand Up @@ -727,6 +738,7 @@ DCIGETTEXT (domainname, msgid1, msgid2, plural, n, category)
if (plural)
retval = plural_lookup (domain, n, retval, retlen);

__libc_rwlock_unlock (__libc_setlocale_lock);
__libc_rwlock_unlock (_nl_state_lock);
return retval;
}
Expand Down Expand Up @@ -879,6 +891,7 @@ _nl_find_msg (domain_file, domainbinding, msgid, convert, lengthp)
{
/* We have to allocate a new conversions table. */
__libc_rwlock_wrlock (domain->conversions_lock);
nconversions = domain->nconversions;

/* Maybe in the meantime somebody added the translation.
Recheck. */
Expand Down Expand Up @@ -1033,6 +1046,7 @@ _nl_find_msg (domain_file, domainbinding, msgid, convert, lengthp)
# endif
)
{
__libc_lock_define_initialized (static, lock)
/* We are supposed to do a conversion. First allocate an
appropriate table with the same structure as the table
of translations in the file, where we can put the pointers
Expand All @@ -1042,13 +1056,21 @@ _nl_find_msg (domain_file, domainbinding, msgid, convert, lengthp)
handle this case by converting RESULTLEN bytes, including
NULs. */

if (convd->conv_tab == NULL
&& ((convd->conv_tab =
(char **) calloc (nstrings + domain->n_sysdep_strings,
sizeof (char *)))
== NULL))
/* Mark that we didn't succeed allocating a table. */
convd->conv_tab = (char **) -1;
if (__builtin_expect (convd->conv_tab == NULL, 0))
{
__libc_lock_lock (lock);
if (convd->conv_tab == NULL)
{
convd->conv_tab
= calloc (nstrings + domain->n_sysdep_strings,
sizeof (char *));
if (convd->conv_tab != NULL)
goto not_translated_yet;
/* Mark that we didn't succeed allocating a table. */
convd->conv_tab = (char **) -1;
}
__libc_lock_unlock (lock);
}

if (__builtin_expect (convd->conv_tab == (char **) -1, 0))
/* Nothing we can do, no more memory. We cannot use the
Expand All @@ -1057,12 +1079,14 @@ _nl_find_msg (domain_file, domainbinding, msgid, convert, lengthp)

if (convd->conv_tab[act] == NULL)
{
__libc_lock_lock (lock);
not_translated_yet:;

/* We haven't used this string so far, so it is not
translated yet. Do this now. */
/* We use a bit more efficient memory handling.
We allocate always larger blocks which get used over
time. This is faster than many small allocations. */
__libc_lock_define_initialized (static, lock)
# define INITIAL_BLOCK_SIZE 4080
static unsigned char *freemem;
static size_t freemem_size;
Expand All @@ -1074,8 +1098,6 @@ _nl_find_msg (domain_file, domainbinding, msgid, convert, lengthp)
transmem_block_t *transmem_list = NULL;
# endif

__libc_lock_lock (lock);

inbuf = (const unsigned char *) result;
outbuf = freemem + sizeof (size_t);

Expand Down
Loading

0 comments on commit e6e467b

Please sign in to comment.