mirror of git://sourceware.org/git/glibc.git
Merge remote branch 'origin/release/2.12/master' into fedora/2.12/master
This commit is contained in:
commit
aaad868015
File diff suppressed because it is too large
Load Diff
20
INSTALL
20
INSTALL
|
|
@ -298,16 +298,16 @@ build the GNU C library:
|
|||
|
||||
* GCC 3.4 or newer, GCC 4.1 recommended
|
||||
|
||||
The GNU C library can only be compiled with the GNU C compiler
|
||||
family. For the 2.3 releases, GCC 3.2 or higher is required; GCC
|
||||
3.4 is the compiler we advise to use for 2.3 versions. For the
|
||||
2.4 release, GCC 3.4 or higher is required; as of this writing,
|
||||
GCC 4.1 is the compiler we advise to use for current versions. On
|
||||
certain machines including `powerpc64', compilers prior to GCC 4.0
|
||||
have bugs that prevent them compiling the C library code in the
|
||||
2.4 release. On other machines, GCC 4.1 is required to build the C
|
||||
library with support for the correct `long double' type format;
|
||||
these include `powerpc' (32 bit), `s390' and `s390x'.
|
||||
For the 2.4 release or later, GCC 3.4 or higher is required; as of
|
||||
this writing, GCC 4.4 is the compiler we advise to use for current
|
||||
versions. On certain machines including `powerpc64', compilers
|
||||
prior to GCC 4.0 have bugs that prevent them compiling the C
|
||||
library code in the 2.4 release. On other machines, GCC 4.1 is
|
||||
required to build the C library with support for the correct `long
|
||||
double' type format; these include `powerpc' (32 bit), `s390' and
|
||||
`s390x'. For other architectures special compiler-provided
|
||||
headers are needed (like `cpuid.h' on x86) which only come with
|
||||
later compiler versions.
|
||||
|
||||
You can use whatever compiler you like to compile programs that
|
||||
use GNU libc, but be aware that both GCC 2.7 and 2.8 have bugs in
|
||||
|
|
|
|||
2
NEWS
2
NEWS
|
|
@ -16,7 +16,7 @@ Version 2.12
|
|||
11185, 11186, 11187, 11188, 11189, 11190, 11191, 11192, 11193, 11194,
|
||||
11200, 11230, 11235, 11242, 11254, 11258, 11271, 11272, 11276, 11279,
|
||||
11287, 11292, 11319, 11332, 11333, 11387, 11389, 11390, 11394, 11397,
|
||||
11410, 11438, 11449, 11470, 11471, 11520, 11537, 11538
|
||||
11410, 11438, 11449, 11470, 11471, 11520, 11537, 11538, 11571
|
||||
|
||||
* New interfaces: pthread_getname_np, pthread_setname_np
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/* On-demand PLT fixup for shared objects.
|
||||
Copyright (C) 1995-2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995-2009, 2010 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
|
||||
|
|
@ -144,7 +144,8 @@ _dl_fixup (
|
|||
/* And now perhaps the relocation addend. */
|
||||
value = elf_machine_plt_value (l, reloc, value);
|
||||
|
||||
if (__builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0))
|
||||
if (sym != NULL
|
||||
&& __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0))
|
||||
value = ((DL_FIXUP_VALUE_TYPE (*) (void)) DL_FIXUP_VALUE_ADDR (value)) ();
|
||||
|
||||
/* Finally, fix up the plt itself. */
|
||||
|
|
@ -231,7 +232,8 @@ _dl_profile_fixup (
|
|||
? LOOKUP_VALUE_ADDRESS (result)
|
||||
+ defsym->st_value : 0);
|
||||
|
||||
if (__builtin_expect (ELFW(ST_TYPE) (defsym->st_info)
|
||||
if (defsym != NULL
|
||||
&& __builtin_expect (ELFW(ST_TYPE) (defsym->st_info)
|
||||
== STT_GNU_IFUNC, 0))
|
||||
value = ((DL_FIXUP_VALUE_TYPE (*) (void))
|
||||
DL_FIXUP_VALUE_ADDR (value)) ();
|
||||
|
|
|
|||
|
|
@ -1370,7 +1370,7 @@ main (int argc, char **argv)
|
|||
add_arch_dirs (config_file);
|
||||
}
|
||||
|
||||
char *aux_cache_file = _PATH_LDCONFIG_AUX_CACHE;
|
||||
const char *aux_cache_file = _PATH_LDCONFIG_AUX_CACHE;
|
||||
if (opt_chroot)
|
||||
{
|
||||
aux_cache_file = chroot_canon (opt_chroot, aux_cache_file);
|
||||
|
|
|
|||
|
|
@ -1,3 +1,12 @@
|
|||
2010-05-17 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
* locales/es_CR (LC_ADDRESS): Fix character names in lang_ab.
|
||||
|
||||
2010-05-04 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
* SUPPORTED (SUPPORTED-LOCALES): Fix name of tt_RU.UTF-8@iqtelif
|
||||
locale.
|
||||
|
||||
2010-05-03 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
[BZ #11520]
|
||||
|
|
|
|||
|
|
@ -392,7 +392,7 @@ tr_TR.UTF-8/UTF-8 \
|
|||
tr_TR/ISO-8859-9 \
|
||||
ts_ZA/UTF-8 \
|
||||
tt_RU.UTF-8/UTF-8 \
|
||||
tt_RU@iqtelif.UTF-8/UTF-8 \
|
||||
tt_RU.UTF-8@iqtelif/UTF-8 \
|
||||
ug_CN/UTF-8 \
|
||||
uk_UA.UTF-8/UTF-8 \
|
||||
uk_UA/KOI8-U \
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ country_post "<U0043><U0052>"
|
|||
country_car "<U0043><U0052>"
|
||||
country_isbn "9930,9977,9968"
|
||||
lang_name "<U0045><U0073><U0070><U0061><U00F1><U006F><U006C>"
|
||||
lang_ab "<0065><0073>"
|
||||
lang_ab "<U0065><U0073>"
|
||||
lang_term "<U0073><U0070><U0061>"
|
||||
country_ab2 "<U0043><U0052>"
|
||||
country_ab3 "<U0043><U0052><U0049>"
|
||||
|
|
|
|||
|
|
@ -4859,6 +4859,7 @@ _int_free(mstate av, mchunkptr p)
|
|||
#ifdef ATOMIC_FASTBINS
|
||||
mchunkptr fd;
|
||||
mchunkptr old = *fb;
|
||||
unsigned int old_idx = ~0u;
|
||||
do
|
||||
{
|
||||
/* Another simple check: make sure the top of the bin is not the
|
||||
|
|
@ -4868,15 +4869,17 @@ _int_free(mstate av, mchunkptr p)
|
|||
errstr = "double free or corruption (fasttop)";
|
||||
goto errout;
|
||||
}
|
||||
if (old != NULL
|
||||
&& __builtin_expect (fastbin_index(chunksize(old)) != idx, 0))
|
||||
if (old != NULL)
|
||||
old_idx = fastbin_index(chunksize(old));
|
||||
p->fd = fd = old;
|
||||
}
|
||||
while ((old = catomic_compare_and_exchange_val_rel (fb, p, fd)) != fd);
|
||||
|
||||
if (fd != NULL && __builtin_expect (old_idx != idx, 0))
|
||||
{
|
||||
errstr = "invalid fastbin entry (free)";
|
||||
goto errout;
|
||||
}
|
||||
p->fd = fd = old;
|
||||
}
|
||||
while ((old = catomic_compare_and_exchange_val_rel (fb, p, fd)) != fd);
|
||||
#else
|
||||
/* Another simple check: make sure the top of the bin is not the
|
||||
record we are going to add (i.e., double free). */
|
||||
|
|
|
|||
12
nss/getent.c
12
nss/getent.c
|
|
@ -31,6 +31,7 @@
|
|||
#include <netdb.h>
|
||||
#include <pwd.h>
|
||||
#include <shadow.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
|
@ -56,6 +57,7 @@ static const char args_doc[] = N_("database [key ...]");
|
|||
static const struct argp_option args_options[] =
|
||||
{
|
||||
{ "service", 's', "CONFIG", 0, N_("Service configuration to be used") },
|
||||
{ "no-idn", 'i', NULL, 0, N_("disable IDN encoding") },
|
||||
{ NULL, 0, NULL, 0, NULL },
|
||||
};
|
||||
|
||||
|
|
@ -74,6 +76,9 @@ static struct argp argp =
|
|||
args_options, parse_option, args_doc, doc, NULL, more_help
|
||||
};
|
||||
|
||||
/* Additional getaddrinfo flags for IDN encoding. */
|
||||
static int idn_flags = AI_IDN | AI_CANONIDN;
|
||||
|
||||
/* Print the version information. */
|
||||
static void
|
||||
print_version (FILE *stream, struct argp_state *state)
|
||||
|
|
@ -377,7 +382,8 @@ ahosts_keys_int (int af, int xflags, int number, char *key[])
|
|||
|
||||
struct addrinfo hint;
|
||||
memset (&hint, '\0', sizeof (hint));
|
||||
hint.ai_flags = AI_V4MAPPED | AI_ADDRCONFIG | AI_CANONNAME | xflags;
|
||||
hint.ai_flags = (AI_V4MAPPED | AI_ADDRCONFIG | AI_CANONNAME
|
||||
| idn_flags | xflags);
|
||||
hint.ai_family = af;
|
||||
|
||||
for (i = 0; i < number; ++i)
|
||||
|
|
@ -861,6 +867,10 @@ parse_option (int key, char *arg, struct argp_state *state)
|
|||
}
|
||||
break;
|
||||
|
||||
case 'i':
|
||||
idn_flags = 0;
|
||||
break;
|
||||
|
||||
default:
|
||||
return ARGP_ERR_UNKNOWN;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4031,7 +4031,7 @@ find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len)
|
|||
/* Skip the collation sequence value. */
|
||||
idx += sizeof (uint32_t);
|
||||
/* Skip the wide char sequence of the collating element. */
|
||||
idx = idx + sizeof (uint32_t) * (extra[idx] + 1);
|
||||
idx = idx + sizeof (uint32_t) * (*(int32_t *) (extra + idx) + 1);
|
||||
/* If we found the entry, return the sequence value. */
|
||||
if (found)
|
||||
return *(uint32_t *) (extra + idx);
|
||||
|
|
|
|||
|
|
@ -399,6 +399,7 @@ clnttcp_control (CLIENT *cl, int request, char *info)
|
|||
/* This will set the xid of the NEXT call */
|
||||
*(u_long *)ct->ct_mcall = htonl (*(u_long *)info - 1);
|
||||
/* decrement by 1 as clnttcp_call() increments once */
|
||||
break;
|
||||
case CLGET_VERS:
|
||||
/*
|
||||
* This RELIES on the information that, in the call body,
|
||||
|
|
|
|||
|
|
@ -582,6 +582,7 @@ clntudp_control (CLIENT *cl, int request, char *info)
|
|||
/* This will set the xid of the NEXT call */
|
||||
*(u_long *)cu->cu_outbuf = htonl(*(u_long *)info - 1);
|
||||
/* decrement by 1 as clntudp_call() increments once */
|
||||
break;
|
||||
case CLGET_VERS:
|
||||
/*
|
||||
* This RELIES on the information that, in the call body,
|
||||
|
|
|
|||
|
|
@ -376,6 +376,7 @@ clntunix_control (CLIENT *cl, int request, char *info)
|
|||
/* This will set the xid of the NEXT call */
|
||||
*(u_long *) ct->ct_mcall = htonl (*(u_long *)info - 1);
|
||||
/* decrement by 1 as clntunix_call() increments once */
|
||||
break;
|
||||
case CLGET_VERS:
|
||||
/*
|
||||
* This RELIES on the information that, in the call body,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
/* Store current floating-point environment and clear exceptions.
|
||||
Copyright (C) 1997, 1998, 1999, 2000, 2005 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997, 1998, 1999, 2000, 2005, 2010
|
||||
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
|
||||
|
|
@ -29,10 +30,15 @@ feholdexcept (fenv_t *envp)
|
|||
_FPU_GETCW (temp);
|
||||
envp->__fpscr = temp;
|
||||
|
||||
/* Now set all exceptions to non-stop. */
|
||||
/* Clear the status flags. */
|
||||
temp &= ~FE_ALL_EXCEPT;
|
||||
|
||||
/* Now set all exceptions to non-stop. */
|
||||
temp &= ~(FE_ALL_EXCEPT << 5);
|
||||
|
||||
_FPU_SETCW (temp);
|
||||
|
||||
return 1;
|
||||
/* Success. */
|
||||
return 0;
|
||||
}
|
||||
libm_hidden_def (feholdexcept)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ CFLAGS-malloc.c += -DMORECORE_CLEARS=2
|
|||
endif
|
||||
|
||||
ifeq ($(subdir),socket)
|
||||
sysdep_routines += internal_accept4
|
||||
sysdep_routines += internal_accept4 recvmmsg internal_recvmmsg
|
||||
endif
|
||||
|
||||
ifeq ($(subdir),misc)
|
||||
|
|
|
|||
|
|
@ -81,13 +81,22 @@ __getlogin_r_loginuid (name, namesize)
|
|||
if (tpwd == NULL)
|
||||
goto fail;
|
||||
|
||||
strncpy (name, pwd.pw_name, namesize - 1);
|
||||
name[namesize - 1] = '\0';
|
||||
int result = 0;
|
||||
size_t needed = strlen (pwd.pw_name) + 1;
|
||||
if (needed > namesize)
|
||||
{
|
||||
__set_errno (ERANGE);
|
||||
result = ERANGE;
|
||||
goto out;
|
||||
}
|
||||
|
||||
memcpy (name, pwd.pw_name, needed);
|
||||
|
||||
out:
|
||||
if (use_malloc)
|
||||
free (buf);
|
||||
|
||||
return 0;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
#include <kernel-features.h>
|
||||
#include <sys/syscall.h>
|
||||
#if !defined __NR_recvmmsg && defined __NR_socketcall
|
||||
# define socket recvmmsg
|
||||
# ifdef __ASSUME_RECVMMSG
|
||||
# define __socket recvmmsg
|
||||
# else
|
||||
# define __socket __internal_recvmmsg
|
||||
# endif
|
||||
# define NARGS 5
|
||||
# define NEED_CANCELLATION
|
||||
# define NO_WEAK_ALIAS
|
||||
# include <socket.S>
|
||||
#endif
|
||||
|
|
@ -176,7 +176,7 @@
|
|||
distinguish this version from other 2.4.0 releases. Therefore play
|
||||
save and assume it available is for 2.4.1 and up. However, SH is lame,
|
||||
and still does not have a 64-bit inode field. */
|
||||
#if __LINUX_KERNEL_VERSION >= 132097 && !defined __alpha__ && !defined __sh__
|
||||
#if __LINUX_KERNEL_VERSION >= 132097 && !defined __sh__
|
||||
# define __ASSUME_ST_INO_64_BIT 1
|
||||
#endif
|
||||
|
||||
|
|
@ -270,11 +270,6 @@
|
|||
# define __ASSUME_VFORK_SYSCALL 1
|
||||
#endif
|
||||
|
||||
/* Alpha switched to a 64-bit timeval sometime before 2.2.0. */
|
||||
#if __LINUX_KERNEL_VERSION >= 131584 && defined __alpha__
|
||||
# define __ASSUME_TIMEVAL64 1
|
||||
#endif
|
||||
|
||||
/* The late 2.5 kernels saw a lot of new CLONE_* flags. Summarize
|
||||
their availability with one define. The changes were made first
|
||||
for i386 and the have to be done separately for the other archs.
|
||||
|
|
@ -327,12 +322,9 @@
|
|||
# define __ASSUME_CORRECT_SI_PID 1
|
||||
#endif
|
||||
|
||||
/* The tgkill syscall was instroduced for i386 in 2.5.75. For Alpha
|
||||
it was introduced in 2.6.0-test1 which unfortunately cannot be
|
||||
distinguished from 2.6.0. On x86-64, ppc, and ppc64 it was
|
||||
introduced in 2.6.0-test3. */
|
||||
/* The tgkill syscall was instroduced for i386 in 2.5.75. On x86-64,
|
||||
ppc, and ppc64 it was introduced in 2.6.0-test3. */
|
||||
#if (__LINUX_KERNEL_VERSION >= 132427 && defined __i386__) \
|
||||
|| (__LINUX_KERNEL_VERSION >= 132609 && defined __alpha__) \
|
||||
|| (__LINUX_KERNEL_VERSION >= 132609 && defined __x86_64__) \
|
||||
|| (__LINUX_KERNEL_VERSION >= 132609 && defined __powerpc__) \
|
||||
|| (__LINUX_KERNEL_VERSION >= 132609 && defined __sh__)
|
||||
|
|
@ -342,8 +334,7 @@
|
|||
/* The utimes syscall has been available for some architectures
|
||||
forever. For x86 it was introduced after 2.5.75, for x86-64,
|
||||
ppc, and ppc64 it was introduced in 2.6.0-test3. */
|
||||
#if defined __alpha__ || defined __ia64__ \
|
||||
|| defined __sparc__ \
|
||||
#if defined __ia64__ || defined __sparc__ \
|
||||
|| (__LINUX_KERNEL_VERSION > 132427 && defined __i386__) \
|
||||
|| (__LINUX_KERNEL_VERSION > 132609 && defined __x86_64__) \
|
||||
|| (__LINUX_KERNEL_VERSION >= 132609 && defined __powerpc__) \
|
||||
|
|
@ -410,11 +401,6 @@
|
|||
# define __ASSUME_WAITID_SYSCALL 1
|
||||
#endif
|
||||
|
||||
/* Starting with version 2.6.9, SSI_IEEE_RAISE_EXCEPTION exists. */
|
||||
#if __LINUX_KERNEL_VERSION >= 0x020609 && defined __alpha__
|
||||
# define __ASSUME_IEEE_RAISE_EXCEPTION 1
|
||||
#endif
|
||||
|
||||
/* On sparc64 stat64/lstat64/fstat64 syscalls were introduced in 2.6.12. */
|
||||
#if __LINUX_KERNEL_VERSION >= 0x02060c && defined __sparc__ \
|
||||
&& defined __arch64__
|
||||
|
|
@ -431,34 +417,28 @@
|
|||
/* pselect/ppoll were introduced just after 2.6.16-rc1. Due to the way
|
||||
the kernel versions are advertised we can only rely on 2.6.17 to have
|
||||
the code. On x86_64 and SH this appeared first in 2.6.19-rc1,
|
||||
on ia64 in 2.6.22-rc1 and on alpha just after 2.6.22-rc1. */
|
||||
on ia64 in 2.6.22-rc1. */
|
||||
#if __LINUX_KERNEL_VERSION >= 0x020611 \
|
||||
&& ((!defined __x86_64__ && !defined __sh__ && !defined __ia64__ \
|
||||
&& !defined __alpha__) \
|
||||
&& ((!defined __x86_64__ && !defined __sh__ && !defined __ia64__) \
|
||||
|| (__LINUX_KERNEL_VERSION >= 0x020613 \
|
||||
&& (defined __x86_64__ || defined __sh__)) \
|
||||
|| (__LINUX_KERNEL_VERSION >= 0x020616 && defined __ia64__) \
|
||||
|| (__LINUX_KERNEL_VERSION >= 0x020617 && defined __alpha__))
|
||||
|| (__LINUX_KERNEL_VERSION >= 0x020616 && defined __ia64__))
|
||||
# define __ASSUME_PSELECT 1
|
||||
# define __ASSUME_PPOLL 1
|
||||
#endif
|
||||
|
||||
/* The *at syscalls were introduced just after 2.6.16-rc1. Due to the way the
|
||||
kernel versions are advertised we can only rely on 2.6.17 to have
|
||||
the code. On PPC they were introduced in 2.6.17-rc1, on SH in 2.6.19-rc1
|
||||
and on Alpha just after 2.6.22-rc1. */
|
||||
the code. On PPC they were introduced in 2.6.17-rc1,
|
||||
on SH in 2.6.19-rc1. */
|
||||
#if __LINUX_KERNEL_VERSION >= 0x020611 \
|
||||
&& ((!defined __sh__ && !defined __alpha__) \
|
||||
|| (__LINUX_KERNEL_VERSION >= 0x020613 && defined __sh__) \
|
||||
|| (__LINUX_KERNEL_VERSION >= 0x020617 && defined __alpha__))
|
||||
&& (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613)
|
||||
# define __ASSUME_ATFCTS 1
|
||||
#endif
|
||||
|
||||
/* Support for inter-process robust mutexes was added in 2.6.17. */
|
||||
#if __LINUX_KERNEL_VERSION >= 0x020611 \
|
||||
&& ((!defined __sh__ && !defined __alpha__) \
|
||||
|| (__LINUX_KERNEL_VERSION >= 0x020613 && defined __sh__) \
|
||||
|| (__LINUX_KERNEL_VERSION >= 0x020617 && defined __alpha__))
|
||||
&& (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613)
|
||||
# define __ASSUME_SET_ROBUST_LIST 1
|
||||
#endif
|
||||
|
||||
|
|
@ -474,11 +454,10 @@
|
|||
# define __ASSUME_FUTEX_LOCK_PI 1
|
||||
#endif
|
||||
|
||||
/* Support for utimensat syscall was added in 2.6.22, on alpha and s390
|
||||
/* Support for utimensat syscall was added in 2.6.22, on SH
|
||||
only after 2.6.22-rc1. */
|
||||
#if __LINUX_KERNEL_VERSION >= 0x020616 \
|
||||
&& ((!defined __sh__ && !defined __alpha__) \
|
||||
|| __LINUX_KERNEL_VERSION >= 0x020617)
|
||||
&& (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020617)
|
||||
# define __ASSUME_UTIMENSAT 1
|
||||
#endif
|
||||
|
||||
|
|
@ -490,8 +469,7 @@
|
|||
/* Support for fallocate was added in 2.6.23, on s390
|
||||
only after 2.6.23-rc1. */
|
||||
#if __LINUX_KERNEL_VERSION >= 0x020617 \
|
||||
&& ((!defined __s390__ && !defined __alpha__) \
|
||||
|| (__LINUX_KERNEL_VERSION >= 0x020618 && defined __s390__))
|
||||
&& (!defined __s390__ || __LINUX_KERNEL_VERSION >= 0x020618)
|
||||
# define __ASSUME_FALLOCATE 1
|
||||
#endif
|
||||
|
||||
|
|
@ -547,3 +525,8 @@
|
|||
#if __LINUX_KERNEL_VERSION >= 0x020620
|
||||
# define __ASSUME_F_GETOWN_EX 1
|
||||
#endif
|
||||
|
||||
/* Support for the recvmmsg syscall was added in 2.6.33. */
|
||||
#if __LINUX_KERNEL_VERSION >= 0x020621
|
||||
# define __ASSUME_RECVMMSG 1
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -0,0 +1,100 @@
|
|||
/* Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Andreas Schwab <schwab@redhat.com>, 2010.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
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. */
|
||||
|
||||
#include <errno.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include <sysdep-cancel.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <kernel-features.h>
|
||||
|
||||
|
||||
#ifdef __NR_recvmmsg
|
||||
int
|
||||
recvmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags,
|
||||
const struct timespec *tmo)
|
||||
{
|
||||
if (SINGLE_THREAD_P)
|
||||
return INLINE_SYSCALL (recvmmsg, 5, fd, vmessages, vlen, flags, tmo);
|
||||
|
||||
int oldtype = LIBC_CANCEL_ASYNC ();
|
||||
|
||||
int result = INLINE_SYSCALL (recvmmsg, 5, fd, vmessages, vlen, flags, tmo);
|
||||
|
||||
LIBC_CANCEL_RESET (oldtype);
|
||||
|
||||
return result;
|
||||
}
|
||||
#elif defined __NR_socketcall
|
||||
# ifndef __ASSUME_RECVMMSG
|
||||
extern int __internal_recvmmsg (int fd, struct mmsghdr *vmessages,
|
||||
unsigned int vlen, int flags,
|
||||
const struct timespec *tmo)
|
||||
attribute_hidden;
|
||||
|
||||
static int have_recvmmsg;
|
||||
|
||||
int
|
||||
recvmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags,
|
||||
const struct timespec *tmo)
|
||||
{
|
||||
if (__builtin_expect (have_recvmmsg >= 0, 1))
|
||||
{
|
||||
int ret = __internal_recvmmsg (fd, vmessages, vlen, flags, tmo);
|
||||
/* The kernel returns -EINVAL for unknown socket operations.
|
||||
We need to convert that error to an ENOSYS error. */
|
||||
if (__builtin_expect (ret < 0, 0)
|
||||
&& have_recvmmsg == 0
|
||||
&& errno == EINVAL)
|
||||
{
|
||||
/* Try another call, this time with an invalid file
|
||||
descriptor and all other parameters cleared. This call
|
||||
will not cause any harm and it will return
|
||||
immediately. */
|
||||
ret = __internal_recvmmsg (-1, 0, 0, 0, 0);
|
||||
if (errno == EINVAL)
|
||||
{
|
||||
have_recvmmsg = -1;
|
||||
__set_errno (ENOSYS);
|
||||
}
|
||||
else
|
||||
{
|
||||
have_recvmmsg = 1;
|
||||
__set_errno (EINVAL);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
__set_errno (ENOSYS);
|
||||
return -1;
|
||||
}
|
||||
# else
|
||||
/* When __ASSUME_RECVMMSG recvmmsg is defined in internal_recvmmsg.S. */
|
||||
# endif
|
||||
#else
|
||||
int
|
||||
recvmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags,
|
||||
const struct timespec *tmo)
|
||||
{
|
||||
__set_errno (ENOSYS);
|
||||
return -1;
|
||||
}
|
||||
stub_warning (recvmmsg)
|
||||
#endif
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/* Dump registers.
|
||||
Copyright (C) 1999, 2000, 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999, 2000, 2009, 2010 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
|
||||
|
|
@ -58,7 +58,7 @@ register_dump (int fd, struct sigcontext *ctx)
|
|||
{
|
||||
char regs[22][8];
|
||||
char fpregs[34][8];
|
||||
struct iovec iov[112];
|
||||
struct iovec iov[22 * 2 + 34 * 2 + 2];
|
||||
size_t nr = 0;
|
||||
|
||||
#define ADD_STRING(str) \
|
||||
|
|
|
|||
|
|
@ -44,5 +44,6 @@
|
|||
#define SOCKOP_sendmsg 16
|
||||
#define SOCKOP_recvmsg 17
|
||||
#define SOCKOP_accept4 18
|
||||
#define SOCKOP_recvmmsg 19
|
||||
|
||||
#endif /* sys/socketcall.h */
|
||||
|
|
|
|||
|
|
@ -140,9 +140,9 @@ __BEGIN_DECLS
|
|||
extern int __adjtimex (struct timex *__ntx) __THROW;
|
||||
extern int adjtimex (struct timex *__ntx) __THROW;
|
||||
|
||||
#if defined __GNUC__ && __GNUC__ >= 2
|
||||
extern int ntp_gettime (struct ntptimeval *__ntv)
|
||||
__asm__ ("ntp_gettimex") __THROW;
|
||||
#ifdef __REDIRECT_NTH
|
||||
extern int __REDIRECT_NTH (ntp_gettime, (struct ntptimeval *__ntv),
|
||||
ntp_gettimex);
|
||||
#else
|
||||
extern int ntp_gettimex (struct ntptimeval *__ntv) __THROW;
|
||||
# define ntp_gettime ntp_gettimex
|
||||
|
|
|
|||
|
|
@ -53,7 +53,6 @@ prctl EXTRA prctl i:iiiii __prctl prctl
|
|||
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
|
||||
|
|
|
|||
|
|
@ -62,15 +62,15 @@ __init_cpu_features (void)
|
|||
unsigned int eax = __cpu_features.cpuid[COMMON_CPUID_INDEX_1].eax;
|
||||
unsigned int extended_family = (eax >> 20) & 0xff;
|
||||
unsigned int extended_model = (eax >> 12) & 0xf0;
|
||||
if (__cpu_features.family == 0x0f)
|
||||
if (family == 0x0f)
|
||||
{
|
||||
family += extended_family;
|
||||
model += extended_model;
|
||||
}
|
||||
else if (__cpu_features.family == 0x06)
|
||||
else if (family == 0x06)
|
||||
{
|
||||
model += extended_model;
|
||||
switch (__cpu_features.model)
|
||||
switch (model)
|
||||
{
|
||||
case 0x1a:
|
||||
case 0x1e:
|
||||
|
|
|
|||
Loading…
Reference in New Issue