From ed099f029e8b8b61a48329586fc00035af7f2287 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 29 Sep 2000 22:04:20 +0000 Subject: [PATCH] Update. Use nscd_ssize_t where appropriate. * nscd/nscd_gethst_r.c (nscd_gethst_r): Use nscd_ssize_t instead of ssize_t where appropriate. * sysdeps/generic/nscd-types.h: New file. * sysdeps/alpha/nscd-types.h: New file. --- ChangeLog | 8 +++++--- nscd/nscd-client.h | 28 +++++++++++++++------------- sysdeps/alpha/nscd-types.h | 22 ++++++++++++++++++++++ sysdeps/generic/nscd-types.h | 22 ++++++++++++++++++++++ 4 files changed, 64 insertions(+), 16 deletions(-) create mode 100644 sysdeps/alpha/nscd-types.h create mode 100644 sysdeps/generic/nscd-types.h diff --git a/ChangeLog b/ChangeLog index 04414b6..2f55545 100644 --- a/ChangeLog +++ b/ChangeLog @@ -45,12 +45,14 @@ 2000-09-29 Jakub Jelinek * nscd/nscd-client.h (NSCD_VERSION): Bump to 3. - Use int32_t where appropriate. - * nscd/nscd_gethst_r.c (nscd_gethst_r): Use uint32_t instead of size_t - where appropriate. + Use nscd_ssize_t where appropriate. + * nscd/nscd_gethst_r.c (nscd_gethst_r): Use nscd_ssize_t instead of + ssize_t where appropriate. * nscd/nscd_getgr_r.c (nscd_getgr_r): Likewise. * nscd/hstcache.c (cache_addhst): Likewise. * nscd/grpcache.c (cache_addgr): Likewise. + * sysdeps/generic/nscd-types.h: New file. + * sysdeps/alpha/nscd-types.h: New file. 2000-09-29 Ulrich Drepper diff --git a/nscd/nscd-client.h b/nscd/nscd-client.h index 97b0baf..3b7b7f3 100644 --- a/nscd/nscd-client.h +++ b/nscd/nscd-client.h @@ -23,8 +23,10 @@ #ifndef _NSCD_CLIENT_H #define _NSCD_CLIENT_H 1 +#include + /* Version number of the daemon interface */ -#define NSCD_VERSION 3 +#define NSCD_VERSION 2 /* Path of the file where the PID of the running system is stored. */ #define _PATH_NSCDPID "/var/run/nscd.pid" @@ -58,7 +60,7 @@ typedef enum /* Header common to all requests */ typedef struct { - int version; /* Version number of the daemon interface. */ + int32_t version; /* Version number of the daemon interface. */ request_type type; /* Service requested. */ int32_t key_len; /* Key length. */ } request_header; @@ -70,13 +72,13 @@ typedef struct { int32_t version; int32_t found; - int32_t pw_name_len; - int32_t pw_passwd_len; + nscd_ssize_t pw_name_len; + nscd_ssize_t pw_passwd_len; uid_t pw_uid; gid_t pw_gid; - int32_t pw_gecos_len; - int32_t pw_dir_len; - int32_t pw_shell_len; + nscd_ssize_t pw_gecos_len; + nscd_ssize_t pw_dir_len; + nscd_ssize_t pw_shell_len; } pw_response_header; @@ -86,10 +88,10 @@ typedef struct { int32_t version; int32_t found; - int32_t gr_name_len; - int32_t gr_passwd_len; + nscd_ssize_t gr_name_len; + nscd_ssize_t gr_passwd_len; gid_t gr_gid; - int32_t gr_mem_cnt; + nscd_ssize_t gr_mem_cnt; } gr_response_header; @@ -99,11 +101,11 @@ typedef struct { int32_t version; int32_t found; - int32_t h_name_len; - int32_t h_aliases_cnt; + nscd_ssize_t h_name_len; + nscd_ssize_t h_aliases_cnt; int32_t h_addrtype; int32_t h_length; - int32_t h_addr_list_cnt; + nscd_ssize_t h_addr_list_cnt; int32_t error; } hst_response_header; diff --git a/sysdeps/alpha/nscd-types.h b/sysdeps/alpha/nscd-types.h new file mode 100644 index 0000000..9096081 --- /dev/null +++ b/sysdeps/alpha/nscd-types.h @@ -0,0 +1,22 @@ +/* Types for the NSCD implementation. Alpha version. + Copyright (c) 2000 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +typedef int64_t nscd_ssize_t; diff --git a/sysdeps/generic/nscd-types.h b/sysdeps/generic/nscd-types.h new file mode 100644 index 0000000..2c7a553 --- /dev/null +++ b/sysdeps/generic/nscd-types.h @@ -0,0 +1,22 @@ +/* Types for the NSCD implementation. Generic version. + Copyright (c) 2000 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 + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +typedef int32_t nscd_ssize_t; -- 2.7.4