Skip to content

Commit

Permalink
Updated to fedora-glibc-20060925T1535
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Jelinek committed Sep 25, 2006
1 parent 0e4d91b commit 5ed9cc7
Show file tree
Hide file tree
Showing 17 changed files with 210 additions and 601 deletions.
34 changes: 34 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,37 @@
2006-09-25 Jakub Jelinek <jakub@redhat.com>

[BZ #3252]
* sysdeps/unix/sysv/linux/powerpc/fchownat.c (fchownat): Handle only
fchownat syscall and __ASSUME_LCHOWN_SYSCALL case inline, call
__{,l}chown to handle the rest.
* sysdeps/unix/sysv/linux/i386/fchownat.c (fchownat): Handle only
fchownat syscall and __ASSUME_32BITUIDS case inline, call
__{,l}chown to handle the rest.
* sysdeps/unix/sysv/linux/sparc/sparc32/fchownat.c: Include
i386/fchownat.c.
* sysdeps/unix/sysv/linux/s390/s390-32/fchownat.c: Likewise.
* sysdeps/unix/sysv/linux/sh/fchownat.c: Likewise.

[BZ #3253]
* posix/glob.c (glob_in_dir): Don't alloca one struct globlink at a
time, rather allocate increasingly bigger arrays of pointers, if
possible with alloca, if too large with malloc.

2006-09-24 Jakub Jelinek <jakub@redhat.com>

* sysdeps/powerpc/fpu/libm-test-ulps: Updated.

* sysdeps/ieee754/ldbl-128/s_lrintl.c (__lrintl): Fix 2 typos.

2006-09-24 Ulrich Drepper <drepper@redhat.com>

* sysdeps/posix/getaddrinfo.c (rfc3484_sort): Implement rule 4,
home addresses.
* sysdeps/unix/sysv/linux/check_pf.c (make_request): Recognize
IFA_F_HOMEADDRESS flag for interfaces.
* include/ifaddrs.h (struct in6addrinfo): Define
in6ai_homeaddress.

2006-09-21 Jakub Jelinek <jakub@redhat.com>

[BZ #3225]
Expand Down
7 changes: 4 additions & 3 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
GNU C Library NEWS -- history of user-visible changes. 2006-08-14
GNU C Library NEWS -- history of user-visible changes. 2006-09-24
Copyright (C) 1992-2002,2003,2004,2005,2006 Free Software Foundation, Inc.
See the end for copying conditions.

Expand All @@ -8,7 +8,8 @@ using `glibc' in the "product" field.
Version 2.5

* For Linux, the sorting of addresses returned by getaddrinfo now also
handles rules 3 and 7 from RFC 3484. Implemented by Ulrich Drepper.
handles rules 3, 4, and 7 from RFC 3484. I.e., all rules are handled.
Implemented by Ulrich Drepper.

* Allow system admin to configure getaddrinfo with the /etc/gai.conf file.
Implemented by Ulrich Drepper.
Expand All @@ -20,7 +21,7 @@ Version 2.5
* For sites with broken group and/or passwd database, the auto-propagate
option of nscd can prevent creating ID lookup entries from the results
of a name lookup and vice versa. This usually is no problem but some
site might have problems with default behavior.
site might have problems with the default behavior.
Implemented by Ulrich Drepper.

* Iterating over entire database in NIS can be slow. With the
Expand Down
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-fc4
fedora-sync-date := 2006-09-23 09:46 UTC
fedora-sync-tag := fedora-glibc-20060923T0946
fedora-sync-date := 2006-09-25 15:35 UTC
fedora-sync-tag := fedora-glibc-20060925T1535
7 changes: 6 additions & 1 deletion fedora/glibc.spec.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%define glibcrelease 34
%define glibcrelease 35
%define auxarches i586 i686 athlon sparcv9 alphaev6
%define xenarches i686 athlon
%ifarch %{xenarches}
Expand Down Expand Up @@ -1528,6 +1528,11 @@ rm -f *.filelist*
%endif

%changelog
* Mon Sep 25 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-35
- fix glob with large number of matches (BZ#3253)
- fix fchownat on kernels that don't support that syscall (BZ#3252)
- fix lrintl on s390{,64}

* Sat Sep 23 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-34
- fix ppc{32,64} longjmp (BZ#3225)
- fix user visible spelling errors (BZ#3137)
Expand Down
3 changes: 2 additions & 1 deletion include/ifaddrs.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ struct in6addrinfo
{
enum {
in6ai_deprecated = 1,
in6ai_temporary = 2
in6ai_temporary = 2,
in6ai_homeaddress = 4
} flags;
uint32_t addr[4];
};
Expand Down
6 changes: 6 additions & 0 deletions nptl/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2006-09-24 Ulrich Drepper <drepper@redhat.com>

[BZ #3251]
* descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
Patch by Petr Baudis.

2006-09-18 Jakub Jelinek <jakub@redhat.com>

* tst-kill4.c (do_test): Explicitly set tf thread's stack size.
Expand Down
2 changes: 1 addition & 1 deletion nptl/descr.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ struct pthread
mutex->__data.__list.__next \
= THREAD_GETMEM (THREAD_SELF, robust_list.__next); \
THREAD_SETMEM (THREAD_SELF, robust_list.__next, \
((uintptr_t) &mutex->__data.__list) | val); \
(void *) (((uintptr_t) &mutex->__data.__list) | val)); \
} while (0)
# define DEQUEUE_MUTEX(mutex) \
do { \
Expand Down
142 changes: 88 additions & 54 deletions posix/glob.c
Original file line number Diff line number Diff line change
Expand Up @@ -1090,24 +1090,32 @@ glob_in_dir (const char *pattern, const char *directory, int flags,
{
size_t dirlen = strlen (directory);
void *stream = NULL;
struct globlink
struct globnames
{
struct globlink *next;
char *name;
struct globnames *next;
size_t count;
char *name[64];
};
struct globlink *names = NULL;
size_t nfound;
#define INITIAL_COUNT sizeof (init_names.name) / sizeof (init_names.name[0])
struct globnames init_names;
struct globnames *names = &init_names;
struct globnames *names_alloca = &init_names;
size_t nfound = 0;
size_t allocasize = sizeof (init_names);
size_t cur = 0;
int meta;
int save;

init_names.next = NULL;
init_names.count = INITIAL_COUNT;

meta = __glob_pattern_p (pattern, !(flags & GLOB_NOESCAPE));
if (meta == 0 && (flags & (GLOB_NOCHECK|GLOB_NOMAGIC)))
{
/* We need not do any tests. The PATTERN contains no meta
characters and we must not return an error therefore the
result will always contain exactly one name. */
flags |= GLOB_NOCHECK;
nfound = 0;
}
else if (meta == 0 &&
((flags & GLOB_NOESCAPE) || strchr (pattern, '\\') == NULL))
Expand All @@ -1128,21 +1136,17 @@ glob_in_dir (const char *pattern, const char *directory, int flags,
/* We found this file to be existing. Now tell the rest
of the function to copy this name into the result. */
flags |= GLOB_NOCHECK;

nfound = 0;
}
else
{
if (pattern[0] == '\0')
{
/* This is a special case for matching directories like in
"*a/". */
names = (struct globlink *) __alloca (sizeof (struct globlink));
names->name = (char *) malloc (1);
if (names->name == NULL)
names->name[cur] = (char *) malloc (1);
if (names->name[cur] == NULL)
goto memory_error;
names->name[0] = '\0';
names->next = NULL;
*names->name[cur++] = '\0';
nfound = 1;
meta = 0;
}
Expand All @@ -1157,7 +1161,6 @@ glob_in_dir (const char *pattern, const char *directory, int flags,
&& ((errfunc != NULL && (*errfunc) (directory, errno))
|| (flags & GLOB_ERR)))
return GLOB_ABORTED;
nfound = 0;
meta = 0;
}
else
Expand All @@ -1168,7 +1171,6 @@ glob_in_dir (const char *pattern, const char *directory, int flags,
| FNM_CASEFOLD
#endif
);
nfound = 0;
flags |= GLOB_MAGCHAR;

while (1)
Expand Down Expand Up @@ -1224,15 +1226,30 @@ glob_in_dir (const char *pattern, const char *directory, int flags,
|| link_exists_p (directory, dirlen, name, pglob,
flags))
{
struct globlink *new = (struct globlink *)
__alloca (sizeof (struct globlink));
if (cur == names->count)
{
struct globnames *newnames;
size_t count = names->count * 2;
size_t size = (sizeof (struct globnames)
+ ((count - INITIAL_COUNT)
* sizeof (char *)));
allocasize += size;
if (__libc_use_alloca (allocasize))
newnames = names_alloca = __alloca (size);
else if ((newnames = malloc (size))
== NULL)
goto memory_error;
newnames->count = count;
newnames->next = names;
names = newnames;
cur = 0;
}
len = NAMLEN (d);
new->name = (char *) malloc (len + 1);
if (new->name == NULL)
names->name[cur] = (char *) malloc (len + 1);
if (names->name[cur] == NULL)
goto memory_error;
*((char *) mempcpy (new->name, name, len)) = '\0';
new->next = names;
names = new;
*((char *) mempcpy (names->name[cur++], name, len))
= '\0';
++nfound;
}
}
Expand All @@ -1245,59 +1262,76 @@ glob_in_dir (const char *pattern, const char *directory, int flags,
{
size_t len = strlen (pattern);
nfound = 1;
names = (struct globlink *) __alloca (sizeof (struct globlink));
names->next = NULL;
names->name = (char *) malloc (len + 1);
if (names->name == NULL)
names->name[cur] = (char *) malloc (len + 1);
if (names->name[cur] == NULL)
goto memory_error;
*((char *) mempcpy (names->name, pattern, len)) = '\0';
*((char *) mempcpy (names->name[cur++], pattern, len)) = '\0';
}

int result = GLOB_NOMATCH;
if (nfound != 0)
{
char **new_gl_pathv;
result = 0;

char **new_gl_pathv;
new_gl_pathv
= (char **) realloc (pglob->gl_pathv,
(pglob->gl_pathc + pglob->gl_offs + nfound + 1)
* sizeof (char *));
if (new_gl_pathv == NULL)
goto memory_error;
pglob->gl_pathv = new_gl_pathv;
{
memory_error:
while (1)
{
struct globnames *old = names;
for (size_t i = 0; i < cur; ++i)
free (names->name[i]);
names = names->next;
if (names == NULL)
break;
cur = names->count;
if (old == names_alloca)
names_alloca = names;
else
free (old);
}
result = GLOB_NOSPACE;
}
else
{
while (1)
{
struct globnames *old = names;
for (size_t i = 0; i < cur; ++i)
new_gl_pathv[pglob->gl_offs + pglob->gl_pathc++]
= names->name[i];
names = names->next;
if (names == NULL)
break;
cur = names->count;
if (old == names_alloca)
names_alloca = names;
else
free (old);
}

pglob->gl_pathv = new_gl_pathv;

for (; names != NULL; names = names->next)
pglob->gl_pathv[pglob->gl_offs + pglob->gl_pathc++] = names->name;
pglob->gl_pathv[pglob->gl_offs + pglob->gl_pathc] = NULL;
pglob->gl_pathv[pglob->gl_offs + pglob->gl_pathc] = NULL;

pglob->gl_flags = flags;
pglob->gl_flags = flags;
}
}

save = errno;
if (stream != NULL)
{
save = errno;
if (flags & GLOB_ALTDIRFUNC)
(*pglob->gl_closedir) (stream);
else
closedir (stream);
__set_errno (save);
}
__set_errno (save);

return nfound == 0 ? GLOB_NOMATCH : 0;

memory_error:
{
int save = errno;
if (flags & GLOB_ALTDIRFUNC)
(*pglob->gl_closedir) (stream);
else
closedir (stream);
__set_errno (save);
}
while (names != NULL)
{
if (names->name != NULL)
free (names->name);
names = names->next;
}
return GLOB_NOSPACE;
return result;
}
4 changes: 2 additions & 2 deletions sysdeps/ieee754/ldbl-128/s_lrintl.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ __lrintl (long double x)
{
w = two112[sx] + x;
t = w - two112[sx];
GET_LDOUBLE_WORDS64 (i0, i1, x);
GET_LDOUBLE_WORDS64 (i0, i1, t);
j0 = ((i0 >> 48) & 0x7fff) - 0x3fff;
i0 &= 0x0000ffffffffffffLL;
i0 |= 0x0001000000000000LL;
Expand All @@ -65,7 +65,7 @@ __lrintl (long double x)
{
w = two112[sx] + x;
t = w - two112[sx];
GET_LDOUBLE_WORDS64 (i0, i1, x);
GET_LDOUBLE_WORDS64 (i0, i1, t);
j0 = ((i0 >> 48) & 0x7fff) - 0x3fff;
i0 &= 0x0000ffffffffffffLL;
i0 |= 0x0001000000000000LL;
Expand Down
12 changes: 10 additions & 2 deletions sysdeps/posix/getaddrinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -1390,8 +1390,16 @@ rfc3484_sort (const void *p1, const void *p2)
return 1;
}

/* Rule 4: Prefer home addresses.
Another thing only the kernel can decide. */
/* Rule 4: Prefer home addresses. */
if (a1->got_source_addr)
{
if (!(a1->source_addr_flags & in6ai_homeaddress)
&& (a2->source_addr_flags & in6ai_homeaddress))
return -1;
if ((a1->source_addr_flags & in6ai_homeaddress)
&& !(a2->source_addr_flags & in6ai_homeaddress))
return 1;
}

/* Rule 5: Prefer matching label. */
if (a1->got_source_addr)
Expand Down
Loading

0 comments on commit 5ed9cc7

Please sign in to comment.