* intl/dcigettext.c (_nl_find_msg): Add a cast.
* nis/nis_clone_dir.c (nis_clone_directory): Use char * for ADDR.
* nis/nis_clone_obj.c (nis_clone_object): Likewise.
* nis/nis_clone_res.c (nis_clone_result): Likewise.
* resolv/nss_dns/dns-network.c (getanswer_r): Use const unsigned char *
for END_OF_MESSAGE and CP.
* resolv/res_send.c (send_dg): Add else branch for case impossible
unless `poll' is buggy.
* crypt/crypt_util.c (__setkey_r): Add a cast.
* locale/programs/linereader.c (get_toplvl_escape): Use size_t for
NBYTES, and unsigned char * for BYTES.
* locale/programs/charmap.c (charmap_new_char): Use size_t and
unsighed char * for NBYTES, BYTES parameters.
* sysdeps/generic/dl-hash.h (_dl_elf_hash): Take const char * argument
and cast it.
* sysdeps/i386/i686/dl-hash.h (_dl_elf_hash): Likewise.
* sunrpc/create_xid.c (_create_xid): Don't use unsigned long for RES.
* sunrpc/svcauth_des.c (_svcauth_des): Fix cast type.
* sunrpc/auth_des.c (authdes_create): Don't use u_char for PKEY_DATA.
(authdes_marshal): Don't use unsigned int for LEN.
* sunrpc/xdr.c (xdr_hyper): Don't use unsigned long for T2.
(xdr_u_hyper): Likewise.
(xdr_u_short): Don't use u_long for L.
* sunrpc/xdr_intXX_t.c (xdr_int64_t): Don't use uint32_t for T2.
* inet/rexec.c (rexec_af): Use socklen_t.
* sunrpc/key_call.c (getkeyserv_handle): Likewise.
* sunrpc/rtime.c (rtime): Likewise.
* resolv/res_send.c (send_vc, send_dg): Likewise.
* nis/nis_callback.c (__nis_create_callback): Likewise.
* sysdeps/generic/libc-start.c: Use unsigned int for nthreads ptr.
* sysdeps/posix/getaddrinfo.c (gaih_inet): Fix type of ADDR local.
* libio/libio.h (_IO_BE): Add parenthesis around EXPR.
* intl/dcigettext.c (INTVARDEF, INTUSE): Macros removed.
(_nl_default_dirname): Use libc_hidden_data_def instead of INTVARDEF.
(libc_freeres_fn, DCIGETTEXT): Don't use INTUSE.
* intl/bindtextdom.c (INTUSE): Macro removed.
(_nl_default_dirname): Use libc_hidden_proto.
(set_binding_values): Don't use INTUSE.
* include/libintl.h (_libc_intl_domainname_internal): Decl removed.
(_libc_intl_domainname): Use libc_hidden_proto.
* posix/regex_internal.h (gettext): Remove INTUSE on it.
* locale/SYS_libc.c (_libc_intl_domainname): Use libc_hidden_data_def
rather than INTDEF.
* include/libintl.h (_): Don't use *_internal name.
* ctype/ctype-extn.c (__ctype_tolower, __ctype_toupper): Use int32_t,
not uint32_t.
* locale/lc-ctype.c (_nl_postload_ctype): Likewise for assignments.
* iconv/gconv_open.c (__gconv_open): Remove useless cast.
[BZ #721]
* sysdeps/i386/dl-machine.h (ELF_MACHINE_NO_RELA): Define this outside
of [RESOLVE_MAP].
* sysdeps/sh/dl-machine.h (ELF_MACHINE_NO_REL): Likewise.
* sysdeps/powerpc/powerpc32/dl-machine.h
(elf_machine_rel, elf_machine_rel_relative): Removed.
* sysdeps/powerpc/powerpc64/dl-machine.h
(elf_machine_rel, elf_machine_rel_relative): Removed.
2005-02-03 Alexandre Oliva <aoliva@redhat.com>
[BZ #721]
* elf/dynamic-link.h: Don't declare nested auto functions that are
not going to be defined.
2004-07-23 Jakub Jelinek <jakub@redhat.com>
[BZ #284]
* include/features.h (_POSIX_SOURCE, _POSIX_C_SOURCE): Define
if _XOPEN_SOURCE >= 500 even if __STRICT_ANSI__ is defined.
2005-02-16 Roland McGrath <roland@redhat.com>
2005-02-16 Roland McGrath <roland@redhat.com>
+ * intl/dcigettext.c (_nl_find_msg): Add a cast.
+
+ * nis/nis_clone_dir.c (nis_clone_directory): Use char * for ADDR.
+ * nis/nis_clone_obj.c (nis_clone_object): Likewise.
+ * nis/nis_clone_res.c (nis_clone_result): Likewise.
+
+ * resolv/nss_dns/dns-network.c (getanswer_r): Use const unsigned char *
+ for END_OF_MESSAGE and CP.
+
+ * resolv/res_send.c (send_dg): Add else branch for case impossible
+ unless `poll' is buggy.
+
+ * crypt/crypt_util.c (__setkey_r): Add a cast.
+
+ * locale/programs/linereader.c (get_toplvl_escape): Use size_t for
+ NBYTES, and unsigned char * for BYTES.
+
+ * locale/programs/charmap.c (charmap_new_char): Use size_t and
+ unsighed char * for NBYTES, BYTES parameters.
+
+ * sysdeps/generic/dl-hash.h (_dl_elf_hash): Take const char * argument
+ and cast it.
+ * sysdeps/i386/i686/dl-hash.h (_dl_elf_hash): Likewise.
+
+ * sunrpc/create_xid.c (_create_xid): Don't use unsigned long for RES.
+
+ * sunrpc/svcauth_des.c (_svcauth_des): Fix cast type.
+
+ * sunrpc/auth_des.c (authdes_create): Don't use u_char for PKEY_DATA.
+ (authdes_marshal): Don't use unsigned int for LEN.
+ * sunrpc/xdr.c (xdr_hyper): Don't use unsigned long for T2.
+ (xdr_u_hyper): Likewise.
+ (xdr_u_short): Don't use u_long for L.
+ * sunrpc/xdr_intXX_t.c (xdr_int64_t): Don't use uint32_t for T2.
+
+ * inet/rexec.c (rexec_af): Use socklen_t.
+ * sunrpc/key_call.c (getkeyserv_handle): Likewise.
+ * sunrpc/rtime.c (rtime): Likewise.
+ * resolv/res_send.c (send_vc, send_dg): Likewise.
+ * nis/nis_callback.c (__nis_create_callback): Likewise.
+
+ * sysdeps/generic/libc-start.c: Use unsigned int for nthreads ptr.
+
+ * sysdeps/posix/getaddrinfo.c (gaih_inet): Fix type of ADDR local.
+
+ * libio/libio.h (_IO_BE): Add parenthesis around EXPR.
+
+ * intl/dcigettext.c (INTVARDEF, INTUSE): Macros removed.
+ (_nl_default_dirname): Use libc_hidden_data_def instead of INTVARDEF.
+ (libc_freeres_fn, DCIGETTEXT): Don't use INTUSE.
+ * intl/bindtextdom.c (INTUSE): Macro removed.
+ (_nl_default_dirname): Use libc_hidden_proto.
+ (set_binding_values): Don't use INTUSE.
+ * include/libintl.h (_libc_intl_domainname_internal): Decl removed.
+ (_libc_intl_domainname): Use libc_hidden_proto.
+ * posix/regex_internal.h (gettext): Remove INTUSE on it.
+ * locale/SYS_libc.c (_libc_intl_domainname): Use libc_hidden_data_def
+ rather than INTDEF.
+ * include/libintl.h (_): Don't use *_internal name.
+
+ * ctype/ctype-extn.c (__ctype_tolower, __ctype_toupper): Use int32_t,
+ not uint32_t.
+ * locale/lc-ctype.c (_nl_postload_ctype): Likewise for assignments.
+
+ * iconv/gconv_open.c (__gconv_open): Remove useless cast.
+
+ [BZ #721]
+ * sysdeps/i386/dl-machine.h (ELF_MACHINE_NO_RELA): Define this outside
+ of [RESOLVE_MAP].
+ * sysdeps/sh/dl-machine.h (ELF_MACHINE_NO_REL): Likewise.
+ * sysdeps/powerpc/powerpc32/dl-machine.h
+ (elf_machine_rel, elf_machine_rel_relative): Removed.
+ * sysdeps/powerpc/powerpc64/dl-machine.h
+ (elf_machine_rel, elf_machine_rel_relative): Removed.
+
+2005-02-03 Alexandre Oliva <aoliva@redhat.com>
+
+ [BZ #721]
+ * elf/dynamic-link.h: Don't declare nested auto functions that are
+ not going to be defined.
+
+2004-07-23 Jakub Jelinek <jakub@redhat.com>
+
+ [BZ #284]
+ * include/features.h (_POSIX_SOURCE, _POSIX_C_SOURCE): Define
+ if _XOPEN_SOURCE >= 500 even if __STRICT_ANSI__ is defined.
+
+2005-02-16 Roland McGrath <roland@redhat.com>
+
* sysdeps/generic/libc-start.c (LIBC_START_MAIN): Move UBP_EV defn
inside [! SHARED] where it's used.
c = c << 1 | *__key++;
ktab[i] = c >> 1;
}
- _ufc_mk_keytab_r(ktab, __data);
+ _ufc_mk_keytab_r((char *) ktab, __data);
}
weak_alias (__setkey_r, setkey_r)
-/* Copyright (C) 1991, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1997,1999,2000,2002,2005 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
#include <ctype.h>
#define __ctype_tolower \
- ((uint32_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_TOLOWER) + 128)
+ ((int32_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_TOLOWER) + 128)
#define __ctype_toupper \
- ((uint32_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_TOUPPER) + 128)
+ ((int32_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_TOUPPER) + 128)
/* Real function versions of the non-ANSI ctype functions. isblank is
now in ISO C99 but we leave it here. */
/* Inline functions for dynamic linking.
- Copyright (C) 1995-2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1995-2002, 2003, 2004, 2005 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
optimizing away alignment tests or using word instructions for
copying memory, breaking the very code written to handle the
unaligned cases. */
+# if ! ELF_MACHINE_NO_REL
auto void __attribute__((always_inline))
elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
const ElfW(Sym) *sym, const struct r_found_version *version,
void *const reloc_addr);
auto void __attribute__((always_inline))
+elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
+ void *const reloc_addr);
+# endif
+# if ! ELF_MACHINE_NO_RELA
+auto void __attribute__((always_inline))
elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
const ElfW(Sym) *sym, const struct r_found_version *version,
void *const reloc_addr);
auto void __attribute__((always_inline))
-elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
- void *const reloc_addr);
-auto void __attribute__((always_inline))
elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
void *const reloc_addr);
+# endif
# if ELF_MACHINE_NO_RELA || defined ELF_MACHINE_PLT_REL
auto void __attribute__((always_inline))
elf_machine_lazy_rel (struct link_map *map,
/* Find matching transformation algorithms and initialize steps.
- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1997,1998,1999,2000,2001,2004,2005
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
/* Allocate the buffer. */
size = (GCONV_NCHAR_GOAL * steps[cnt].__max_needed_to);
- result->__data[cnt].__outbuf = (char *) malloc (size);
+ result->__data[cnt].__outbuf = malloc (size);
if (result->__data[cnt].__outbuf == NULL)
{
res = __GCONV_NOMEM;
-/* Copyright (C) 1991-1993,1995-2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1993,1995-2003,2004,2005 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
/* If none of the ANSI/POSIX macros are defined, use POSIX.1 and POSIX.2
(and IEEE Std 1003.1b-1993 unless _XOPEN_SOURCE is defined). */
-#if (!defined __STRICT_ANSI__ && !defined _POSIX_SOURCE && \
- !defined _POSIX_C_SOURCE)
+#if ((!defined __STRICT_ANSI__ || (_XOPEN_SOURCE - 0) >= 500) && \
+ !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE)
# define _POSIX_SOURCE 1
# if defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 500
# define _POSIX_C_SOURCE 2
__const char *__codeset);
extern const char _libc_intl_domainname[];
-extern const char _libc_intl_domainname_internal[] attribute_hidden;
+libc_hidden_proto (_libc_intl_domainname)
/* Define the macros `_' and `N_' for conveniently marking translatable
strings in the libc source code. We have to make sure we get the
# undef _
/* This is defined as an optimizing macro, so use it. */
-# if !defined NOT_IN_libc && defined SHARED
-# define _(msgid) \
- __dcgettext_internal (_libc_intl_domainname_internal, msgid, LC_MESSAGES)
-# else
-# define _(msgid) \
+# define _(msgid) \
__dcgettext (_libc_intl_domainname, msgid, LC_MESSAGES)
-#endif
#endif
port = 0;
} else {
char num[32];
- int s2, sa2len;
+ int s2;
+ socklen_t sa2len;
s2 = __socket(res0->ai_family, res0->ai_socktype, 0);
if (s2 < 0) {
port = atoi(servbuff);
(void) sprintf(num, "%u", port);
(void) __write(s, num, strlen(num)+1);
- { int len = sizeof (from);
+ { socklen_t len = sizeof (from);
s3 = TEMP_FAILURE_RETRY (accept(s2, (struct sockaddr *)&from,
&len));
__close(s2);
/* Implementation of the bindtextdomain(3) function
- Copyright (C) 1995-1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1995-1998, 2000, 2001, 2002, 2005 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
/* Contains the default location of the message catalogs. */
extern const char _nl_default_dirname[];
#ifdef _LIBC
-extern const char _nl_default_dirname_internal[] attribute_hidden;
-#else
-# define INTUSE(name) name
+libc_hidden_proto (_nl_default_dirname)
#endif
/* List with bindings of specific domains. */
char *result = binding->dirname;
if (strcmp (dirname, result) != 0)
{
- if (strcmp (dirname, INTUSE(_nl_default_dirname)) == 0)
- result = (char *) INTUSE(_nl_default_dirname);
+ if (strcmp (dirname, _nl_default_dirname) == 0)
+ result = (char *) _nl_default_dirname;
else
{
#if defined _LIBC || defined HAVE_STRDUP
if (__builtin_expect (result != NULL, 1))
{
- if (binding->dirname != INTUSE(_nl_default_dirname))
+ if (binding->dirname != _nl_default_dirname)
free (binding->dirname);
binding->dirname = result;
{
/* Simply return the default values. */
if (dirnamep)
- *dirnamep = INTUSE(_nl_default_dirname);
+ *dirnamep = _nl_default_dirname;
if (codesetp)
*codesetp = NULL;
}
if (dirname == NULL)
/* The default value. */
- dirname = INTUSE(_nl_default_dirname);
+ dirname = _nl_default_dirname;
else
{
- if (strcmp (dirname, INTUSE(_nl_default_dirname)) == 0)
- dirname = INTUSE(_nl_default_dirname);
+ if (strcmp (dirname, _nl_default_dirname) == 0)
+ dirname = _nl_default_dirname;
else
{
char *result;
}
else
/* The default value. */
- new_binding->dirname = (char *) INTUSE(_nl_default_dirname);
+ new_binding->dirname = (char *) _nl_default_dirname;
new_binding->codeset_cntr = 0;
if (0)
{
failed_codeset:
- if (new_binding->dirname != INTUSE(_nl_default_dirname))
+ if (new_binding->dirname != _nl_default_dirname)
free (new_binding->dirname);
failed_dirname:
free (new_binding);
/* Implementation of the internal dcigettext function.
- Copyright (C) 1995-2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1995-2002,2003,2004,2005 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
}
#endif
-#ifndef INTVARDEF
-# define INTVARDEF
-#endif
-#ifndef INTUSE
-# define INTUSE(name) name
-#endif
-
/* Name of the default domain used for gettext(3) prior any call to
textdomain(3). The default value for this is "messages". */
const char _nl_default_default_domain[] attribute_hidden = "messages";
= _nl_default_default_domain;
/* Contains the default location of the message catalogs. */
+
+#ifdef _LIBC
+extern const char _nl_default_dirname[];
+libc_hidden_proto (_nl_default_dirname)
+#endif
const char _nl_default_dirname[] = LOCALEDIR;
-INTVARDEF (_nl_default_dirname)
+#ifdef _LIBC
+libc_hidden_data_def (_nl_default_dirname)
+#endif
/* List with bindings of specific domains created by bindtextdomain()
calls. */
}
if (binding == NULL)
- dirname = (char *) INTUSE(_nl_default_dirname);
+ dirname = (char *) _nl_default_dirname;
else if (binding->dirname[0] == '/')
dirname = binding->dirname;
else
goto converted;
}
- inbuf = result;
+ inbuf = (const unsigned char *) result;
# else
# if HAVE_ICONV
const char *inptr = (const char *) inbuf;
newmem->next = transmem_list;
transmem_list = newmem;
- freemem = newmem->data;
+ freemem = (unsigned char *) newmem->data;
freemem_size -= offsetof (struct transmem_list, data);
# else
transmem_list = newmem;
{
struct binding *oldp = _nl_domain_bindings;
_nl_domain_bindings = _nl_domain_bindings->next;
- if (oldp->dirname != INTUSE(_nl_default_dirname))
+ if (oldp->dirname != _nl_default_dirname)
/* Yes, this is a pointer comparison. */
free (oldp->dirname);
free (oldp->codeset);
-/* Copyright (C) 1991-1995, 1997-2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1995,1997-2003,2004,2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Per Bothner <bothner@cygnus.com>.
extern _IO_wint_t __woverflow (_IO_FILE *, _IO_wint_t) __THROW;
#if __GNUC__ >= 3
-# define _IO_BE(expr, res) __builtin_expect (expr, res)
+# define _IO_BE(expr, res) __builtin_expect ((expr), res)
#else
# define _IO_BE(expr, res) (expr)
#endif
/* Define a constant for the dgettext domainname for libc internal messages,
so the string constant is not repeated in dozens of object files. */
+#include <libintl.h>
+
const char _libc_intl_domainname[] = "libc";
-INTDEF(_libc_intl_domainname)
+libc_hidden_data_def (_libc_intl_domainname)
/* Define current locale data for LC_CTYPE category.
- Copyright (C) 1995,1996,1997,1998,1999,2000,2002,2003
+ Copyright (C) 1995,1996,1997,1998,1999,2000,2002,2003,2005
Free Software Foundation, Inc.
This file is part of the GNU C Library.
compat_symbol (libc, __ctype32_toupper, __ctype32_toupper, GLIBC_2_2);
__ctype_b = current (uint16_t, CLASS, 128);
- __ctype_toupper = current (uint32_t, TOUPPER, 128);
- __ctype_tolower = current (uint32_t, TOLOWER, 128);
+ __ctype_toupper = current (int32_t, TOUPPER, 128);
+ __ctype_tolower = current (int32_t, TOLOWER, 128);
__ctype32_b = current (uint32_t, CLASS32, 0);
__ctype32_toupper = current (uint32_t, TOUPPER32, 0);
__ctype32_tolower = current (uint32_t, TOLOWER32, 0);
const char *from, const char *to,
unsigned long int width);
static void charmap_new_char (struct linereader *lr, struct charmap_t *cm,
- int nbytes, char *bytes, const char *from,
- const char *to, int decimal_ellipsis, int step);
+ size_t nbytes, unsigned char *bytes,
+ const char *from, const char *to,
+ int decimal_ellipsis, int step);
bool enc_not_ascii_compatible;
static void
charmap_new_char (struct linereader *lr, struct charmap_t *cm,
- int nbytes, char *bytes, const char *from, const char *to,
+ size_t nbytes, unsigned char *bytes,
+ const char *from, const char *to,
int decimal_ellipsis, int step)
{
hash_table *ht = &cm->char_table;
-/* Copyright (C) 1996-2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2001,2002,2003,2004,2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.org>, 1996.
/* This is supposed to be a numeric value. We return the
numerical value and the number of bytes. */
size_t start_idx = lr->idx - 1;
- char *bytes = lr->token.val.charcode.bytes;
- int nbytes = 0;
+ unsigned char *bytes = lr->token.val.charcode.bytes;
+ size_t nbytes = 0;
int ch;
do
-/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999, 2000, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@suse.de>, 1997.
struct nis_cb *cb;
int sock = RPC_ANYSOCK;
struct sockaddr_in sin;
- int len = sizeof (struct sockaddr_in);
+ socklen_t len = sizeof (struct sockaddr_in);
char addr[NIS_MAXNAMELEN + 1];
unsigned short port;
-/* Copyright (c) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (c) 1997, 1998, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
directory_obj *
nis_clone_directory (const directory_obj *src, directory_obj *dest)
{
- unsigned char *addr;
+ char *addr;
unsigned int size;
XDR xdrs;
directory_obj *res;
-/* Copyright (c) 1997, 1998, 2004 Free Software Foundation, Inc.
+/* Copyright (c) 1997, 1998, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
nis_object *
nis_clone_object (const nis_object *src, nis_object *dest)
{
- unsigned char *addr;
- unsigned long size;
+ char *addr;
+ unsigned int size;
XDR xdrs;
nis_object *res = NULL;
-/* Copyright (c) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (c) 1997, 1998, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
nis_result *
nis_clone_result (const nis_result *src, nis_result *dest)
{
- unsigned char *addr;
+ char *addr;
unsigned int size;
XDR xdrs;
nis_result *res;
+2005-02-16 Roland McGrath <roland@redhat.com>
+
+ * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
+ Use unsigned int * for ptr_nthreads.
+
2005-02-14 Alan Modra <amodra@bigpond.net.au>
* sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
2005-01-26 Jakub Jelinek <jakub@redhat.com>
+ [BZ #737]
* sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
at least gotntpoff relocation and addition.
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
void (*ptr__pthread_cleanup_pop_restore) (struct _pthread_cleanup_buffer *,
int);
#define HAVE_PTR_NTHREADS
- int *ptr_nthreads;
+ unsigned int *ptr_nthreads;
void (*ptr___pthread_unwind) (__pthread_unwind_buf_t *)
__attribute ((noreturn)) __cleanup_fct_attribute;
void (*ptr__nptl_deallocate_tsd) (void);
# ifdef _LIBC
# undef gettext
# define gettext(msgid) \
- INTUSE(__dcgettext) (INTUSE(_libc_intl_domainname), msgid, LC_MESSAGES)
+ INTUSE(__dcgettext) (_libc_intl_domainname, msgid, LC_MESSAGES)
# endif
#else
# define gettext(msgid) (msgid)
char linebuffer[0];
} *net_data = (struct net_data *) buffer;
int linebuflen = buflen - offsetof (struct net_data, linebuffer);
- const char *end_of_message = &answer->buf[anslen];
+ const unsigned char *end_of_message = &answer->buf[anslen];
const HEADER *header_pointer = &answer->hdr;
/* #/records in the answer section. */
int answer_count = ntohs (header_pointer->ancount);
/* #/entries in the question section. */
int question_count = ntohs (header_pointer->qdcount);
char *bp = net_data->linebuffer;
- const char *cp = &answer->buf[HFIXEDSZ];
+ const unsigned char *cp = &answer->buf[HFIXEDSZ];
char **alias_pointer;
int have_answer;
char *ans;
/* Are we still talking to whom we want to talk to? */
if (statp->_vcsock >= 0 && (statp->_flags & RES_F_VC) != 0) {
struct sockaddr_in6 peer;
- int size = sizeof peer;
+ socklen_t size = sizeof peer;
if (getpeername(statp->_vcsock,
(struct sockaddr *)&peer, &size) < 0 ||
int ptimeout;
struct sockaddr_in6 from;
static int socket_pf = 0;
- int fromlen, resplen, seconds, n;
+ socklen_t fromlen;
+ int resplen, seconds, n;
if (EXT(statp).nssocks[ns] == -1) {
/* only try IPv6 if IPv6 NS and if not failed before */
res_nclose(statp);
return (0);
}
+ else {
+ /* poll should not have returned > 0 in this case. */
+ abort ();
+ }
}
#ifdef DEBUG
/* syncaddr - optional addr of host to sync with */
/* ckey - optional conversation key to use */
{
- u_char pkey_data[1024];
+ char pkey_data[1024];
netobj pkey;
if (!getpublickey (servername, pkey_data))
return NULL;
- pkey.n_bytes = (char *) pkey_data;
- pkey.n_len = strlen ((char *) pkey_data) + 1;
+ pkey.n_bytes = pkey_data;
+ pkey.n_len = strlen (pkey_data) + 1;
return INTUSE(authdes_pk_create) (servername, &pkey, window, syncaddr, ckey);
}
des_block cryptbuf[2];
des_block ivec;
int status;
- unsigned int len;
+ int len;
register int32_t *ixdr;
struct timeval tval;
unsigned long
_create_xid (void)
{
- unsigned long res;
+ long int res;
__libc_lock_lock (createxid_lock);
struct timeval wait_time;
int fd;
struct sockaddr_un name;
- int namelen = sizeof(struct sockaddr_un);
+ socklen_t namelen = sizeof(struct sockaddr_un);
#define TOTAL_TIMEOUT 30 /* total timeout talking to keyserver */
#define TOTAL_TRIES 5 /* Number of tries */
/* RFC 868 says the time is transmitted as a 32-bit value. */
uint32_t thetime;
struct sockaddr_in from;
- int fromlen;
+ socklen_t fromlen;
int type;
if (timeout == NULL)
/*
* xdr the timestamp before encrypting
*/
- ixdr = (int32_t *) cryptbuf;
+ ixdr = (uint32_t *) cryptbuf;
IXDR_PUT_INT32 (ixdr, timestamp.tv_sec - 1);
IXDR_PUT_INT32 (ixdr, timestamp.tv_usec);
bool_t
xdr_hyper (XDR *xdrs, quad_t *llp)
{
- long t1;
- unsigned long int t2;
+ long int t1, t2;
if (xdrs->x_op == XDR_ENCODE)
{
if (!XDR_GETLONG(xdrs, &t1) || !XDR_GETLONG(xdrs, &t2))
return FALSE;
*llp = ((quad_t) t1) << 32;
- *llp |= t2;
+ *llp |= (unsigned long int) t2;
return TRUE;
}
bool_t
xdr_u_hyper (XDR *xdrs, u_quad_t *ullp)
{
- unsigned long t1;
- unsigned long t2;
+ long int t1, t2;
if (xdrs->x_op == XDR_ENCODE)
{
if (!XDR_GETLONG(xdrs, &t1) || !XDR_GETLONG(xdrs, &t2))
return FALSE;
*ullp = ((u_quad_t) t1) << 32;
- *ullp |= t2;
+ *ullp |= (unsigned long int) t2;
return TRUE;
}
bool_t
xdr_u_short (XDR *xdrs, u_short *usp)
{
- u_long l;
+ long l;
switch (xdrs->x_op)
{
{
return FALSE;
}
- *usp = (u_short) l;
+ *usp = (u_short) (u_long) l;
return TRUE;
case XDR_FREE:
-/* Copyright (c) 1998, 1999, 2000, 2004 Free Software Foundation, Inc.
+/* Copyright (c) 1998, 1999, 2000, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1998.
bool_t
xdr_int64_t (XDR *xdrs, int64_t *ip)
{
- int32_t t1;
- /* This must be unsigned, otherwise we get problems with sign
- extension in the DECODE case. */
- uint32_t t2;
+ int32_t t1, t2;
switch (xdrs->x_op)
{
if (!XDR_GETINT32(xdrs, &t1) || !XDR_GETINT32(xdrs, &t2))
return FALSE;
*ip = ((int64_t) t1) << 32;
- *ip |= t2;
+ *ip |= (uint32_t) t2; /* Avoid sign extension. */
return TRUE;
case XDR_FREE:
return TRUE;
/* Compute hash value for given string according to ELF standard.
- Copyright (C) 1995, 1996, 1997, 1998, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1995,1996,1997,1998,2003,2005 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
first five operations no overflow is possible so we optimized it a
bit. */
static unsigned int
-_dl_elf_hash (const unsigned char *name)
+_dl_elf_hash (const char *name_arg)
{
+ const unsigned char *name = (const unsigned char *) name_arg;
unsigned long int hash = 0;
if (*name != '\0')
{
terminate the entire process. */
result = 0;
# ifdef SHARED
- int *const ptr = __libc_pthread_functions.ptr_nthreads;
+ unsigned int *const ptr = __libc_pthread_functions.ptr_nthreads;
# else
- extern int __nptl_nthreads __attribute ((weak));
- int *const ptr = &__nptl_nthreads;
+ extern unsigned int __nptl_nthreads __attribute ((weak));
+ unsigned int *const ptr = &__nptl_nthreads;
# endif
if (! atomic_decrement_and_test (ptr))
#endif /* !dl_machine_h */
-#ifdef RESOLVE_MAP
-
/* The i386 never uses Elf32_Rela relocations for the dynamic linker.
Prelinked libraries may use Elf32_Rela though. */
#ifdef RTLD_BOOTSTRAP
# define ELF_MACHINE_NO_RELA 1
#endif
+#ifdef RESOLVE_MAP
+
/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
MAP is the object containing the reloc. */
/* Compute hash alue for given string according to ELF standard.
- Copyright (C) 1998, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2003, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
would be much slower than the generic C implementation. So don't
use it. */
static unsigned int
-_dl_elf_hash (const unsigned char *name)
+_dl_elf_hash (const char *name)
{
unsigned int result;
unsigned int temp0;
"jnz 2b\n"
"1:\t"
: "=&r" (result), "=r" (name), "=&c" (temp0), "=&r" (temp1)
- : "0" (0), "1" (name));
+ : "0" (0), "1" ((const unsigned char *) name));
return result;
}
h->h_length);
else
{
- int32_t *addr = (uint32_t *) (*pat)->addr;
+ uint32_t *addr = (uint32_t *) (*pat)->addr;
addr[3] = *(uint32_t *) h->h_addr_list[i];
addr[2] = htonl (0xffff);
addr[1] = 0;
/* elf_machine_runtime_setup handles this. */
}
-auto inline void __attribute__ ((always_inline))
-elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
- const ElfW(Sym) *sym, const struct r_found_version *version,
- void *const reloc_addr)
-{
-}
-
-auto inline void __attribute__ ((always_inline))
-elf_machine_rel_relative (ElfW(Addr) l_addr, const Elf32_Rel *reloc,
- void *const reloc_addr)
-{
-}
-
/* The SVR4 ABI specifies that the JMPREL relocs must be inside the
DT_RELA table. */
#define ELF_MACHINE_PLTREL_OVERLAP 1
/* elf_machine_runtime_setup handles this. */
}
-auto inline void __attribute__ ((always_inline))
-elf_machine_rel (struct link_map *map, const Elf64_Rel *reloc,
- const ElfW(Sym) *sym, const struct r_found_version *version,
- void *const reloc_addr)
-{
-}
-
-auto inline void __attribute__ ((always_inline))
-elf_machine_rel_relative (ElfW(Addr) l_addr, const Elf64_Rel *reloc,
- void *const reloc_addr)
-{
-}
#endif /* RESOLVE */
#endif /* !dl_machine_h */
-#ifdef RESOLVE_MAP
-
/* SH never uses Elf32_Rel relocations. */
#define ELF_MACHINE_NO_REL 1
+#ifdef RESOLVE_MAP
+
/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
MAP is the object containing the reloc. */