* nscd/nscd.h: Update decl.
* nscd/nscd_getpw_r.c (nscd_getpw_r): Add casts for signedness.
* nscd/nscd_getgr_r.c (nscd_getgr_r): Likewise.
* elf/dl-close.c (_dl_close): Likewise.
* sysdeps/unix/sysv/linux/powerpc/chown.c (__chown): int -> size_t
* io/fts.c (fts_build): Likewise.
* elf/cache.c (add_to_cache): Likewise.
* locale/programs/locarchive.c (show_archive_content): Likewise.
* posix/fnmatch.c (fnmatch): Tweak __builtin_expect use.
* include/ctype.h (__ctype_b_loc): Tweak type punning to make gcc 3.3
happy.
(__ctype_toupper_loc, __ctype_tolower_loc): Likewise.
+2003-03-15 Roland McGrath <roland@redhat.com>
+
+ * nscd/cache.c (cache_search): Give first arg type `request_type'.
+ * nscd/nscd.h: Update decl.
+
+ * nscd/nscd_getpw_r.c (nscd_getpw_r): Add casts for signedness.
+ * nscd/nscd_getgr_r.c (nscd_getgr_r): Likewise.
+ * elf/dl-close.c (_dl_close): Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/chown.c (__chown): int -> size_t
+ * io/fts.c (fts_build): Likewise.
+ * elf/cache.c (add_to_cache): Likewise.
+ * locale/programs/locarchive.c (show_archive_content): Likewise.
+
+ * posix/fnmatch.c (fnmatch): Tweak __builtin_expect use.
+
+ * include/ctype.h (__ctype_b_loc): Tweak type punning to make gcc 3.3
+ happy.
+ (__ctype_toupper_loc, __ctype_tolower_loc): Likewise.
+
2003-03-15 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/ia64/system.c: Use the generic Linux
{
struct cache_entry *new_entry, *ptr, *prev;
char *full_path;
- int len, i;
+ size_t len, i;
new_entry = (struct cache_entry *) xmalloc (sizeof (struct cache_entry));
this search list, going in either direction. When the
whole chunk is at the end of the used area then we can
reclaim it. */
- if (imap->l_tls_offset == tls_free_end)
+ if ((size_t) imap->l_tls_offset == tls_free_end)
/* Extend the contiguous chunk being reclaimed. */
tls_free_end += imap->l_tls_blocksize;
else if (imap->l_tls_offset + imap->l_tls_blocksize
CTYPE_EXTERN_INLINE const uint16_t ** __attribute__ ((const))
__ctype_b_loc (void)
{
- const uint16_t **tablep =
- (const uint16_t **) __libc_tsd_address (CTYPE_B);
+ void **tablep = __libc_tsd_address (CTYPE_B);
if (__builtin_expect (*tablep == NULL, 0))
- *tablep = (const uint16_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_CLASS) + 128;
- return tablep;
+ *tablep = (uint16_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_CLASS) + 128;
+ return (const uint16_t **) tablep;
}
CTYPE_EXTERN_INLINE const int32_t ** __attribute__ ((const))
__ctype_toupper_loc (void)
{
- const int32_t **tablep =
- (const int32_t **) __libc_tsd_address (CTYPE_TOUPPER);
+ void **tablep = __libc_tsd_address (CTYPE_TOUPPER);
if (__builtin_expect (*tablep == NULL, 0))
*tablep = ((int32_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_TOUPPER) + 128);
- return tablep;
+ return (const int32_t **) tablep;
}
CTYPE_EXTERN_INLINE const int32_t ** __attribute__ ((const))
__ctype_tolower_loc (void)
{
- const int32_t **tablep =
- (const int32_t **) __libc_tsd_address (CTYPE_TOLOWER);
+ void **tablep = __libc_tsd_address (CTYPE_TOLOWER);
if (__builtin_expect (*tablep == NULL, 0))
*tablep = ((int32_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_TOLOWER) + 128);
- return tablep;
+ return (const int32_t **) tablep;
}
# endif /* Not NOT_IN_libc. */
FTSENT *cur, *tail;
DIR *dirp;
void *oldaddr;
- int cderrno, descend, len, level, maxlen, nlinks, saved_errno,
+ int cderrno, descend, len, level, nlinks, saved_errno,
nostat, doadjust;
+ size_t maxlen;
char *cp;
/* Set current node pointer. */
-/* Copyright (C) 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
struct locarhead *head;
struct namehashent *namehashtab;
struct nameent *names;
- int cnt;
- int used;
+ size_t cnt, used;
/* Open the archive. This call never returns if we cannot
successfully open the archive. */
-/* Copyright (c) 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (c) 1998, 1999, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
This function must be called with the read-lock held. */
struct hashentry *
-cache_search (int type, void *key, size_t len, struct database *table,
+cache_search (request_type type, void *key, size_t len, struct database *table,
uid_t owner)
{
unsigned long int hash = __nis_hash (key, len) % table->module;
-/* Copyright (c) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (c) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@suse.de>, 1998.
extern int receive_print_stats (void) __attribute__ ((__noreturn__));
/* cache.c */
-extern struct hashentry *cache_search (int type, void *key, size_t len,
+extern struct hashentry *cache_search (request_type, void *key, size_t len,
struct database *table, uid_t owner);
extern void cache_add (int type, void *key, size_t len,
const void *packet, size_t iovtotal, void *data,
vec[1].iov_base = (void *) key;
vec[1].iov_len = keylen;
- nbytes = (size_t) TEMP_FAILURE_RETRY (__writev (sock, vec, 2));
- if (nbytes != sizeof (request_header) + keylen)
+ nbytes = TEMP_FAILURE_RETRY (__writev (sock, vec, 2));
+ if (nbytes != (ssize_t) (sizeof (request_header) + keylen))
{
__close (sock);
return -1;
nbytes = TEMP_FAILURE_RETRY (__read (sock, &gr_resp,
sizeof (gr_response_header)));
- if (nbytes != sizeof (gr_response_header))
+ if (nbytes != (ssize_t) sizeof (gr_response_header))
{
__close (sock);
return -1;
vec[1].iov_base = (void *) key;
vec[1].iov_len = keylen;
- nbytes = (size_t) TEMP_FAILURE_RETRY (__writev (sock, vec, 2));
- if (nbytes != sizeof (request_header) + keylen)
+ nbytes = TEMP_FAILURE_RETRY (__writev (sock, vec, 2));
+ if (nbytes != (ssize_t) (sizeof (request_header) + keylen))
{
__close (sock);
return -1;
nbytes = TEMP_FAILURE_RETRY (__read (sock, &pw_resp,
sizeof (pw_response_header)));
- if (nbytes != sizeof (pw_response_header))
+ if (nbytes != (ssize_t) sizeof (pw_response_header))
{
__close (sock);
return -1;
-/* Copyright (C) 1991-93,96-99,2000,01,02 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1992,1993,1996,1997,1998,1999,2000,2001,2002,2003
+ 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
/* Convert the strings into wide characters. */
memset (&ps, '\0', sizeof (ps));
n = mbsrtowcs (NULL, &pattern, 0, &ps);
- if (__builtin_expect (n, 0) == (size_t) -1)
+ if (__builtin_expect (n == (size_t) -1, 0))
/* Something wrong.
XXX Do we have to set `errno' to something which mbsrtows hasn't
already done? */
assert (mbsinit (&ps));
n = mbsrtowcs (NULL, &string, 0, &ps);
- if (__builtin_expect (n, 0) == (size_t) -1)
+ if (__builtin_expect (n == (size_t) -1, 0))
/* Something wrong.
XXX Do we have to set `errno' to something which mbsrtows hasn't
already done? */
/* chown() compatibility.
- Copyright (C) 1998, 2000, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2000, 2002, 2003 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
char link[PATH_MAX+2];
char path[2*PATH_MAX+4];
int loopct;
- int filelen;
+ size_t filelen;
static int libc_old_chown = 0 /* -1=old linux, 1=new linux, 0=unknown */;
if (libc_old_chown == 1)
ENAMETOOLONG before this, usually. */
for (loopct = 0; loopct < 128; loopct++)
{
- int linklen;
+ size_t linklen;
if (err >= PATH_MAX+1)
{
} while (0)
#endif
-#include_next <sysdeps/unix/sysv/linux/dl-sysdep.c>
+#include <sysdeps/unix/sysv/linux/dl-sysdep.c>