diff options
author | Jakub Jelinek <jakub@redhat.com> | 2004-11-10 09:02:52 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2004-11-10 09:02:52 +0000 |
commit | 3504bb650f48534549bbd0313dc15fa71455e302 (patch) | |
tree | 742dd9cbcee1147fb36bcc02816bec415544597e /sysdeps | |
parent | cbf4bcd2b3d53de274548dbf4c28017d1f07d5b2 (diff) |
Updated to fedora-glibc-20041110T0839
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/generic/dl-sysdep.c | 4 | ||||
-rw-r--r-- | sysdeps/generic/ldsodefs.h | 2 | ||||
-rw-r--r-- | sysdeps/generic/sysconf.c | 2 | ||||
-rw-r--r-- | sysdeps/generic/tempname.c | 3 | ||||
-rw-r--r-- | sysdeps/generic/utime.c | 1 | ||||
-rw-r--r-- | sysdeps/gnu/_G_config.h | 1 | ||||
-rw-r--r-- | sysdeps/mach/hurd/_G_config.h | 102 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/alpha/register-dump.h | 46 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/ifaddrs.c | 10 |
9 files changed, 138 insertions, 33 deletions
diff --git a/sysdeps/generic/dl-sysdep.c b/sysdeps/generic/dl-sysdep.c index 429947ccd9..34498a880c 100644 --- a/sysdeps/generic/dl-sysdep.c +++ b/sysdeps/generic/dl-sysdep.c @@ -161,6 +161,8 @@ _dl_sysdep_start (void **start_argptr, case AT_SYSINFO: new_sysinfo = av->a_un.a_val; break; +#endif +#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO case AT_SYSINFO_EHDR: GLRO(dl_sysinfo_dso) = av->a_un.a_ptr; break; @@ -287,10 +289,8 @@ _dl_show_auxv (void) [AT_UCACHEBSIZE - 2] = { "AT_UCACHEBSIZE: 0x", hex }, [AT_IGNOREPPC - 2] = { "AT_IGNOREPPC", ignore }, [AT_SECURE - 2] = { "AT_SECURE: ", dec }, -#ifdef NEED_DL_SYSINFO [AT_SYSINFO - 2] = { "AT_SYSINFO: 0x", hex }, [AT_SYSINFO_EHDR - 2] = { "AT_SYSINFO_EHDR: 0x", hex }, -#endif }; unsigned int idx = (unsigned int) (av->a_type - 2); diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index fd45bdc87f..ec68e1a565 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -470,7 +470,9 @@ struct rtld_global_ro #ifdef NEED_DL_SYSINFO /* Syscall handling improvements. This is very specific to x86. */ EXTERN uintptr_t _dl_sysinfo; +#endif +#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO /* The vsyscall page is a virtual DSO pre-mapped by the kernel. This points to its ELF header. */ EXTERN const ElfW(Ehdr) *_dl_sysinfo_dso; diff --git a/sysdeps/generic/sysconf.c b/sysdeps/generic/sysconf.c index d67e3568a3..f22685cb29 100644 --- a/sysdeps/generic/sysconf.c +++ b/sysdeps/generic/sysconf.c @@ -18,6 +18,8 @@ 02111-1307 USA. */ #include <errno.h> +#include <grp.h> +#include <pwd.h> #include <stdio.h> #include <unistd.h> #include <time.h> diff --git a/sysdeps/generic/tempname.c b/sysdeps/generic/tempname.c index fd4db36dc3..60c94d6409 100644 --- a/sysdeps/generic/tempname.c +++ b/sysdeps/generic/tempname.c @@ -25,11 +25,12 @@ template suitable for use in __gen_tempname into TMPL, bounded by TMPL_LEN. */ int -__path_search (tmpl, tmpl_len, dir, pfx) +__path_search (tmpl, tmpl_len, dir, pfx, try_tmpdir) char *tmpl; size_t tmpl_len; const char *dir; const char *pfx; + int try_tmpdir; { __set_errno (ENOSYS); return -1; diff --git a/sysdeps/generic/utime.c b/sysdeps/generic/utime.c index 09d0cc6679..3a3bcc38cc 100644 --- a/sysdeps/generic/utime.c +++ b/sysdeps/generic/utime.c @@ -17,6 +17,7 @@ 02111-1307 USA. */ #include <errno.h> +#include <stddef.h> #include <utime.h> diff --git a/sysdeps/gnu/_G_config.h b/sysdeps/gnu/_G_config.h index b643059234..83c78f0b93 100644 --- a/sysdeps/gnu/_G_config.h +++ b/sysdeps/gnu/_G_config.h @@ -69,6 +69,7 @@ typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); #define _G_HAVE_PRINTF_FP 1 #define _G_HAVE_MMAP 1 +#define _G_HAVE_MREMAP 1 #define _G_HAVE_LONG_DOUBLE_IO 1 #define _G_HAVE_IO_FILE_OPEN 1 #define _G_HAVE_IO_GETLINE_INFO 1 diff --git a/sysdeps/mach/hurd/_G_config.h b/sysdeps/mach/hurd/_G_config.h new file mode 100644 index 0000000000..b643059234 --- /dev/null +++ b/sysdeps/mach/hurd/_G_config.h @@ -0,0 +1,102 @@ +/* This file is needed by libio to define various configuration parameters. + These are always the same in the GNU C library. */ + +#ifndef _G_config_h +#define _G_config_h 1 + +/* Define types for libio in terms of the standard internal type names. */ + +#include <bits/types.h> +#define __need_size_t +#define __need_wchar_t +#define __need_wint_t +#define __need_NULL +#include <stddef.h> +#ifndef _WINT_T +/* Integral type unchanged by default argument promotions that can + hold any value corresponding to members of the extended character + set, as well as at least one value that does not correspond to any + member of the extended character set. */ +# define _WINT_T +typedef unsigned int wint_t; +#endif +#define __need_mbstate_t +#include <wchar.h> +#define _G_size_t size_t +typedef struct +{ + __off_t __pos; + __mbstate_t __state; +} _G_fpos_t; +typedef struct +{ + __off64_t __pos; + __mbstate_t __state; +} _G_fpos64_t; +#define _G_ssize_t __ssize_t +#define _G_off_t __off_t +#define _G_off64_t __off64_t +#define _G_pid_t __pid_t +#define _G_uid_t __uid_t +#define _G_wchar_t wchar_t +#define _G_wint_t wint_t +#define _G_stat64 stat64 +#include <gconv.h> +typedef union +{ + struct __gconv_info __cd; + struct + { + struct __gconv_info __cd; + struct __gconv_step_data __data; + } __combined; +} _G_iconv_t; + +typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); +typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); +typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__))); +typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); + +#define _G_HAVE_BOOL 1 + + +/* These library features are always available in the GNU C library. */ +#define _G_HAVE_ATEXIT 1 +#define _G_HAVE_SYS_CDEFS 1 +#define _G_HAVE_SYS_WAIT 1 +#define _G_NEED_STDARG_H 1 +#define _G_va_list __gnuc_va_list + +#define _G_HAVE_PRINTF_FP 1 +#define _G_HAVE_MMAP 1 +#define _G_HAVE_LONG_DOUBLE_IO 1 +#define _G_HAVE_IO_FILE_OPEN 1 +#define _G_HAVE_IO_GETLINE_INFO 1 + +#define _G_IO_IO_FILE_VERSION 0x20001 + +#define _G_OPEN64 __open64 +#define _G_LSEEK64 __lseek64 +#define _G_MMAP64 __mmap64 +#define _G_FSTAT64(fd,buf) __fxstat64 (_STAT_VER, fd, buf) + +/* This is defined by <bits/stat.h> if `st_blksize' exists. */ +#define _G_HAVE_ST_BLKSIZE defined (_STATBUF_ST_BLKSIZE) + +#define _G_BUFSIZ 8192 + +/* These are the vtbl details for ELF. */ +#define _G_NAMES_HAVE_UNDERSCORE 0 +#define _G_VTABLE_LABEL_HAS_LENGTH 1 +#define _G_USING_THUNKS 1 +#define _G_VTABLE_LABEL_PREFIX "__vt_" +#define _G_VTABLE_LABEL_PREFIX_ID __vt_ + + +#if defined __cplusplus || defined __STDC__ +# define _G_ARGS(ARGLIST) ARGLIST +#else +# define _G_ARGS(ARGLIST) () +#endif + +#endif /* _G_config.h */ diff --git a/sysdeps/unix/sysv/linux/alpha/register-dump.h b/sysdeps/unix/sysv/linux/alpha/register-dump.h index d55899a2c1..77f962952a 100644 --- a/sysdeps/unix/sysv/linux/alpha/register-dump.h +++ b/sysdeps/unix/sysv/linux/alpha/register-dump.h @@ -18,7 +18,7 @@ 02111-1307 USA. */ #include <stddef.h> -#include <sys/uio.h> +#include <string.h> /* We will print the register dump in this format: @@ -51,7 +51,7 @@ #define NREGS (32+32+3) -static const char regnames[NREGS][8] = +static const char __attribute__((aligned(8))) regnames[NREGS][8] = { " V0: ", " T0: ", " T1: ", " T2: ", " T3: ", " T4: ", @@ -113,49 +113,45 @@ static const int offsets[NREGS] = #undef O -static const char linefeed[2] = "\n\n"; - static void register_dump (int fd, struct sigcontext *ctx) { - char regs[NREGS][16]; - struct iovec iov[2*NREGS+24]; - size_t iov_i = 0, i, j; + char buf[NREGS*(8+16) + 25 + 80]; + char *p = buf; + size_t i; -#define ADD_MEM(str, len) \ - (iov[iov_i].iov_base = (void *)(str), \ - iov[iov_i].iov_len = len, \ - ++iov_i) - -#define ADD_STRING(str) ADD_MEM(str, strlen(str)) - - ADD_STRING ("Register dump:\n\n"); + p = stpcpy (p, "Register dump:\n\n"); for (i = 0; i < NREGS; ++i) { int this_offset, this_lf; unsigned long val; + signed long j; this_offset = offsets[i]; this_lf = this_offset & 7; - this_offset &= -8; - val = *(unsigned long *)((char *)ctx + this_offset); + val = *(unsigned long *)(((size_t)ctx + this_offset) & -8); - for (j = 0; j < 16; ++j) + memcpy (p, regnames[i], 8); + p += 8; + + for (j = 60; j >= 0; j -= 4) { - unsigned long x = (val >> (64 - (j + 1) * 4)) & 15; + unsigned long x = (val >> j) & 15; x += x < 10 ? '0' : 'a' - 10; - regs[i][j] = x; + *p++ = x; } - ADD_MEM (regnames[i], 8); - ADD_MEM (regs[i], 16); - if (this_lf) - ADD_MEM (linefeed, this_lf); + if (this_lf > 0) + { + if (this_lf > 1) + *p++ = '\n'; + *p++ = '\n'; + } } - writev (fd, iov, iov_i); + write (fd, buf, p - buf); } #define REGISTER_DUMP register_dump (fd, ctx) diff --git a/sysdeps/unix/sysv/linux/ifaddrs.c b/sysdeps/unix/sysv/linux/ifaddrs.c index f4dce4cd61..8a052e212d 100644 --- a/sysdeps/unix/sysv/linux/ifaddrs.c +++ b/sysdeps/unix/sysv/linux/ifaddrs.c @@ -566,7 +566,7 @@ getifaddrs (struct ifaddrs **ifap) if (IN6_IS_ADDR_LINKLOCAL (rta_data) || IN6_IS_ADDR_MC_LINKLOCAL (rta_data)) ((struct sockaddr_in6 *) sa)->sin6_scope_id - = ifam->ifa_scope; + = ifam->ifa_index; } break; @@ -610,10 +610,10 @@ getifaddrs (struct ifaddrs **ifap) { memcpy (&ifas[ifa_index].addr.s6.sin6_addr, rta_data, rta_payload); - if (IN6_IS_ADDR_LINKLOCAL (rta_data) || - IN6_IS_ADDR_MC_LINKLOCAL (rta_data)) + if (IN6_IS_ADDR_LINKLOCAL (rta_data) + || IN6_IS_ADDR_MC_LINKLOCAL (rta_data)) ifas[ifa_index].addr.s6.sin6_scope_id = - ifam->ifa_scope; + ifam->ifa_index; } break; @@ -654,7 +654,7 @@ getifaddrs (struct ifaddrs **ifap) if (IN6_IS_ADDR_LINKLOCAL (rta_data) || IN6_IS_ADDR_MC_LINKLOCAL (rta_data)) ifas[ifa_index].broadaddr.s6.sin6_scope_id - = ifam->ifa_scope; + = ifam->ifa_index; } break; |