[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r9496 - in /trunk: libc/ libc/bits/ libc/elf/ libc/include/ libc/nis/nss_nis/ libc/nis/nss_nisplus/ libc/nptl/ libc/nptl/sys...
- To: commits@xxxxxxxxxx
- Subject: [commits] r9496 - in /trunk: libc/ libc/bits/ libc/elf/ libc/include/ libc/nis/nss_nis/ libc/nis/nss_nisplus/ libc/nptl/ libc/nptl/sys...
- From: joseph@xxxxxxxxxx
- Date: Fri, 18 Dec 2009 15:16:45 -0000
Author: joseph
Date: Fri Dec 18 07:16:44 2009
New Revision: 9496
Log:
Merge changes between r9423 and r9495 from /fsf/trunk.
Added:
trunk/ports/sysdeps/arm/eabi/arm-mcount.S
- copied unchanged from r9495, fsf/trunk/ports/sysdeps/arm/eabi/arm-mcount.S
Modified:
trunk/libc/.gitignore
trunk/libc/ChangeLog
trunk/libc/NEWS
trunk/libc/bits/poll.h
trunk/libc/elf/dl-lookup.c
trunk/libc/elf/dl-object.c
trunk/libc/include/link.h
trunk/libc/nis/nss_nis/nis-hosts.c
trunk/libc/nis/nss_nisplus/nisplus-hosts.c
trunk/libc/nptl/ChangeLog
trunk/libc/nptl/pthread_rwlock_init.c
trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S
trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h
trunk/libc/nss/nss_files/files-hosts.c
trunk/libc/posix/unistd.h
trunk/libc/sysdeps/i386/i686/multiarch/strcspn.S
trunk/libc/sysdeps/i386/i686/multiarch/strlen.S
trunk/libc/sysdeps/i386/i686/multiarch/strspn.S
trunk/libc/sysdeps/posix/getaddrinfo.c
trunk/libc/sysdeps/s390/s390-32/dl-trampoline.S
trunk/libc/sysdeps/s390/s390-32/s390-mcount.S
trunk/libc/sysdeps/s390/s390-64/dl-trampoline.S
trunk/libc/sysdeps/s390/s390-64/s390x-mcount.S
trunk/libc/sysdeps/sh/elf/initfini.c
trunk/libc/sysdeps/sh/sh4/fpu/fpu_control.h
trunk/libc/sysdeps/unix/sysv/linux/Versions
trunk/libc/sysdeps/unix/sysv/linux/bits/poll.h
trunk/libc/sysdeps/unix/sysv/linux/bits/socket.h
trunk/libc/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
trunk/libc/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
trunk/libc/sysdeps/unix/sysv/linux/ptsname.c
trunk/libc/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
trunk/libc/sysdeps/unix/sysv/linux/sh/bits/fcntl.h
trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/poll.h
trunk/libc/sysdeps/unix/sysv/linux/syscalls.list
trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h
trunk/libc/sysdeps/x86_64/multiarch/init-arch.h
trunk/libc/sysdeps/x86_64/multiarch/rawmemchr.S
trunk/libc/sysdeps/x86_64/multiarch/strchr.S
trunk/libc/sysdeps/x86_64/multiarch/strcmp.S
trunk/libc/sysdeps/x86_64/multiarch/strcpy.S
trunk/libc/sysdeps/x86_64/multiarch/strcspn.S
trunk/libc/sysdeps/x86_64/multiarch/strlen.S
trunk/libc/sysdeps/x86_64/multiarch/strrchr.S
trunk/libc/sysdeps/x86_64/multiarch/strspn.S
trunk/ports/ChangeLog.arm
trunk/ports/ChangeLog.m68k
trunk/ports/ChangeLog.mips
trunk/ports/sysdeps/arm/eabi/Makefile
trunk/ports/sysdeps/arm/eabi/machine-gmon.h
trunk/ports/sysdeps/mips/dl-lookup.c
trunk/ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
trunk/ports/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
trunk/ports/sysdeps/unix/sysv/linux/m68k/bits/poll.h
trunk/ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
trunk/ports/sysdeps/unix/sysv/linux/mips/bits/poll.h
trunk/ports/sysdeps/unix/sysv/linux/mips/bits/socket.h
Modified: trunk/libc/.gitignore
==============================================================================
--- trunk/libc/.gitignore (original)
+++ trunk/libc/.gitignore Fri Dec 18 07:16:44 2009
@@ -4,6 +4,8 @@
*.tar
*.tgz
*.bz2
+*.rej
+*.orig
=*
TAGS
TODO
Modified: trunk/libc/ChangeLog
==============================================================================
--- trunk/libc/ChangeLog (original)
+++ trunk/libc/ChangeLog Fri Dec 18 07:16:44 2009
@@ -1,3 +1,105 @@
+2009-12-15 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ [BZ #11093]
+ * bits/poll.h: Define POLLRDNORM, POLLRDBAND, POLLWRNORM, and
+ POLLWRBAND also for POSIX 2008.
+ * sysdeps/unix/sysv/linux/bits/poll.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/bits/poll.h: Likewise.
+
+ * include/link.h (struct link_map): Move l_used into its own word.
+ * elf/dl-lookup.c (_dl_lookup_symbol_x): Only update l_used when it is
+ still zero.
+ * elf/dl-object.c (_dl_new_object): Set dl_used if we know it is
+ never really used.
+
+2009-12-13 H.J. Lu <hongjiu.lu@xxxxxxxxx>
+
+ * sysdeps/i386/i686/multiarch/strcspn.S Include <init-arch.h>
+ instead of <ifunc-defines.h>. Use bit_XXX and index_XXX to
+ check processor feature.
+ * sysdeps/i386/i686/multiarch/strlen.S: Likewise.
+ * sysdeps/i386/i686/multiarch/strspn.S: Likewise.
+ * sysdeps/x86_64/multiarch/init-arch.h (bit_SSE2): New definition.
+ (index_SSE2): Likewise.
+
+2009-12-09 H.J. Lu <hongjiu.lu@xxxxxxxxx>
+
+ * sysdeps/x86_64/multiarch/init-arch.h: Include <ifunc-defines.h>
+ if __ASSEMBLER__ is defined.
+ (bit_SSSE3): New. Defined for __ASSEMBLER__.
+ (bit_SSE4_2): Likewise.
+ (index_SSSE3): Likewise.
+ (index_SSE4_2): Likewise.
+ * sysdeps/x86_64/multiarch/rawmemchr.S: Include <init-arch.h>
+ instead of <ifunc-defines.h>. Use bit_XXX and index_XXX to
+ check processor feature.
+ * sysdeps/x86_64/multiarch/strchr.S: Likewise.
+ * sysdeps/x86_64/multiarch/strcmp.S: Likewise.
+ * sysdeps/x86_64/multiarch/strcpy.S: Likewise.
+ * sysdeps/x86_64/multiarch/strcspn.S: Likewise.
+ * sysdeps/x86_64/multiarch/strlen.S: Likewise.
+ * sysdeps/x86_64/multiarch/strrchr.S: Likewise.
+ * sysdeps/x86_64/multiarch/strspn.S: Likewise.
+
+2009-12-08 Kaz Kojima <kkojima@xxxxxxxxxxxxxx>
+
+ * sysdeps/sh/elf/initfini.c: Update according to generic/initfini.c.
+
+2009-12-01 Mike Frysinger <vapier@xxxxxxxxxx>
+
+ * sysdeps/sh/sh4/fpu/fpu_control.h (__set_fpscr): New prototype.
+
+2009-12-11 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/sh/bits/fcntl.h: Redefine O_SYNC and
+ O_DSYNC to match 2.6.33+ kernels.
+ * sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/bits/fcntl.h: Likewise.
+ * sysdeps/unix/sysv/linux/ia64/bits/fcntl.h: Likewise.
+ * sysdeps/unix/sysv/linux/i386/bits/fcntl.h: Likewise.
+ * sysdeps/unix/sysv/linux/s390/bits/fcntl.h: Likewise.
+
+2009-12-10 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ [BZ #11000]
+ * nis/nss_nis/nis-hosts.c (_nss_nis_gethostbyname4_r): Always set
+ *herrnop before returning.
+ * nis/nss_nisplus/nisplus-hosts.c (internal_gethostbyname2_r):
+ Likewise.
+ * nss/nss_files/files-hosts.c (_nss_files_gethostbyname4_r): Handle
+ TRYAGAIN errors separately.
+ * sysdeps/posix/getaddrinfo.c (gaih_inet): Fix error handling of
+ *name4_r after functions.
+
+2009-12-09 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ [BZ #11046]
+ * sysdeps/unix/sysv/linux/ptsname.c (__ptsname_internal): Fix kernel
+ version check.
+
+2009-11-05 Bruno Haible <bruno@xxxxxxxxx>
+
+ [BZ #11056]
+ * posix/unistd.h (execve, fexecve, execv, execvp, execvpe): Mark the
+ argv argument as non-NULL.
+ (execle, execl, execlp): Mark the first ARG argument as non-NULL.
+
+-2009-12-08 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/bits/socket.h: Define mmsghdr and declare
+ recvmmsg.
+ * sysdeps/unix/sysv/linux/syscalls.list: Add entry for recvmmsg.
+ * sysdeps/unix/sysv/linux/Versions: Add recvmmsg for GLIBC_2.12.
+
+2009-12-04 Andreas Krebbel <Andreas.Krebbel@xxxxxxxxxx>
+
+ * sysdeps/s390/s390-64/dl-trampoline.S: Add CFI for the call saved
+ registers.
+ * sysdeps/s390/s390-32/dl-trampoline.S: Likewise.
+ * sysdeps/s390/s390-32/s390-mcount.S: Add CFI.
+ * sysdeps/s390/s390-64/s390x-mcount.S: Add CFI.
+
2009-11-30 Ulrich Drepper <drepper@xxxxxxxxxx>
* sysdeps/unix/sysv/linux/bits/sched.h: Define SCHED_IDLE and
Modified: trunk/libc/NEWS
==============================================================================
--- trunk/libc/NEWS (original)
+++ trunk/libc/NEWS Fri Dec 18 07:16:44 2009
@@ -1,9 +1,14 @@
-GNU C Library NEWS -- history of user-visible changes. 2009-10-30
+GNU C Library NEWS -- history of user-visible changes. 2009-12-8
Copyright (C) 1992-2008, 2009 Free Software Foundation, Inc.
See the end for copying conditions.
Please send GNU C library bug reports via <http://sources.redhat.com/bugzilla/>
using `glibc' in the "product" field.
+
+Version 2.12
+
+* New Linux interface: recvmmsg
+
Version 2.11
Modified: trunk/libc/bits/poll.h
==============================================================================
--- trunk/libc/bits/poll.h (original)
+++ trunk/libc/bits/poll.h Fri Dec 18 07:16:44 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 2000, 2001, 2009 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
@@ -27,8 +27,8 @@
#define POLLPRI 02 /* There is urgent data to read. */
#define POLLOUT 04 /* Writing now will not block. */
-#ifdef __USE_XOPEN
-/* These values are defined in XPG4.2. */
+#if defined __USE_XOPEN || defined __USE_XOPEN2K8
+/* These values are defined in XPG4.2 and later. */
# define POLLRDNORM POLLIN /* Normal data may be read. */
# define POLLRDBAND POLLPRI /* Priority data may be read. */
# define POLLWRNORM POLLOUT /* Writing now will not block. */
Modified: trunk/libc/elf/dl-lookup.c
==============================================================================
--- trunk/libc/elf/dl-lookup.c (original)
+++ trunk/libc/elf/dl-lookup.c Fri Dec 18 07:16:44 2009
@@ -777,7 +777,7 @@
if (__builtin_expect (protected != 0, 0))
{
/* It is very tricky. We need to figure out what value to
- return for the protected symbol. */
+ return for the protected symbol. */
if (type_class == ELF_RTYPE_CLASS_PLT)
{
if (current_value.s != NULL && current_value.m != undef_map)
@@ -822,7 +822,8 @@
version, type_class, flags, skip_map);
/* The object is used. */
- current_value.m->l_used = 1;
+ if (__builtin_expect (current_value.m->l_used == 0, 0))
+ current_value.m->l_used = 1;
if (__builtin_expect (GLRO(dl_debug_mask)
& (DL_DEBUG_BINDINGS|DL_DEBUG_PRELINK), 0))
@@ -844,7 +845,7 @@
Elf_Symndx nchain;
if (__builtin_expect (map->l_info[DT_ADDRTAGIDX (DT_GNU_HASH) + DT_NUM
- + DT_THISPROCNUM + DT_VERSIONTAGNUM
+ + DT_THISPROCNUM + DT_VERSIONTAGNUM
+ DT_EXTRANUM + DT_VALNUM] != NULL, 1))
{
Elf32_Word *hash32
Modified: trunk/libc/elf/dl-object.c
==============================================================================
--- trunk/libc/elf/dl-object.c (original)
+++ trunk/libc/elf/dl-object.c Fri Dec 18 07:16:44 2009
@@ -1,5 +1,5 @@
/* Storage management for the chain of loaded shared objects.
- Copyright (C) 1995-2002,2004,2006,2007,2008 Free Software Foundation, Inc.
+ Copyright (C) 1995-2002,2004,2006-2008,2009 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
@@ -67,6 +67,10 @@
new->l_name = realname;
new->l_type = type;
+ /* If we set the bit now since we know it is never used we avoid
+ dirtying the cache line later. */
+ if ((GLRO(dl_debug_mask) & DL_DEBUG_UNUSED) == 0)
+ new->l_used = 1;
new->l_loader = loader;
#if NO_TLS_OFFSET != 0
new->l_tls_offset = NO_TLS_OFFSET;
@@ -174,7 +178,7 @@
if (result == NULL)
{
/* We were not able to determine the current directory.
- Note that free(origin) is OK if origin == NULL. */
+ Note that free(origin) is OK if origin == NULL. */
free (origin);
origin = (char *) -1;
goto out;
Modified: trunk/libc/include/link.h
==============================================================================
--- trunk/libc/include/link.h (original)
+++ trunk/libc/include/link.h Fri Dec 18 07:16:44 2009
@@ -1,6 +1,6 @@
/* Data structure for communication from the run-time dynamic linker for
loaded ELF shared objects.
- Copyright (C) 1995-2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1995-2006, 2007, 2009 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
@@ -180,7 +180,6 @@
unsigned int l_need_tls_init:1; /* Nonzero if GL(dl_init_static_tls)
should be called on this link map
when relocation finishes. */
- unsigned int l_used:1; /* Nonzero if the DSO is used. */
unsigned int l_auditing:1; /* Nonzero if the DSO is used in auditing. */
unsigned int l_audit_any_plt:1; /* Nonzero if at least one audit module
is interested in the PLT interception.*/
@@ -239,12 +238,15 @@
struct link_map **l_initfini;
/* List of the dependencies introduced through symbol binding. */
- unsigned int l_reldepsmax;
struct link_map_reldeps
{
unsigned int act;
struct link_map *list[];
} *l_reldeps;
+ unsigned int l_reldepsmax;
+
+ /* Nonzero if the DSO is used. */
+ unsigned int l_used;
/* Various flag words. */
ElfW(Word) l_feature_1;
Modified: trunk/libc/nis/nss_nis/nis-hosts.c
==============================================================================
--- trunk/libc/nis/nss_nis/nis-hosts.c (original)
+++ trunk/libc/nis/nss_nis/nis-hosts.c Fri Dec 18 07:16:44 2009
@@ -70,20 +70,20 @@
{
assert ((flags & AI_V4MAPPED) == 0 || af != AF_UNSPEC);
if (flags & AI_V4MAPPED)
- {
- map_v4v6_address ((char *) entdata->host_addr,
- (char *) entdata->host_addr);
- result->h_addrtype = AF_INET6;
- result->h_length = IN6ADDRSZ;
- }
+ {
+ map_v4v6_address ((char *) entdata->host_addr,
+ (char *) entdata->host_addr);
+ result->h_addrtype = AF_INET6;
+ result->h_length = IN6ADDRSZ;
+ }
else
- {
- result->h_addrtype = AF_INET;
- result->h_length = INADDRSZ;
- }
+ {
+ result->h_addrtype = AF_INET;
+ result->h_length = INADDRSZ;
+ }
}
else if (af != AF_INET
- && inet_pton (AF_INET6, addr, entdata->host_addr) > 0)
+ && inet_pton (AF_INET6, addr, entdata->host_addr) > 0)
{
result->h_addrtype = AF_INET6;
result->h_length = IN6ADDRSZ;
@@ -164,14 +164,14 @@
int keylen;
int yperr;
if (new_start)
- yperr = yp_first (domain, "hosts.byname", &outkey, &keylen, &result,
+ yperr = yp_first (domain, "hosts.byname", &outkey, &keylen, &result,
&len);
else
- yperr = yp_next (domain, "hosts.byname", oldkey, oldkeylen, &outkey,
+ yperr = yp_next (domain, "hosts.byname", oldkey, oldkeylen, &outkey,
&keylen, &result, &len);
if (__builtin_expect (yperr != YPERR_SUCCESS, 0))
- {
+ {
enum nss_status retval = yperr2nss (yperr);
switch (retval)
@@ -191,12 +191,12 @@
}
if (__builtin_expect ((size_t) (len + 1) > linebuflen, 0))
- {
- free (result);
+ {
+ free (result);
*h_errnop = NETDB_INTERNAL;
- *errnop = ERANGE;
- return NSS_STATUS_TRYAGAIN;
- }
+ *errnop = ERANGE;
+ return NSS_STATUS_TRYAGAIN;
+ }
char *p = strncpy (data->linebuffer, result, len);
data->linebuffer[len] = '\0';
@@ -233,7 +233,7 @@
__libc_lock_lock (lock);
status = internal_nis_gethostent_r (host, buffer, buflen, errnop, h_errnop,
- ((_res.options & RES_USE_INET6) ? AF_INET6 : AF_INET),
+ ((_res.options & RES_USE_INET6) ? AF_INET6 : AF_INET),
((_res.options & RES_USE_INET6) ? AI_V4MAPPED : 0 ));
__libc_lock_unlock (lock);
@@ -346,7 +346,7 @@
return internal_gethostbyname2_r (name, af, host, buffer, buflen, errnop,
h_errnop,
- ((_res.options & RES_USE_INET6) ? AI_V4MAPPED : 0));
+ ((_res.options & RES_USE_INET6) ? AI_V4MAPPED : 0));
}
@@ -456,7 +456,10 @@
{
char *domain;
if (yp_get_default_domain (&domain))
- return NSS_STATUS_UNAVAIL;
+ {
+ *herrnop = NO_DATA;
+ return NSS_STATUS_UNAVAIL;
+ }
/* Convert name to lowercase. */
size_t namlen = strlen (name);
Modified: trunk/libc/nis/nss_nisplus/nisplus-hosts.c
==============================================================================
--- trunk/libc/nis/nss_nisplus/nisplus-hosts.c (original)
+++ trunk/libc/nis/nss_nisplus/nisplus-hosts.c Fri Dec 18 07:16:44 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2003, 2005, 2006, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2003, 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@xxxxxxx>, 1997.
@@ -38,10 +38,10 @@
static u_long tablename_len;
#define NISENTRYVAL(idx, col, res) \
- (NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val)
+ (NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val)
#define NISENTRYLEN(idx, col, res) \
- (NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len)
+ (NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len)
/* Get implementation for some internal functions. */
#include <resolv/mapv4v6addr.h>
@@ -287,15 +287,15 @@
return NSS_STATUS_TRYAGAIN;
}
if (niserr2nss (result->status) != NSS_STATUS_SUCCESS)
- {
- enum nss_status retval = niserr2nss (result->status);
- if (retval == NSS_STATUS_TRYAGAIN)
- {
- *herrnop = NETDB_INTERNAL;
- *errnop = errno;
- }
- return retval;
- }
+ {
+ enum nss_status retval = niserr2nss (result->status);
+ if (retval == NSS_STATUS_TRYAGAIN)
+ {
+ *herrnop = NETDB_INTERNAL;
+ *errnop = errno;
+ }
+ return retval;
+ }
}
else
@@ -308,18 +308,18 @@
return NSS_STATUS_TRYAGAIN;
}
if (niserr2nss (result->status) != NSS_STATUS_SUCCESS)
- {
- enum nss_status retval= niserr2nss (result->status);
+ {
+ enum nss_status retval= niserr2nss (result->status);
nis_freeresult (result);
result = saved_res;
- if (retval == NSS_STATUS_TRYAGAIN)
- {
- *herrnop = NETDB_INTERNAL;
+ if (retval == NSS_STATUS_TRYAGAIN)
+ {
+ *herrnop = NETDB_INTERNAL;
*errnop = errno;
- }
- return retval;
- }
+ }
+ return retval;
+ }
}
if (_res.options & RES_USE_INET6)
@@ -330,13 +330,13 @@
buflen, errnop, 0);
if (parse_res == -1)
- {
+ {
nis_freeresult (result);
result = saved_res;
- *herrnop = NETDB_INTERNAL;
+ *herrnop = NETDB_INTERNAL;
*errnop = ERANGE;
- return NSS_STATUS_TRYAGAIN;
- }
+ return NSS_STATUS_TRYAGAIN;
+ }
if (saved_res != NULL)
nis_freeresult (saved_res);
@@ -435,6 +435,7 @@
if (result == NULL)
{
*errnop = ENOMEM;
+ *herrnop = NETDB_INTERNAL;
return NSS_STATUS_TRYAGAIN;
}
@@ -444,10 +445,13 @@
if (retval == NSS_STATUS_TRYAGAIN)
{
*errnop = errno;
+ *herrnop = TRY_AGAIN;
+ }
+ else
+ {
+ __set_errno (olderr);
*herrnop = NETDB_INTERNAL;
}
- else
- __set_errno (olderr);
nis_freeresult (result);
return retval;
}
@@ -502,7 +506,7 @@
buflen, errnop, h_errnop,
AI_V4MAPPED);
if (status == NSS_STATUS_SUCCESS)
- return status;
+ return status;
}
return internal_gethostbyname2_r (name, AF_INET, host, buffer,
Modified: trunk/libc/nptl/ChangeLog
==============================================================================
--- trunk/libc/nptl/ChangeLog (original)
+++ trunk/libc/nptl/ChangeLog Fri Dec 18 07:16:44 2009
@@ -1,3 +1,24 @@
+2009-12-17 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
+ using memset.
+
+2009-12-01 Dinakar Guniguntala <dino@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
+ FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
+ is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
+ is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
+
+2009-12-12 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
+ Don't update nwaiters after invalid timeout is recognized.
+
2009-11-27 Thomas Schwinge <thomas@xxxxxxxxxxxxxxxx>
* sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
Modified: trunk/libc/nptl/pthread_rwlock_init.c
==============================================================================
--- trunk/libc/nptl/pthread_rwlock_init.c (original)
+++ trunk/libc/nptl/pthread_rwlock_init.c Fri Dec 18 07:16:44 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2007, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
@@ -37,13 +37,7 @@
iattr = ((const struct pthread_rwlockattr *) attr) ?: &default_attr;
- rwlock->__data.__lock = 0;
- rwlock->__data.__nr_readers = 0;
- rwlock->__data.__readers_wakeup = 0;
- rwlock->__data.__writer_wakeup = 0;
- rwlock->__data.__nr_readers_queued = 0;
- rwlock->__data.__nr_writers_queued = 0;
- rwlock->__data.__writer = 0;
+ memset (rwlock, '\0', sizeof (*rwlock));
rwlock->__data.__flags
= iattr->lockkind == PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP;
@@ -56,8 +50,8 @@
0x80 in case private futexes are available and zero otherwise.
This leads to the following table:
- | pshared | result
- | shared private | shared private |
+ | pshared | result
+ | shared private | shared private |
------------+-----------------+-----------------+
!avail 0 | 0 0 | 0 0 |
avail 0x80 | 0x80 0 | 0 0x80 |
@@ -74,9 +68,6 @@
header.private_futex));
#endif
- rwlock->__data.__pad1 = 0;
- rwlock->__data.__pad2 = 0;
-
return 0;
}
strong_alias (__pthread_rwlock_init, pthread_rwlock_init)
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S Fri Dec 18 07:16:44 2009
@@ -91,11 +91,16 @@
8: cmpl $-1, %edi
je 9f
- /* XXX: The kernel so far doesn't support requeue to PI futex. */
- /* XXX: The kernel only supports FUTEX_CMP_REQUEUE to the same
- type of futex (private resp. shared). */
- testl $(PI_BIT | PS_BIT), MUTEX_KIND(%edi)
+ /* Do not use requeue for pshared condvars. */
+ testl $PS_BIT, MUTEX_KIND(%edi)
jne 9f
+
+ /* Requeue to a non-robust PI mutex if the PI bit is set and
+ the robust bit is not set. */
+ movl MUTEX_KIND(%edi), %eax
+ andl $(ROBUST_BIT|PI_BIT), %eax
+ cmpl $PI_BIT, %eax
+ je 81f
/* Wake up all threads. */
#ifdef __ASSUME_PRIVATE_FUTEX
@@ -138,6 +143,23 @@
cfi_restore_state
+81: movl $(FUTEX_CMP_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %ecx
+ movl $SYS_futex, %eax
+ movl $0x7fffffff, %esi
+ movl $1, %edx
+ /* Get the address of the futex involved. */
+# if MUTEX_FUTEX != 0
+ addl $MUTEX_FUTEX, %edi
+# endif
+ int $0x80
+
+ /* For any kind of error, which mainly is EAGAIN, we try again
+ with WAKE. The general test also covers running on old
+ kernels. */
+ cmpl $0xfffff001, %eax
+ jb 6b
+ jmp 9f
+
/* Initial locking failed. */
1:
#if cond_lock == 0
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S Fri Dec 18 07:16:44 2009
@@ -22,6 +22,7 @@
#include <lowlevellock.h>
#include <lowlevelcond.h>
#include <kernel-features.h>
+#include <pthread-pi-defines.h>
#include <pthread-errnos.h>
@@ -86,7 +87,17 @@
#endif
cmpl $-1, dep_mutex-cond_futex(%ebx)
sete %cl
- subl $1, %ecx
+ je 8f
+
+ movl dep_mutex-cond_futex(%ebx), %edx
+ /* Requeue to a non-robust PI mutex if the PI bit is set and
+ the robust bit is not set. */
+ movl MUTEX_KIND(%edx), %eax
+ andl $(ROBUST_BIT|PI_BIT), %eax
+ cmpl $PI_BIT, %eax
+ je 9f
+
+8: subl $1, %ecx
#ifdef __ASSUME_PRIVATE_FUTEX
andl $FUTEX_PRIVATE_FLAG, %ecx
#else
@@ -124,8 +135,34 @@
cfi_restore_state
-7: /* %ecx should be either FUTEX_WAKE_OP or
- FUTEX_WAKE_OP|FUTEX_PRIVATE_FLAG from the previous syscall. */
+9: movl $(FUTEX_CMP_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %ecx
+ movl $SYS_futex, %eax
+ movl $1, %edx
+ xorl %esi, %esi
+ movl dep_mutex-cond_futex(%ebx), %edi
+ movl (%ebx), %ebp
+ /* FIXME: Until Ingo fixes 4G/4G vDSO, 6 arg syscalls are broken for
+ sysenter.
+ ENTER_KERNEL */
+ int $0x80
+ popl %ebp
+ popl %esi
+
+ leal -cond_futex(%ebx), %edi
+
+ /* For any kind of error, we try again with WAKE.
+ The general test also covers running on old kernels. */
+ cmpl $-4095, %eax
+ jb 4f
+
+7:
+#ifdef __ASSUME_PRIVATE_FUTEX
+ andl $FUTEX_PRIVATE_FLAG, %ecx
+#else
+ andl %gs:PRIVATE_FUTEX, %ecx
+#endif
+ orl $FUTEX_WAKE, %ecx
+
xorl $(FUTEX_WAKE ^ FUTEX_WAKE_OP), %ecx
movl $SYS_futex, %eax
/* %edx should be 1 already from $FUTEX_WAKE_OP syscall.
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S Fri Dec 18 07:16:44 2009
@@ -22,6 +22,7 @@
#include <lowlevellock.h>
#include <lowlevelcond.h>
#include <pthread-errnos.h>
+#include <pthread-pi-defines.h>
#include <kernel-features.h>
@@ -95,7 +96,7 @@
addl $1, cond_futex(%ebx)
addl $(1 << nwaiters_shift), cond_nwaiters(%ebx)
-#define FRAME_SIZE 24
+#define FRAME_SIZE 32
subl $FRAME_SIZE, %esp
cfi_adjust_cfa_offset(FRAME_SIZE)
@@ -107,8 +108,10 @@
movl %edx, 16(%esp)
movl %eax, 20(%esp)
+ /* Reset the pi-requeued flag. */
+8: movl $0, 24(%esp)
/* Get the current time. */
-8: movl %ebx, %edx
+ movl %ebx, %edx
#ifdef __NR_clock_gettime
/* Get the clock number. */
movl cond_nwaiters(%ebx), %ebx
@@ -158,6 +161,7 @@
movl %edx, 8(%esp)
movl cond_futex(%ebx), %edi
+ movl %edi, 28(%esp)
/* Unlock. */
LOCK
@@ -172,13 +176,50 @@
4: call __pthread_enable_asynccancel
movl %eax, (%esp)
- leal 4(%esp), %esi
#if FUTEX_PRIVATE_FLAG > 255
xorl %ecx, %ecx
#endif
cmpl $-1, dep_mutex(%ebx)
sete %cl
- subl $1, %ecx
+ je 40f
+
+ movl dep_mutex(%ebx), %edi
+ /* Requeue to a non-robust PI mutex if the PI bit is set and
+ the robust bit is not set. */
+ movl MUTEX_KIND(%edi), %eax
+ andl $(ROBUST_BIT|PI_BIT), %eax
+ cmpl $PI_BIT, %eax
+ jne 40f
+
+ movl $(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %ecx
+ /* The following only works like this because we only support
+ two clocks, represented using a single bit. */
+ testl $1, cond_nwaiters(%ebx)
+ /* XXX Need to implement using sete instead of a jump. */
+ jne 42f
+ orl $FUTEX_CLOCK_REALTIME, %ecx
+
+ /* Requeue-PI uses absolute timeout */
+42: leal (%ebp), %esi
+ movl 28(%esp), %edx
+ addl $cond_futex, %ebx
+ movl $SYS_futex, %eax
+ ENTER_KERNEL
+ subl $cond_futex, %ebx
+ movl %eax, %esi
+ /* Set the pi-requeued flag only if the kernel has returned 0. The
+ kernel does not hold the mutex on ETIMEDOUT or any other error. */
+ cmpl $0, %eax
+ sete 24(%esp)
+ je 41f
+
+ /* Normal and PI futexes dont mix. Use normal futex functions only
+ if the kernel does not support the PI futex functions. */
+ cmpl $-ENOSYS, %eax
+ jne 41f
+ xorl %ecx, %ecx
+
+40: subl $1, %ecx
#ifdef __ASSUME_PRIVATE_FUTEX
andl $FUTEX_PRIVATE_FLAG, %ecx
#else
@@ -187,7 +228,8 @@
#if FUTEX_WAIT != 0
addl $FUTEX_WAIT, %ecx
#endif
- movl %edi, %edx
+ leal 4(%esp), %esi
+ movl 28(%esp), %edx
addl $cond_futex, %ebx
.Ladd_cond_futex:
movl $SYS_futex, %eax
@@ -196,7 +238,7 @@
.Lsub_cond_futex:
movl %eax, %esi
- movl (%esp), %eax
+41: movl (%esp), %eax
call __pthread_disable_asynccancel
.LcleanupEND:
@@ -284,10 +326,16 @@
#endif
jne 10f
+11: xorl %eax, %eax
+ /* With requeue_pi, the mutex lock is held in the kernel. */
+ movl 24(%esp), %ecx
+ testl %ecx, %ecx
+ jnz 26f
+
/* Remove cancellation handler. */
-11: movl 24+FRAME_SIZE(%esp), %eax
+ movl 24+FRAME_SIZE(%esp), %eax
call __pthread_mutex_cond_lock
- addl $FRAME_SIZE, %esp
+26: addl $FRAME_SIZE, %esp
cfi_adjust_cfa_offset(-FRAME_SIZE);
/* We return the result of the mutex_lock operation if it failed. */
@@ -316,6 +364,9 @@
ret
cfi_restore_state
+
+27: call __pthread_mutex_cond_lock_adjust
+ jmp 26b
/* Initial locking failed. */
1:
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S Fri Dec 18 07:16:44 2009
@@ -22,6 +22,8 @@
#include <lowlevellock.h>
#include <lowlevelcond.h>
#include <tcb-offsets.h>
+#include <pthread-errnos.h>
+#include <pthread-pi-defines.h>
#include <kernel-features.h>
@@ -43,6 +45,9 @@
cfi_lsda(DW_EH_PE_udata4, .LexceptSTART)
#endif
+ pushl %ebp
+ cfi_adjust_cfa_offset(4)
+ cfi_rel_offset(%ebp, 0)
pushl %edi
cfi_adjust_cfa_offset(4)
cfi_rel_offset(%edi, 0)
@@ -55,7 +60,7 @@
cfi_remember_state
xorl %esi, %esi
- movl 16(%esp), %ebx
+ movl 20(%esp), %ebx
/* Get internal lock. */
movl $1, %edx
@@ -71,7 +76,7 @@
/* Store the reference to the mutex. If there is already a
different value in there this is a bad user bug. */
2: cmpl $-1, dep_mutex(%ebx)
- movl 20(%esp), %eax
+ movl 24(%esp), %eax
je 15f
movl %eax, dep_mutex(%ebx)
@@ -87,7 +92,7 @@
addl $1, cond_futex(%ebx)
addl $(1 << nwaiters_shift), cond_nwaiters(%ebx)
-#define FRAME_SIZE 16
+#define FRAME_SIZE 20
subl $FRAME_SIZE, %esp
cfi_adjust_cfa_offset(FRAME_SIZE)
@@ -99,7 +104,9 @@
movl %edx, 8(%esp)
movl %eax, 12(%esp)
-8: movl cond_futex(%ebx), %edi
+ /* Reset the pi-requeued flag. */
+8: movl $0, 16(%esp)
+ movl cond_futex(%ebx), %ebp
/* Unlock. */
LOCK
@@ -114,12 +121,39 @@
4: call __pthread_enable_asynccancel
movl %eax, (%esp)
-#if FUTEX_PRIVATE_FLAG > 255
- xorl %ecx, %ecx
-#endif
+ xorl %ecx, %ecx
cmpl $-1, dep_mutex(%ebx)
sete %cl
- subl $1, %ecx
+ je 18f
+
+ movl dep_mutex(%ebx), %edi
+ /* Requeue to a non-robust PI mutex if the PI bit is set and
+ the robust bit is not set. */
+ movl MUTEX_KIND(%edi), %eax
+ andl $(ROBUST_BIT|PI_BIT), %eax
+ cmpl $PI_BIT, %eax
+ jne 18f
+
+ movl $(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %ecx
+ movl %ebp, %edx
+ xorl %esi, %esi
+ addl $cond_futex, %ebx
+ movl $SYS_futex, %eax
+ ENTER_KERNEL
+ subl $cond_futex, %ebx
+ /* Set the pi-requeued flag only if the kernel has returned 0. The
+ kernel does not hold the mutex on error. */
+ cmpl $0, %eax
+ sete 16(%esp)
+ je 19f
+
+ /* Normal and PI futexes dont mix. Use normal futex functions only
+ if the kernel does not support the PI futex functions. */
+ cmpl $-ENOSYS, %eax
+ jne 19f
+ xorl %ecx, %ecx
+
+18: subl $1, %ecx
#ifdef __ASSUME_PRIVATE_FUTEX
andl $FUTEX_PRIVATE_FLAG, %ecx
#else
@@ -128,7 +162,7 @@
#if FUTEX_WAIT != 0
addl $FUTEX_WAIT, %ecx
#endif
- movl %edi, %edx
+ movl %ebp, %edx
addl $cond_futex, %ebx
.Ladd_cond_futex:
movl $SYS_futex, %eax
@@ -136,7 +170,7 @@
subl $cond_futex, %ebx
.Lsub_cond_futex:
- movl (%esp), %eax
+19: movl (%esp), %eax
call __pthread_disable_asynccancel
.LcleanupEND:
@@ -212,9 +246,15 @@
#endif
jne 10f
-11: movl 20+FRAME_SIZE(%esp), %eax
+ /* With requeue_pi, the mutex lock is held in the kernel. */
+11: xorl %eax, %eax
+ movl 16(%esp), %ecx
+ testl %ecx, %ecx
+ jnz 20f
+
+ movl 24+FRAME_SIZE(%esp), %eax
call __pthread_mutex_cond_lock
- addl $FRAME_SIZE, %esp
+20: addl $FRAME_SIZE, %esp
cfi_adjust_cfa_offset(-FRAME_SIZE);
14: popl %ebx
@@ -226,11 +266,18 @@
popl %edi
cfi_adjust_cfa_offset(-4)
cfi_restore(%edi)
+ popl %ebp
+ cfi_adjust_cfa_offset(-4)
+ cfi_restore(%ebp)
/* We return the result of the mutex_lock operation. */
ret
cfi_restore_state
+
+21: call __pthread_mutex_cond_lock_adjust
+ xorl %eax, %eax
+ jmp 20b
/* Initial locking failed. */
1:
@@ -484,7 +531,7 @@
movl $0x7fffffff, %edx
ENTER_KERNEL
-5: movl 20+FRAME_SIZE(%esp), %eax
+5: movl 24+FRAME_SIZE(%esp), %eax
call __pthread_mutex_cond_lock
movl %esi, (%esp)
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S Fri Dec 18 07:16:44 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2002.
@@ -131,10 +131,10 @@
xorl %eax, %eax
-10: LOCK
+ LOCK
decl NWAITERS(%ebx)
- addl $12, %esp
+10: addl $12, %esp
.Ladd_esp:
popl %ebx
.Lpop_ebx:
@@ -268,19 +268,19 @@
.byte 14 # DW_CFA_def_cfa_offset
.uleb128 8
.byte 0x86 # DW_CFA_offset %esi
- .uleb128 2
+ .uleb128 2
.byte 4 # DW_CFA_advance_loc4
.long .Lpush_edi-.Lpush_esi
.byte 14 # DW_CFA_def_cfa_offset
.uleb128 12
.byte 0x87 # DW_CFA_offset %edi
- .uleb128 3
+ .uleb128 3
.byte 4 # DW_CFA_advance_loc4
.long .Lpush_ebx-.Lpush_edi
.byte 14 # DW_CFA_def_cfa_offset
.uleb128 16
.byte 0x83 # DW_CFA_offset %ebx
- .uleb128 4
+ .uleb128 4
.byte 4 # DW_CFA_advance_loc4
.long .Lsub_esp-.Lpush_ebx
.byte 14 # DW_CFA_def_cfa_offset
@@ -309,11 +309,11 @@
.byte 14 # DW_CFA_def_cfa_offset
.uleb128 28
.byte 0x86 # DW_CFA_offset %esi
- .uleb128 2
+ .uleb128 2
.byte 0x87 # DW_CFA_offset %edi
- .uleb128 3
+ .uleb128 3
.byte 0x83 # DW_CFA_offset %ebx
- .uleb128 4
+ .uleb128 4
.align 4
.LENDFDE:
Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h Fri Dec 18 07:16:44 2009
@@ -54,6 +54,8 @@
#define FUTEX_TRYLOCK_PI 8
#define FUTEX_WAIT_BITSET 9
#define FUTEX_WAKE_BITSET 10
+#define FUTEX_WAIT_REQUEUE_PI 11
+#define FUTEX_CMP_REQUEUE_PI 12
#define FUTEX_PRIVATE_FLAG 128
#define FUTEX_CLOCK_REALTIME 256
Modified: trunk/libc/nss/nss_files/files-hosts.c
==============================================================================
--- trunk/libc/nss/nss_files/files-hosts.c (original)
+++ trunk/libc/nss/nss_files/files-hosts.c Fri Dec 18 07:16:44 2009
@@ -423,6 +423,11 @@
if (! keep_stream)
internal_endent ();
}
+ else if (status == NSS_STATUS_TRYAGAIN)
+ {
+ *errnop = errno;
+ *herrnop = TRY_AGAIN;
+ }
else
{
*errnop = errno;
Modified: trunk/libc/posix/unistd.h
==============================================================================
--- trunk/libc/posix/unistd.h (original)
+++ trunk/libc/posix/unistd.h Fri Dec 18 07:16:44 2009
@@ -544,47 +544,47 @@
/* Replace the current process, executing PATH with arguments ARGV and
environment ENVP. ARGV and ENVP are terminated by NULL pointers. */
extern int execve (__const char *__path, char *__const __argv[],
- char *__const __envp[]) __THROW __nonnull ((1));
+ char *__const __envp[]) __THROW __nonnull ((1, 2));
#ifdef __USE_XOPEN2K8
/* Execute the file FD refers to, overlaying the running program image.
ARGV and ENVP are passed to the new program, as for `execve'. */
extern int fexecve (int __fd, char *__const __argv[], char *__const __envp[])
- __THROW;
+ __THROW __nonnull ((2));
#endif
/* Execute PATH with arguments ARGV and environment from `environ'. */
extern int execv (__const char *__path, char *__const __argv[])
- __THROW __nonnull ((1));
+ __THROW __nonnull ((1, 2));
/* Execute PATH with all arguments after PATH until a NULL pointer,
and the argument after that for environment. */
extern int execle (__const char *__path, __const char *__arg, ...)
- __THROW __nonnull ((1));
+ __THROW __nonnull ((1, 2));
/* Execute PATH with all arguments after PATH until
a NULL pointer and environment from `environ'. */
extern int execl (__const char *__path, __const char *__arg, ...)
- __THROW __nonnull ((1));
+ __THROW __nonnull ((1, 2));
/* Execute FILE, searching in the `PATH' environment variable if it contains
no slashes, with arguments ARGV and environment from `environ'. */
extern int execvp (__const char *__file, char *__const __argv[])
- __THROW __nonnull ((1));
+ __THROW __nonnull ((1, 2));
/* Execute FILE, searching in the `PATH' environment variable if
it contains no slashes, with all arguments after FILE until a
NULL pointer and environment from `environ'. */
extern int execlp (__const char *__file, __const char *__arg, ...)
- __THROW __nonnull ((1));
+ __THROW __nonnull ((1, 2));
#ifdef __USE_GNU
/* Execute FILE, searching in the `PATH' environment variable if it contains
no slashes, with arguments ARGV and environment from `environ'. */
extern int execvpe (__const char *__file, char *__const __argv[],
char *__const __envp[])
- __THROW __nonnull ((1));
+ __THROW __nonnull ((1, 2));
#endif
Modified: trunk/libc/sysdeps/i386/i686/multiarch/strcspn.S
==============================================================================
--- trunk/libc/sysdeps/i386/i686/multiarch/strcspn.S (original)
+++ trunk/libc/sysdeps/i386/i686/multiarch/strcspn.S Fri Dec 18 07:16:44 2009
@@ -23,7 +23,7 @@
#ifdef HAVE_SSE4_SUPPORT
#include <sysdep.h>
-#include <ifunc-defines.h>
+#include <init-arch.h>
#ifdef USE_AS_STRPBRK
#define STRCSPN_SSE42 __strpbrk_sse42
@@ -64,7 +64,7 @@
jne 1f
call __init_cpu_features
1: leal STRCSPN_IA32@GOTOFF(%ebx), %eax
- testl $(1<<20), CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET+__cpu_features@GOTOFF(%ebx)
+ testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features@GOTOFF(%ebx)
jz 2f
leal STRCSPN_SSE42@GOTOFF(%ebx), %eax
2: popl %ebx
@@ -80,7 +80,7 @@
jne 1f
call __init_cpu_features
1: leal STRCSPN_IA32, %eax
- testl $(1<<20), CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET+__cpu_features
+ testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features
jz 2f
leal STRCSPN_SSE42, %eax
2: ret
Modified: trunk/libc/sysdeps/i386/i686/multiarch/strlen.S
==============================================================================
--- trunk/libc/sysdeps/i386/i686/multiarch/strlen.S (original)
+++ trunk/libc/sysdeps/i386/i686/multiarch/strlen.S Fri Dec 18 07:16:44 2009
@@ -19,7 +19,7 @@
02111-1307 USA. */
#include <sysdep.h>
-#include <ifunc-defines.h>
+#include <init-arch.h>
/* Define multiple versions only for the definition in libc and for the
DSO. In static binaries, we need strlen before the initialization
@@ -46,7 +46,7 @@
jne 1f
call __init_cpu_features
1: leal __strlen_ia32@GOTOFF(%ebx), %eax
- testl $(1<<26), CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_EDX_OFFSET+__cpu_features@GOTOFF(%ebx)
+ testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx)
jz 2f
leal __strlen_sse2@GOTOFF(%ebx), %eax
2: popl %ebx
Modified: trunk/libc/sysdeps/i386/i686/multiarch/strspn.S
==============================================================================
--- trunk/libc/sysdeps/i386/i686/multiarch/strspn.S (original)
+++ trunk/libc/sysdeps/i386/i686/multiarch/strspn.S Fri Dec 18 07:16:44 2009
@@ -23,7 +23,7 @@
#ifdef HAVE_SSE4_SUPPORT
#include <sysdep.h>
-#include <ifunc-defines.h>
+#include <init-arch.h>
/* Define multiple versions only for the definition in libc. */
#ifndef NOT_IN_libc
@@ -49,7 +49,7 @@
jne 1f
call __init_cpu_features
1: leal __strspn_ia32@GOTOFF(%ebx), %eax
- testl $(1<<20), CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET+__cpu_features@GOTOFF(%ebx)
+ testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features@GOTOFF(%ebx)
jz 2f
leal __strspn_sse42@GOTOFF(%ebx), %eax
2: popl %ebx
@@ -65,7 +65,7 @@
jne 1f
call __init_cpu_features
1: leal __strspn_ia32, %eax
- testl $(1<<20), CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET+__cpu_features
+ testl $index_SSE2, CPUID_OFFSET+index_SSE4_2+__cpu_features
jz 2f
leal __strspn_sse42, %eax
2: ret
Modified: trunk/libc/sysdeps/posix/getaddrinfo.c
==============================================================================
--- trunk/libc/sysdeps/posix/getaddrinfo.c (original)
+++ trunk/libc/sysdeps/posix/getaddrinfo.c Fri Dec 18 07:16:44 2009
@@ -719,13 +719,8 @@
if (status != NSS_STATUS_TRYAGAIN
|| rc != ERANGE || herrno != NETDB_INTERNAL)
{
- if (herrno == NETDB_INTERNAL)
- {
- __set_h_errno (herrno);
- _res.options = old_res_options;
- return -EAI_SYSTEM;
- }
- if (herrno == TRY_AGAIN)
+ if (status == NSS_STATUS_TRYAGAIN
+ && herrno == TRY_AGAIN)
no_data = EAI_AGAIN;
else
no_data = herrno == NO_DATA;
Modified: trunk/libc/sysdeps/s390/s390-32/dl-trampoline.S
==============================================================================
--- trunk/libc/sysdeps/s390/s390-32/dl-trampoline.S (original)
+++ trunk/libc/sysdeps/s390/s390-32/dl-trampoline.S Fri Dec 18 07:16:44 2009
@@ -45,6 +45,7 @@
_dl_runtime_resolve:
stm %r2,%r5,32(%r15) # save registers
st %r14,8(%r15)
+ cfi_offset (r14, -88)
lr %r0,%r15 # create stack frame
ahi %r15,-96
cfi_adjust_cfa_offset (96)
@@ -76,6 +77,11 @@
st %r6,8(%r15)
st %r12,12(%r15)
st %r14,16(%r15)
+ cfi_offset (r6, -64)
+ cfi_offset (f0, -40)
+ cfi_offset (f2, -32)
+ cfi_offset (r12, -84)
+ cfi_offset (r14, -80)
lr %r12,%r15 # create stack frame
cfi_def_cfa_register (12)
ahi %r15,-96
Modified: trunk/libc/sysdeps/s390/s390-32/s390-mcount.S
==============================================================================
--- trunk/libc/sysdeps/s390/s390-32/s390-mcount.S (original)
+++ trunk/libc/sysdeps/s390/s390-32/s390-mcount.S Fri Dec 18 07:16:44 2009
@@ -50,11 +50,15 @@
ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(_mcount)
ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(_mcount), @function)
+ cfi_startproc
.align ALIGNARG(4)
C_LABEL(_mcount)
/* Save the caller-clobbered registers. */
ahi %r15,-128
+ cfi_adjust_cfa_offset (128)
stm %r14,%r5,96(%r15)
+ cfi_offset (r14, 0)
+ cfi_offset (r15, 4)
l %r2,132(%r15) # callers address = first parameter
la %r2,0(%r2) # clear bit 0
la %r3,0(%r14) # callees address = second parameter
@@ -77,7 +81,9 @@
*/
lm %r14,%r5,96(%r15)
ahi %r15,128
+ cfi_adjust_cfa_offset (-128)
br %r14
+ cfi_endproc
ASM_SIZE_DIRECTIVE(C_SYMBOL_NAME(_mcount))
#undef mcount
Modified: trunk/libc/sysdeps/s390/s390-64/dl-trampoline.S
==============================================================================
--- trunk/libc/sysdeps/s390/s390-64/dl-trampoline.S (original)
+++ trunk/libc/sysdeps/s390/s390-64/dl-trampoline.S Fri Dec 18 07:16:44 2009
@@ -42,6 +42,7 @@
_dl_runtime_resolve:
stmg 2,5,64(15) # save registers
stg 14,96(15)
+ cfi_offset (r14, -64)
lgr 0,15 # create stack frame
aghi 15,-160
cfi_adjust_cfa_offset (160)
@@ -72,6 +73,13 @@
stg %r6,16(%r15)
stg %r12,24(%r15)
stg %r14,32(%r15)
+ cfi_offset (r6, -96)
+ cfi_offset (f0, -56)
+ cfi_offset (f2, -48)
+ cfi_offset (f4, -40)
+ cfi_offset (f6, -32)
+ cfi_offset (r12, -136)
+ cfi_offset (r14, -128)
lgr %r12,%r15 # create stack frame
cfi_def_cfa_register (12)
aghi %r15,-160
Modified: trunk/libc/sysdeps/s390/s390-64/s390x-mcount.S
==============================================================================
--- trunk/libc/sysdeps/s390/s390-64/s390x-mcount.S (original)
+++ trunk/libc/sysdeps/s390/s390-64/s390x-mcount.S Fri Dec 18 07:16:44 2009
@@ -46,11 +46,15 @@
ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(_mcount)
ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(_mcount), @function)
+ cfi_startproc
.align ALIGNARG(4)
C_LABEL(_mcount)
/* Save the caller-clobbered registers. */
aghi %r15,-224
+ cfi_adjust_cfa_offset (224)
stmg %r14,%r5,160(%r15)
+ cfi_offset (r14, 0)
+ cfi_offset (r15, 8)
lg %r2,232(%r15) # callers address = first parameter
la %r2,0(%r2) # clear bit 0
la %r3,0(%r14) # callees address = second parameter
@@ -65,7 +69,9 @@
return value. */
lmg %r14,%r5,160(%r15)
aghi %r15,224
+ cfi_adjust_cfa_offset (-224)
br %r14
+ cfi_endproc
ASM_SIZE_DIRECTIVE(C_SYMBOL_NAME(_mcount))
#undef mcount
Modified: trunk/libc/sysdeps/sh/elf/initfini.c
==============================================================================
--- trunk/libc/sysdeps/sh/elf/initfini.c (original)
+++ trunk/libc/sysdeps/sh/elf/initfini.c Fri Dec 18 07:16:44 2009
@@ -1,5 +1,5 @@
/* Special .init and .fini section support for SH.
- Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2002, 2009 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
@@ -47,52 +47,48 @@
__asm__ ("\
\n\
#include \"defs.h\"\n\
-#define SHARED\n\
\n\
/*@HEADER_ENDS*/\n\
\n\
/*@TESTS_BEGIN*/\n\
-\n\
+ .align 5\n\
/*@TESTS_END*/\n\
\n\
/*@_init_PROLOG_BEGINS*/\n\
- .section .init\n\
+ .section .init,\"ax\",@progbits\n\
.align 5\n\
.global _init\n\
- .type _init,@function\n\
+ .type _init, @function\n\
_init:\n\
mov.l r12,@-r15\n\
+ mova .L12,r0\n\
+ mov.l .L12,r12\n\
mov.l r14,@-r15\n\
+ add r0,r12\n\
+ mov.l .L13,r0\n\
sts.l pr,@-r15\n\
-#ifdef SHARED\n\
- mova .L22,r0\n\
- mov.l .L22,r12\n\
- add r0,r12\n\
- mova .L23,r0\n\
- mov.l .L23,r1\n\
- add r0,r1\n\
-#else\n\
- mov.l .L23,r1\n\
-#endif\n\
- jsr @r1\n\
- mov r15,r14\n\
+ mov.l @(r0,r12),r1\n\
+ tst r1,r1\n\
+ bt/s .L8\n\
+ mov r15,r14\n\
+ mov.l .L14,r1\n\
+ bsrf r1\n\
+.LPCS0:\n\
+ nop\n\
+.L8:\n\
bra 1f\n\
- nop\n\
+ nop\n\
.align 2\n\
-#ifdef SHARED\n\
-.L22:\n\
+.L12:\n\
.long _GLOBAL_OFFSET_TABLE_\n\
-.L23:\n\
- .long __gmon_start__@PLT\n\
-#else\n\
-.L23:\n\
- .long __gmon_start__\n\
-#endif\n\
+.L13:\n\
+ .long __gmon_start__@GOT\n\
+.L14:\n\
+ .long __gmon_start__@PLT-(.LPCS0+2-(.))\n\
1:\n\
ALIGN\n\
END_INIT\n\
\n\
- \n\
/*@_init_PROLOG_ENDS*/\n\
\n\
/*@_init_EPILOG_BEGINS*/\n\
@@ -100,60 +96,58 @@
mov r14,r15\n\
lds.l @r15+,pr\n\
mov.l @r15+,r14\n\
+ mov.l @r15+,r12\n\
rts \n\
- mov.l @r15+,r12\n\
+ nop\n\
END_INIT\n\
- .section .text\n\
- .align 5\n\
- .weak __gmon_start__\n\
- .type __gmon_start__,@function\n\
-__gmon_start__:\n\
- mov.l r14,@-r15\n\
- mov r15,r14\n\
- mov r14,r15\n\
- rts \n\
- mov.l @r15+,r14\n\
- \n\
+\n\
/*@_init_EPILOG_ENDS*/\n\
\n\
/*@_fini_PROLOG_BEGINS*/\n\
- .section .fini\n\
+ .section .fini,\"ax\",@progbits\n\
.align 5\n\
.global _fini\n\
- .type _fini,@function\n\
+ .type _fini, @function\n\
_fini:\n\
mov.l r12,@-r15\n\
+ mova .L19,r0\n\
mov.l r14,@-r15\n\
sts.l pr,@-r15\n\
-#ifdef SHARED\n\
- mova .L27,r0\n\
- mov.l .L27,r12\n\
+ mov.l .L19,r12\n\
+ mov r15,r14\n\
add r0,r12\n\
-#endif\n\
- mov r15,r14\n\
+ bra 0f\n\
+ nop\n\
+ .align 2\n\
+.L19:\n\
+ .long _GLOBAL_OFFSET_TABLE_\n\
+0:\n\
ALIGN\n\
END_FINI\n\
-#ifdef SHARED\n\
+\n\
+/*@_fini_PROLOG_ENDS*/\n\
+ mov.l .L20,r1\n\
+ bsrf r1\n\
+.LPCS1:\n\
+ nop\n\
bra 1f\n\
- nop\n\
- .align 2\n\
-.L27:\n\
- .long _GLOBAL_OFFSET_TABLE_\n\
-#endif\n\
+ nop\n\
+ .align 2\n\
+.L20:\n\
+ .long i_am_not_a_leaf@PLT-(.LPCS1+2-(.))\n\
1:\n\
-/*@_fini_PROLOG_ENDS*/\n\
-\n\
/*@_fini_EPILOG_BEGINS*/\n\
.section .fini\n\
mov r14,r15\n\
lds.l @r15+,pr\n\
mov.l @r15+,r14\n\
+ mov.l @r15+,r12\n\
rts \n\
- mov.l @r15+,r12\n\
+ nop\n\
+ END_FINI\n\
\n\
- END_FINI\n\
- \n\
/*@_fini_EPILOG_ENDS*/\n\
\n\
-/*@TRAILER_BEGINS*/\
+/*@TRAILER_BEGINS*/\n\
+ .weak __gmon_start__\n\
");
Modified: trunk/libc/sysdeps/sh/sh4/fpu/fpu_control.h
==============================================================================
--- trunk/libc/sysdeps/sh/sh4/fpu/fpu_control.h (original)
+++ trunk/libc/sysdeps/sh/sh4/fpu/fpu_control.h Fri Dec 18 07:16:44 2009
@@ -1,5 +1,5 @@
/* FPU control word definitions. SH version.
- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2009 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
@@ -45,6 +45,8 @@
#define _FPU_GETCW(cw) __asm__ ("sts fpscr,%0" : "=r" (cw))
#if defined __GNUC__
+/* GCC provides this function. */
+extern void __set_fpscr (unsigned long);
#define _FPU_SETCW(cw) __set_fpscr ((cw))
#else
#define _FPU_SETCW(cw) __asm__ ("lds %0,fpscr" : : "r" (cw))
Modified: trunk/libc/sysdeps/unix/sysv/linux/Versions
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/Versions (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/Versions Fri Dec 18 07:16:44 2009
@@ -146,6 +146,8 @@
_sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
ntp_gettimex;
+
+ recvmmsg;
}
GLIBC_PRIVATE {
# functions used in other libraries
Modified: trunk/libc/sysdeps/unix/sysv/linux/bits/poll.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/bits/poll.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/bits/poll.h Fri Dec 18 07:16:44 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 2001, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 2001, 2006, 2009 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
@@ -27,7 +27,7 @@
#define POLLPRI 0x002 /* There is urgent data to read. */
#define POLLOUT 0x004 /* Writing now will not block. */
-#ifdef __USE_XOPEN
+#if defined __USE_XOPEN || defined __USE_XOPEN2K8
/* These values are defined in XPG4.2. */
# define POLLRDNORM 0x040 /* Normal data may be read. */
# define POLLRDBAND 0x080 /* Priority data may be read. */
Modified: trunk/libc/sysdeps/unix/sysv/linux/bits/socket.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/bits/socket.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/bits/socket.h Fri Dec 18 07:16:44 2009
@@ -234,8 +234,8 @@
#define MSG_MORE MSG_MORE
MSG_CMSG_CLOEXEC = 0x40000000 /* Set close_on_exit for file
- descriptor received through
- SCM_RIGHTS. */
+ descriptor received through
+ SCM_RIGHTS. */
#define MSG_CMSG_CLOEXEC MSG_CMSG_CLOEXEC
};
@@ -258,6 +258,15 @@
int msg_flags; /* Flags on received message. */
};
+
+#ifdef __USE_GNU
+/* For `recvmmsg'. */
+struct mmsghdr
+ {
+ struct msghdr msg_hdr; /* Actual message header. */
+ unsigned int msg_len; /* Number of received bytes for the entry. */
+ };
+#endif
/* Structure used for storage of ancillary data object information. */
struct cmsghdr
@@ -403,4 +412,18 @@
int l_linger; /* Time to linger. */
};
+
+__BEGIN_DECLS
+
+/* Receive a message as described by MESSAGE from socket FD.
+ Returns the number of bytes read or -1 for errors.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern int recvmmsg (int __fd, struct mmsghdr *__vmessages,
+ unsigned int __vlen, int __flags,
+ __const struct timespec *__tmo);
+
+__END_DECLS
+
#endif /* bits/socket.h */
Modified: trunk/libc/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/i386/bits/fcntl.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/i386/bits/fcntl.h Fri Dec 18 07:16:44 2009
@@ -29,7 +29,7 @@
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
- located on an ext2 file system */
+ located on a few file systems. */
#define O_ACCMODE 0003
#define O_RDONLY 00
#define O_WRONLY 01
@@ -41,7 +41,7 @@
#define O_APPEND 02000
#define O_NONBLOCK 04000
#define O_NDELAY O_NONBLOCK
-#define O_SYNC 010000
+#define O_SYNC 04010000
#define O_FSYNC O_SYNC
#define O_ASYNC 020000
@@ -57,7 +57,7 @@
We define the symbols here but let them do the same as O_SYNC since
this is a superset. */
#if defined __USE_POSIX199309 || defined __USE_UNIX98
-# define O_DSYNC O_SYNC /* Synchronize data. */
+# define O_DSYNC 010000 /* Synchronize data. */
# define O_RSYNC O_SYNC /* Synchronize read operations. */
#endif
Modified: trunk/libc/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h Fri Dec 18 07:16:44 2009
@@ -28,7 +28,7 @@
#endif
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
- located on an ext2 file system */
+ located on a few file systems. */
#define O_ACCMODE 0003
#define O_RDONLY 00
#define O_WRONLY 01
@@ -40,7 +40,7 @@
#define O_APPEND 02000
#define O_NONBLOCK 04000
#define O_NDELAY O_NONBLOCK
-#define O_SYNC 010000
+#define O_SYNC 04010000
#define O_FSYNC O_SYNC
#define O_ASYNC 020000
@@ -61,7 +61,7 @@
We define the symbols here but let them do the same as O_SYNC since
this is a superset. */
#if defined __USE_POSIX199309 || defined __USE_UNIX98
-# define O_DSYNC O_SYNC /* Synchronize data. */
+# define O_DSYNC 010000 /* Synchronize data. */
# define O_RSYNC O_SYNC /* Synchronize read operations. */
#endif
Modified: trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h Fri Dec 18 07:16:44 2009
@@ -29,7 +29,7 @@
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
- located on an ext2 file system */
+ located on a few file systems. */
#define O_ACCMODE 0003
#define O_RDONLY 00
#define O_WRONLY 01
@@ -41,7 +41,7 @@
#define O_APPEND 02000
#define O_NONBLOCK 04000
#define O_NDELAY O_NONBLOCK
-#define O_SYNC 010000
+#define O_SYNC 04010000
#define O_FSYNC O_SYNC
#define O_ASYNC 020000
@@ -61,7 +61,7 @@
We define the symbols here but let them do the same as O_SYNC since
this is a superset. */
#if defined __USE_POSIX199309 || defined __USE_UNIX98
-# define O_DSYNC O_SYNC /* Synchronize data. */
+# define O_DSYNC 010000 /* Synchronize data. */
# define O_RSYNC O_SYNC /* Synchronize read operations. */
#endif
Modified: trunk/libc/sysdeps/unix/sysv/linux/ptsname.c
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/ptsname.c (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/ptsname.c Fri Dec 18 07:16:44 2009
@@ -128,7 +128,7 @@
}
ptyno = minor (stp->st_rdev);
-#if __LINUX_KERNEL_VERSION >= 131443
+#if __LINUX_KERNEL_VERSION < 131443
/* This is for the old BSD pseudo terminals. As of Linux
2.1.115 these are no longer supported. */
if (major (stp->st_rdev) == 4)
Modified: trunk/libc/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/s390/bits/fcntl.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/s390/bits/fcntl.h Fri Dec 18 07:16:44 2009
@@ -29,7 +29,7 @@
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
- located on an ext2 file system */
+ located on a few file systems. */
#define O_ACCMODE 0003
#define O_RDONLY 00
#define O_WRONLY 01
@@ -41,7 +41,7 @@
#define O_APPEND 02000
#define O_NONBLOCK 04000
#define O_NDELAY O_NONBLOCK
-#define O_SYNC 010000
+#define O_SYNC 04010000
#define O_FSYNC O_SYNC
#define O_ASYNC 020000
@@ -66,7 +66,7 @@
We define the symbols here but let them do the same as O_SYNC since
this is a superset. */
#if defined __USE_POSIX199309 || defined __USE_UNIX98
-# define O_DSYNC O_SYNC /* Synchronize data. */
+# define O_DSYNC 010000 /* Synchronize data. */
# define O_RSYNC O_SYNC /* Synchronize read operations. */
#endif
Modified: trunk/libc/sysdeps/unix/sysv/linux/sh/bits/fcntl.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/sh/bits/fcntl.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/sh/bits/fcntl.h Fri Dec 18 07:16:44 2009
@@ -29,7 +29,7 @@
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
- located on an ext2 file system */
+ located on a few file systems. */
#define O_ACCMODE 0003
#define O_RDONLY 00
#define O_WRONLY 01
@@ -41,7 +41,7 @@
#define O_APPEND 02000
#define O_NONBLOCK 04000
#define O_NDELAY O_NONBLOCK
-#define O_SYNC 010000
+#define O_SYNC 04010000
#define O_FSYNC O_SYNC
#define O_ASYNC 020000
@@ -57,7 +57,7 @@
We define the symbols here but let them do the same as O_SYNC since
this is a superset. */
#if defined __USE_POSIX199309 || defined __USE_UNIX98
-# define O_DSYNC O_SYNC /* Synchronize data. */
+# define O_DSYNC 010000 /* Synchronize data. */
# define O_RSYNC O_SYNC /* Synchronize read operations. */
#endif
Modified: trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h Fri Dec 18 07:16:44 2009
@@ -29,7 +29,7 @@
#endif
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
- located on an ext2 file system */
+ located on a few file systems. */
#define O_RDONLY 0x0000
#define O_WRONLY 0x0001
#define O_RDWR 0x0002
@@ -39,7 +39,7 @@
#define O_CREAT 0x0200 /* not fcntl */
#define O_TRUNC 0x0400 /* not fcntl */
#define O_EXCL 0x0800 /* not fcntl */
-#define O_SYNC 0x2000
+#define O_SYNC 0x802000
#define O_NONBLOCK 0x4000
#define O_NDELAY (0x0004 | O_NONBLOCK)
#define O_NOCTTY 0x8000 /* not fcntl */
@@ -64,7 +64,7 @@
operations. We define the symbols here but let them do the same as
O_SYNC since this is a superset. */
#if defined __USE_POSIX199309 || defined __USE_UNIX98
-# define O_DSYNC O_SYNC /* Synchronize data. */
+# define O_DSYNC 0x2000 /* Synchronize data. */
# define O_RSYNC O_SYNC /* Synchronize read operations. */
#endif
Modified: trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/poll.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/poll.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/poll.h Fri Dec 18 07:16:44 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 2001, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 2001, 2006, 2009 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
@@ -27,7 +27,7 @@
#define POLLPRI 0x002 /* There is urgent data to read. */
#define POLLOUT 0x004 /* Writing now will not block. */
-#ifdef __USE_XOPEN
+#if defined __USE_XOPEN || defined __USE_XOPEN2K8
/* These values are defined in XPG4.2. */
# define POLLRDNORM 0x040 /* Normal data may be read. */
# define POLLRDBAND 0x080 /* Priority data may be read. */
Modified: trunk/libc/sysdeps/unix/sysv/linux/syscalls.list
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/syscalls.list (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/syscalls.list Fri Dec 18 07:16:44 2009
@@ -53,6 +53,7 @@
putpmsg - putpmsg i:ippii putpmsg
query_module EXTRA query_module i:sipip query_module
quotactl EXTRA quotactl i:isip quotactl
+recvmmsg EXTRA recvmmsg Ci:ipiip recvmmsg
remap_file_pages - remap_file_pages i:piiii __remap_file_pages remap_file_pages
sched_getp - sched_getparam i:ip __sched_getparam sched_getparam
sched_gets - sched_getscheduler i:i __sched_getscheduler sched_getscheduler
Modified: trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h Fri Dec 18 07:16:44 2009
@@ -29,7 +29,7 @@
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
- located on an ext2 file system */
+ located on a few file systems. */
#define O_ACCMODE 0003
#define O_RDONLY 00
#define O_WRONLY 01
@@ -41,7 +41,7 @@
#define O_APPEND 02000
#define O_NONBLOCK 04000
#define O_NDELAY O_NONBLOCK
-#define O_SYNC 010000
+#define O_SYNC 04010000
#define O_FSYNC O_SYNC
#define O_ASYNC 020000
@@ -57,7 +57,7 @@
We define the symbols here but let them do the same as O_SYNC since
this is a superset. */
#if defined __USE_POSIX199309 || defined __USE_UNIX98
-# define O_DSYNC O_SYNC /* Synchronize data. */
+# define O_DSYNC 010000 /* Synchronize data. */
# define O_RSYNC O_SYNC /* Synchronize read operations. */
#endif
Modified: trunk/libc/sysdeps/x86_64/multiarch/init-arch.h
==============================================================================
--- trunk/libc/sysdeps/x86_64/multiarch/init-arch.h (original)
+++ trunk/libc/sysdeps/x86_64/multiarch/init-arch.h Fri Dec 18 07:16:44 2009
@@ -15,6 +15,20 @@
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+
+#ifdef __ASSEMBLER__
+
+#include <ifunc-defines.h>
+
+#define bit_SSE2 (1 << 26)
+#define bit_SSSE3 (1 << 9)
+#define bit_SSE4_2 (1 << 20)
+
+#define index_SSE2 COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_EDX_OFFSET
+#define index_SSSE3 COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET
+#define index_SSE4_2 COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET
+
+#else /* __ASSEMBLER__ */
#include <sys/param.h>
@@ -71,3 +85,5 @@
#define HAS_POPCOUNT HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, 23)
#define HAS_SSE4_2 HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, 20)
#define HAS_FMA HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, 12)
+
+#endif /* __ASSEMBLER__ */
Modified: trunk/libc/sysdeps/x86_64/multiarch/rawmemchr.S
==============================================================================
--- trunk/libc/sysdeps/x86_64/multiarch/rawmemchr.S (original)
+++ trunk/libc/sysdeps/x86_64/multiarch/rawmemchr.S Fri Dec 18 07:16:44 2009
@@ -18,7 +18,7 @@
02111-1307 USA. */
#include <sysdep.h>
-#include <ifunc-defines.h>
+#include <init-arch.h>
/* Define multiple versions only for the definition in lib. */
@@ -30,7 +30,7 @@
jne 1f
call __init_cpu_features
1: leaq __rawmemchr_sse2(%rip), %rax
- testl $(1<<20), __cpu_features+CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET(%rip)
+ testl $bit_SSE4_2, __cpu_features+CPUID_OFFSET+index_SSE4_2(%rip)
jz 2f
leaq __rawmemchr_sse42(%rip), %rax
2: ret
Modified: trunk/libc/sysdeps/x86_64/multiarch/strchr.S
==============================================================================
--- trunk/libc/sysdeps/x86_64/multiarch/strchr.S (original)
+++ trunk/libc/sysdeps/x86_64/multiarch/strchr.S Fri Dec 18 07:16:44 2009
@@ -18,7 +18,7 @@
02111-1307 USA. */
#include <sysdep.h>
-#include <ifunc-defines.h>
+#include <init-arch.h>
/* Define multiple versions only for the definition in libc. */
@@ -30,7 +30,7 @@
jne 1f
call __init_cpu_features
1: leaq __strchr_sse2(%rip), %rax
- testl $(1<<20), __cpu_features+CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET(%rip)
+ testl $bit_SSE4_2, __cpu_features+CPUID_OFFSET+index_SSE4_2(%rip)
jz 2f
leaq __strchr_sse42(%rip), %rax
2: ret
Modified: trunk/libc/sysdeps/x86_64/multiarch/strcmp.S
==============================================================================
--- trunk/libc/sysdeps/x86_64/multiarch/strcmp.S (original)
+++ trunk/libc/sysdeps/x86_64/multiarch/strcmp.S Fri Dec 18 07:16:44 2009
@@ -19,7 +19,7 @@
02111-1307 USA. */
#include <sysdep.h>
-#include <ifunc-defines.h>
+#include <init-arch.h>
#ifdef USE_AS_STRNCMP
/* Since the counter, %r11, is unsigned, we branch to strcmp_exitz
@@ -64,10 +64,10 @@
call __init_cpu_features
1:
leaq STRCMP_SSE42(%rip), %rax
- testl $(1<<20), __cpu_features+CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET(%rip)
+ testl $bit_SSE4_2, __cpu_features+CPUID_OFFSET+index_SSE4_2(%rip)
jnz 2f
leaq STRCMP_SSSE3(%rip), %rax
- testl $(1<<9), __cpu_features+CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET(%rip)
+ testl $bit_SSSE3, __cpu_features+CPUID_OFFSET+index_SSSE3(%rip)
jnz 2f
leaq STRCMP_SSE2(%rip), %rax
2: ret
Modified: trunk/libc/sysdeps/x86_64/multiarch/strcpy.S
==============================================================================
--- trunk/libc/sysdeps/x86_64/multiarch/strcpy.S (original)
+++ trunk/libc/sysdeps/x86_64/multiarch/strcpy.S Fri Dec 18 07:16:44 2009
@@ -19,7 +19,7 @@
02111-1307 USA. */
#include <sysdep.h>
-#include <ifunc-defines.h>
+#include <init-arch.h>
#if !defined (USE_AS_STPCPY) && !defined (USE_AS_STRNCPY)
# ifndef STRCPY
@@ -63,7 +63,7 @@
jne 1f
call __init_cpu_features
1: leaq STRCPY_SSE2(%rip), %rax
- testl $(1<<9), __cpu_features+CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET(%rip)
+ testl $bit_SSSE3, __cpu_features+CPUID_OFFSET+index_SSSE3(%rip)
jz 2f
leaq STRCPY_SSSE3(%rip), %rax
2: ret
Modified: trunk/libc/sysdeps/x86_64/multiarch/strcspn.S
==============================================================================
--- trunk/libc/sysdeps/x86_64/multiarch/strcspn.S (original)
+++ trunk/libc/sysdeps/x86_64/multiarch/strcspn.S Fri Dec 18 07:16:44 2009
@@ -23,7 +23,7 @@
#ifdef HAVE_SSE4_SUPPORT
#include <sysdep.h>
-#include <ifunc-defines.h>
+#include <init-arch.h>
#ifdef USE_AS_STRPBRK
#define STRCSPN_SSE42 __strpbrk_sse42
@@ -49,7 +49,7 @@
jne 1f
call __init_cpu_features
1: leaq STRCSPN_SSE2(%rip), %rax
- testl $(1<<20), __cpu_features+CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET(%rip)
+ testl $bit_SSE4_2, __cpu_features+CPUID_OFFSET+index_SSE4_2(%rip)
jz 2f
leaq STRCSPN_SSE42(%rip), %rax
2: ret
Modified: trunk/libc/sysdeps/x86_64/multiarch/strlen.S
==============================================================================
--- trunk/libc/sysdeps/x86_64/multiarch/strlen.S (original)
+++ trunk/libc/sysdeps/x86_64/multiarch/strlen.S Fri Dec 18 07:16:44 2009
@@ -19,7 +19,7 @@
02111-1307 USA. */
#include <sysdep.h>
-#include <ifunc-defines.h>
+#include <init-arch.h>
/* Define multiple versions only for the definition in libc and for
@@ -33,7 +33,7 @@
jne 1f
call __init_cpu_features
1: leaq __strlen_sse2(%rip), %rax
- testl $(1<<20), __cpu_features+CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET(%rip)
+ testl $bit_SSE4_2, __cpu_features+CPUID_OFFSET+index_SSE4_2(%rip)
jz 2f
leaq __strlen_sse42(%rip), %rax
2: ret
Modified: trunk/libc/sysdeps/x86_64/multiarch/strrchr.S
==============================================================================
--- trunk/libc/sysdeps/x86_64/multiarch/strrchr.S (original)
+++ trunk/libc/sysdeps/x86_64/multiarch/strrchr.S Fri Dec 18 07:16:44 2009
@@ -18,7 +18,7 @@
02111-1307 USA. */
#include <sysdep.h>
-#include <ifunc-defines.h>
+#include <init-arch.h>
/* Define multiple versions only for the definition in libc and for
@@ -32,7 +32,7 @@
jne 1f
call __init_cpu_features
1: leaq __strrchr_sse2(%rip), %rax
- testl $(1<<20), __cpu_features+CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET(%rip)
+ testl $bit_SSE4_2, __cpu_features+CPUID_OFFSET+index_SSE4_2(%rip)
jz 2f
leaq __strrchr_sse42(%rip), %rax
2: ret
Modified: trunk/libc/sysdeps/x86_64/multiarch/strspn.S
==============================================================================
--- trunk/libc/sysdeps/x86_64/multiarch/strspn.S (original)
+++ trunk/libc/sysdeps/x86_64/multiarch/strspn.S Fri Dec 18 07:16:44 2009
@@ -23,7 +23,7 @@
#ifdef HAVE_SSE4_SUPPORT
#include <sysdep.h>
-#include <ifunc-defines.h>
+#include <init-arch.h>
/* Define multiple versions only for the definition in libc. */
#ifndef NOT_IN_libc
@@ -34,7 +34,7 @@
jne 1f
call __init_cpu_features
1: leaq __strspn_sse2(%rip), %rax
- testl $(1<<20), __cpu_features+CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET(%rip)
+ testl $bit_SSE4_2, __cpu_features+CPUID_OFFSET+index_SSE4_2(%rip)
jz 2f
leaq __strspn_sse42(%rip), %rax
2: ret
Modified: trunk/ports/ChangeLog.arm
==============================================================================
--- trunk/ports/ChangeLog.arm (original)
+++ trunk/ports/ChangeLog.arm Fri Dec 18 07:16:44 2009
@@ -1,3 +1,17 @@
+2009-12-16 Thomas Schwinge <thomas@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/arm/eabi/Makefile [gmon] (sysdep_routines): Add arm-mcount.
+ * sysdeps/arm/eabi/machine-gmon.h (mcount_internal): Define to
+ `__mcount_internal'.
+ (MCOUNT (__gnu_mcount_nc), OLD_MCOUNT (_mcount), mcount): Move to...
+ * sysdeps/arm/eabi/arm-mcount.S: ... this new file as __gnu_mcount_nc,
+ _mcount, and mcount, respectively.
+
+2009-12-15 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Redefine O_SYNC and
+ O_DSYNC to match 2.6.33+ kernels.
+
2009-11-19 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
* sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Introduce new symbol
Modified: trunk/ports/ChangeLog.m68k
==============================================================================
--- trunk/ports/ChangeLog.m68k (original)
+++ trunk/ports/ChangeLog.m68k Fri Dec 18 07:16:44 2009
@@ -1,3 +1,14 @@
+2009-12-16 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ [BZ #11093]
+ * sysdeps/unix/sysv/linux/m68k/bits/poll.h: Define POLLRDNORM,
+ POLLRDBAND, POLLWRNORM, and POLLWRBAND also for POSIX 2008.
+
+2009-12-16 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Redefine O_SYNC and
+ O_DSYNC to match 2.6.33+ kernels.
+
2009-11-23 Andreas Schwab <schwab@xxxxxxxxxxxxxx>
* sysdeps/unix/sysv/linux/m68k/bits/stat.h: Use struct timespec
Modified: trunk/ports/ChangeLog.mips
==============================================================================
--- trunk/ports/ChangeLog.mips (original)
+++ trunk/ports/ChangeLog.mips Fri Dec 18 07:16:44 2009
@@ -1,3 +1,23 @@
+2009-12-16 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ [BZ #11093]
+ * sysdeps/unix/sysv/linux/mips/bits/poll.h: Define POLLRDNORM,
+ POLLRDBAND, POLLWRNORM, and POLLWRBAND also for POSIX 2008.
+
+2009-12-16 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/mips/dl-lookup.c: Update from generic version.
+
+2009-12-15 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Redefine O_SYNC and
+ O_DSYNC to match 2.6.33+ kernels.
+
+2009-12-09 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/mips/bits/socket.h: Define mmsghdr and
+ declare recvmmsg.
+
2009-12-01 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
* sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list
Modified: trunk/ports/sysdeps/arm/eabi/Makefile
==============================================================================
--- trunk/ports/sysdeps/arm/eabi/Makefile (original)
+++ trunk/ports/sysdeps/arm/eabi/Makefile Fri Dec 18 07:16:44 2009
@@ -13,6 +13,10 @@
# get offset to rtld_global._dl_hwcap
gen-as-const-headers += rtld-global-offsets.sym
+endif
+
+ifeq ($(subdir),gmon)
+sysdep_routines += arm-mcount
endif
ifeq ($(subdir),debug)
Modified: trunk/ports/sysdeps/arm/eabi/machine-gmon.h
==============================================================================
--- trunk/ports/sysdeps/arm/eabi/machine-gmon.h (original)
+++ trunk/ports/sysdeps/arm/eabi/machine-gmon.h Fri Dec 18 07:16:44 2009
@@ -1,5 +1,5 @@
/* Machine-dependent definitions for profiling support. ARM EABI version.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009 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
@@ -17,83 +17,18 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <sysdep.h>
+
/* GCC for the ARM cannot compile __builtin_return_address(N) for N != 0,
so we must use an assembly stub. */
-#include <sysdep.h>
-static void mcount_internal (u_long frompc, u_long selfpc) __attribute_used__;
+/* We must not pollute the global namespace. */
+#define mcount_internal __mcount_internal
+extern void mcount_internal (u_long frompc, u_long selfpc) internal_function;
#define _MCOUNT_DECL(frompc, selfpc) \
-static void mcount_internal (u_long frompc, u_long selfpc)
-
-/* Use an assembly stub with a special ABI. The calling lr has been
- pushed to the stack (which will be misaligned). We should preserve
- all registers except ip and pop a word off the stack.
-
- NOTE: This assumes mcount_internal does not clobber any non-core
- (coprocessor) registers. Currently this is true, but may require
- additional attention in the future.
-
- The calling sequence looks something like:
-func:
- push {lr}
- bl __gnu_mount_nc
- <function body>
- */
+ void internal_function mcount_internal (u_long frompc, u_long selfpc)
-#define MCOUNT \
-void __attribute__((__naked__)) __gnu_mcount_nc(void) \
-{ \
- asm ("push {r0, r1, r2, r3, lr}\n\t" \
- "bic r1, lr, #1\n\t" \
- "ldr r0, [sp, #20]\n\t" \
- "bl mcount_internal\n\t" \
- "pop {r0, r1, r2, r3, ip, lr}\n\t" \
- "bx ip"); \
-} \
-OLD_MCOUNT
-
-/* Provide old mcount for backwards compatibility. This requires
- code be compiled with APCS frame pointers. */
-
-#ifndef NO_UNDERSCORES
-/* The asm symbols for C functions are `_function'.
- The canonical name for the counter function is `mcount', no _. */
-void _mcount (void) asm ("mcount");
-#else
-/* The canonical name for the function is `_mcount' in both C and asm,
- but some old asm code might assume it's `mcount'. */
-void _mcount (void);
-weak_alias (_mcount, mcount)
-#endif
-
-#ifdef __thumb2__
-
-#define OLD_MCOUNT \
-void __attribute__((__naked__)) _mcount (void) \
-{ \
- __asm__("push {r0, r1, r2, r3, fp, lr};" \
- "movs r0, fp;" \
- "ittt ne;" \
- "ldrne r0, [r0, #-4];" \
- "movsne r1, lr;" \
- "blne mcount_internal;" \
- "pop {r0, r1, r2, r3, fp, pc}"); \
-}
-
-#else
-
-#define OLD_MCOUNT \
-void __attribute__((__naked__)) _mcount (void) \
-{ \
- __asm__("stmdb sp!, {r0, r1, r2, r3, fp, lr};" \
- "movs fp, fp;" \
- "ldrne r0, [fp, #-4];" \
- "movnes r1, lr;" \
- "blne mcount_internal;" \
- "ldmia sp!, {r0, r1, r2, r3, fp, lr};" \
- "bx lr"); \
-}
-
-#endif
+/* Define MCOUNT as empty since we have the implementation in another file. */
+#define MCOUNT
Modified: trunk/ports/sysdeps/mips/dl-lookup.c
==============================================================================
--- trunk/ports/sysdeps/mips/dl-lookup.c (original)
+++ trunk/ports/sysdeps/mips/dl-lookup.c Fri Dec 18 07:16:44 2009
@@ -794,7 +794,7 @@
if (__builtin_expect (protected != 0, 0))
{
/* It is very tricky. We need to figure out what value to
- return for the protected symbol. */
+ return for the protected symbol. */
if (type_class == ELF_RTYPE_CLASS_PLT)
{
if (current_value.s != NULL && current_value.m != undef_map)
@@ -839,7 +839,8 @@
version, type_class, flags, skip_map);
/* The object is used. */
- current_value.m->l_used = 1;
+ if (__builtin_expect (current_value.m->l_used == 0, 0))
+ current_value.m->l_used = 1;
if (__builtin_expect (GLRO(dl_debug_mask)
& (DL_DEBUG_BINDINGS|DL_DEBUG_PRELINK), 0))
@@ -861,7 +862,7 @@
Elf_Symndx nchain;
if (__builtin_expect (map->l_info[DT_ADDRTAGIDX (DT_GNU_HASH) + DT_NUM
- + DT_THISPROCNUM + DT_VERSIONTAGNUM
+ + DT_THISPROCNUM + DT_VERSIONTAGNUM
+ DT_EXTRANUM + DT_VALNUM] != NULL, 1))
{
Elf32_Word *hash32
Modified: trunk/ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h Fri Dec 18 07:16:44 2009
@@ -41,7 +41,7 @@
#define O_APPEND 02000
#define O_NONBLOCK 04000
#define O_NDELAY O_NONBLOCK
-#define O_SYNC 010000
+#define O_SYNC 04010000
#define O_FSYNC O_SYNC
#define O_ASYNC 020000
@@ -57,7 +57,7 @@
We define the symbols here but let them do the same as O_SYNC since
this is a superset. */
#if defined __USE_POSIX199309 || defined __USE_UNIX98
-# define O_DSYNC O_SYNC /* Synchronize data. */
+# define O_DSYNC 010000 /* Synchronize data. */
# define O_RSYNC O_SYNC /* Synchronize read operations. */
#endif
Modified: trunk/ports/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h Fri Dec 18 07:16:44 2009
@@ -40,7 +40,7 @@
#define O_APPEND 02000
#define O_NONBLOCK 04000
#define O_NDELAY O_NONBLOCK
-#define O_SYNC 010000
+#define O_SYNC 04010000
#define O_FSYNC O_SYNC
#define O_ASYNC 020000
@@ -56,7 +56,7 @@
We define the symbols here but let them do the same as O_SYNC since
this is a superset. */
#if defined __USE_POSIX199309 || defined __USE_UNIX98
-# define O_DSYNC O_SYNC /* Synchronize data. */
+# define O_DSYNC 010000 /* Synchronize data. */
# define O_RSYNC O_SYNC /* Synchronize read operations. */
#endif
Modified: trunk/ports/sysdeps/unix/sysv/linux/m68k/bits/poll.h
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/m68k/bits/poll.h (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/m68k/bits/poll.h Fri Dec 18 07:16:44 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 2001, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 2001, 2008, 2009 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
@@ -27,7 +27,7 @@
#define POLLPRI 0x002 /* There is urgent data to read. */
#define POLLOUT 0x004 /* Writing now will not block. */
-#ifdef __USE_XOPEN
+#if defined __USE_XOPEN || defined __USE_XOPEN2K8
/* These values are defined in XPG4.2. */
# define POLLRDNORM 0x040 /* Normal data may be read. */
# define POLLRDBAND 0x080 /* Priority data may be read. */
Modified: trunk/ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h Fri Dec 18 07:16:44 2009
@@ -36,7 +36,7 @@
#define O_WRONLY 01
#define O_RDWR 02
#define O_APPEND 0x0008
-#define O_SYNC 0x0010
+#define O_SYNC 0x4010
#define O_NONBLOCK 0x0080
#define O_NDELAY O_NONBLOCK
#define O_CREAT 0x0100 /* not fcntl */
@@ -58,7 +58,7 @@
We define the symbols here but let them do the same as O_SYNC since
this is a superset. */
#if defined __USE_POSIX199309 || defined __USE_UNIX98
-# define O_DSYNC O_SYNC /* Synchronize data. */
+# define O_DSYNC 0x0010 /* Synchronize data. */
# define O_RSYNC O_SYNC /* Synchronize read operations. */
#endif
Modified: trunk/ports/sysdeps/unix/sysv/linux/mips/bits/poll.h
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/mips/bits/poll.h (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/mips/bits/poll.h Fri Dec 18 07:16:44 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 2001, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 2001, 2006, 2009 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
@@ -27,7 +27,7 @@
#define POLLPRI 0x002 /* There is urgent data to read. */
#define POLLOUT 0x004 /* Writing now will not block. */
-#ifdef __USE_XOPEN
+#if defined __USE_XOPEN || defined __USE_XOPEN2K8
/* These values are defined in XPG4.2. */
# define POLLRDNORM 0x040 /* Normal data may be read. */
# define POLLRDBAND 0x080 /* Priority data may be read. */
Modified: trunk/ports/sysdeps/unix/sysv/linux/mips/bits/socket.h
==============================================================================
--- trunk/ports/sysdeps/unix/sysv/linux/mips/bits/socket.h (original)
+++ trunk/ports/sysdeps/unix/sysv/linux/mips/bits/socket.h Fri Dec 18 07:16:44 2009
@@ -234,8 +234,8 @@
#define MSG_MORE MSG_MORE
MSG_CMSG_CLOEXEC = 0x40000000 /* Set close_on_exit for file
- descriptor received through
- SCM_RIGHTS. */
+ descriptor received through
+ SCM_RIGHTS. */
#define MSG_CMSG_CLOEXEC MSG_CMSG_CLOEXEC
};
@@ -255,6 +255,15 @@
int msg_flags; /* Flags on received message. */
};
+
+#ifdef __USE_GNU
+/* For `recvmmsg'. */
+struct mmsghdr
+ {
+ struct msghdr msg_hdr; /* Actual message header. */
+ unsigned int msg_len; /* Number of received bytes for the entry. */
+ };
+#endif
/* Structure used for storage of ancillary data object information. */
struct cmsghdr
@@ -397,4 +406,18 @@
int l_linger; /* Time to linger. */
};
+
+__BEGIN_DECLS
+
+/* Receive a message as described by MESSAGE from socket FD.
+ Returns the number of bytes read or -1 for errors.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern int recvmmsg (int __fd, struct mmsghdr *__vmessages,
+ unsigned int __vlen, int __flags,
+ __const struct timespec *__tmo);
+
+__END_DECLS
+
#endif /* bits/socket.h */