-/* Copyright (c) 1998, 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (c) 1998, 1999, 2000, 2003, 2004, 2005, 2006, 2007
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@suse.de>, 1998.
#include <sys/types.h>
#include <atomic.h>
#include <nscd-types.h>
+#include <sys/uio.h>
/* Version number of the daemon interface */
const char *data;
size_t mapsize;
int counter; /* > 0 indicates it is usable. */
+ size_t datasize;
};
#define NO_MAPPING ((struct mapped_database *) -1l)
/* Get reference of mapping. */
extern struct mapped_database *__nscd_get_map_ref (request_type type,
const char *name,
- struct locked_map_ptr *mapptr,
+ volatile struct locked_map_ptr *mapptr,
int *gc_cyclep);
/* Unmap database. */
/* Search the mapped database. */
-extern const struct datahead *__nscd_cache_search (request_type type,
- const char *key,
- size_t keylen,
- const struct mapped_database *mapped);
+extern struct datahead *__nscd_cache_search (request_type type,
+ const char *key,
+ size_t keylen,
+ const struct mapped_database *mapped);
+
+/* Wrappers around read, readv and write that only read/write less than LEN
+ bytes on error or EOF. */
+extern ssize_t __readall (int fd, void *buf, size_t len)
+ attribute_hidden;
+extern ssize_t __readvall (int fd, const struct iovec *iov, int iovcnt)
+ attribute_hidden;
+extern ssize_t writeall (int fd, const void *buf, size_t len)
+ attribute_hidden;
+extern ssize_t sendfileall (int tofd, int fromfd, off_t off, size_t len)
+ attribute_hidden;
#endif /* nscd.h */