diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | nscd/nscd-client.h | 28 | ||||
-rw-r--r-- | sysdeps/alpha/nscd-types.h | 22 | ||||
-rw-r--r-- | sysdeps/generic/nscd-types.h | 22 |
4 files changed, 64 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog index 04414b6ca4..2f55545699 100644 --- a/ChangeLog +++ b/ChangeLog @@ -45,12 +45,14 @@ 2000-09-29 Jakub Jelinek <jakub@redhat.com> * 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 <drepper@redhat.com> diff --git a/nscd/nscd-client.h b/nscd/nscd-client.h index 97b0baf629..3b7b7f3270 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 <nscd-types.h> + /* 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 0000000000..9096081eaa --- /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 <stdint.h> + +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 0000000000..2c7a55372e --- /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 <stdint.h> + +typedef int32_t nscd_ssize_t; |