+1998-08-18 Ulrich Drepper <drepper@cygnus.com>
+
+ * include/features.h: Define __USE_EXTERN_INLINES for recent
+ enough gcc.
+ * argp/argp.h: Define extern inline functions only if
+ __USE_EXTERN_INLINES is defined.
+ * libio/stdio.h: Likewise.
+ * math/math.h: Likewise.
+ * stdlib/stdlib.h: Likewise.
+ * string/argz.h: Likewise.
+ * sysdeps/generic/bits/sigset.h: Likewise.
+ * sysdeps/unix/sysv/linux/bits/sigset.h: Likewise.
+ * sysdeps/unix/sysv/sysv4/bits/sigset.h: Likewise.
+ * sysdeps/wordsize-32/inttypes.h: Likewise.
+ * sysdeps/wordsize-64/inttypes.h: Likewise.
+ * wcsmbs/wchar.h: Likewise.
+
+ * sysdeps/generic/bits/glob.c [_LIBC]: Define __stat using __xstat
+ to allow compilation without optimization.
+
+1998-08-14 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
+
+ * nis/nss_compat/compat-grp.c: Set errno to ENOENT if we have no
+ more entries.
+ * nis/nss_compat/compat-initgroups.c: Likewise.
+ * nis/nss_compat/compat-pwd.c: Likewise.
+ * nis/nss_compat/compat-spwd.c: Likewise.
+ * nis/nss_nis/nis-alias.c: Likewise.
+ * nis/nss_nis/nis-ethers.c: Likewise.
+ * nis/nss_nis/nis-grp.c: Likewise.
+ * nis/nss_nis/nis-hosts.c: Likewise.
+ * nis/nss_nis/nis-initgroups.c: Likewise.
+ * nis/nss_nis/nis-network.c: Likewise.
+ * nis/nss_nis/nis-proto.c: Likewise.
+ * nis/nss_nis/nis-pwd.c: Likewise.
+ * nis/nss_nis/nis-rpc.c: Likewise.
+ * nis/nss_nis/nis-service.c: Likewise.
+ * nis/nss_nis/nis-spwd.c: Likewise.
+
+ * nis/rpcsvc/yp.h: Generate new without 1024 byte limits.
+
+ * nis/ypclnt.c: Try binding dir only first time, could be to old.
+
+ * nis/yp_xdr.c: Remove 1024 byte limit.
+ * nis/ypupdate_xdr.c: Likewise.
+
+ * nis/nss_nis/nis-publickey.c: Make sure, nobody could send
+ wrong data.
+
1998-08-18 Roland McGrath <roland@baalperazim.frob.com>
* Rules (binaries-static, binaries-shared static pattern rules):
extern void *__argp_input __P ((__const struct argp *argp,
__const struct argp_state *state));
\f
-#ifdef __OPTIMIZE__
+#ifdef __USE_EXTERN_INLINES
# if !_LIBC
# define __argp_usage argp_usage
# undef __option_is_short
# undef __option_is_end
# endif
-#endif /* __OPTIMIZE__ */
+#endif /* Use extern inlines. */
#ifdef __cplusplus
}
#define _SIGSET_H_fns 1
#ifndef _EXTERN_INLINE
-#define _EXTERN_INLINE extern __inline
+# define _EXTERN_INLINE extern __inline
#endif
/* Return a mask that includes SIG only. The cast to `sigset_t' avoids
extern int __sigaddset (__sigset_t *, int);
extern int __sigdelset (__sigset_t *, int);
-#define __SIGSETFN(NAME, BODY, CONST) \
+#ifdef __USE_EXTERN_INLINES
+# define __SIGSETFN(NAME, BODY, CONST) \
_EXTERN_INLINE int \
NAME (CONST __sigset_t *__set, int __sig) \
{ \
__SIGSETFN (__sigaddset, ((*__set |= __mask), 0), )
__SIGSETFN (__sigdelset, ((*__set &= ~__mask), 0), )
-#undef __SIGSETFN
+# undef __SIGSETFN
+#endif
#endif /* ! _SIGSET_H_fns. */
__const char *__restrict __format,
_G_va_list __arg));
-#if defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__
+#ifdef __USE_EXTERN_INLINES
__STDIO_INLINE int
vprintf (__const char *__restrict __fmt, _G_va_list __arg)
{
return vfprintf (stdout, __fmt, __arg);
}
-#endif /* Optimizing. */
+#endif /* Use extern inlines. */
#if defined __USE_BSD || defined __USE_ISOC9X || defined __USE_UNIX98
/* Maximum chars of output to write in MAXLEN. */
optimization for it. */
#define getc(_fp) _IO_getc (_fp)
-#if defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__
+#ifdef __USE_EXTERN_INLINES
__STDIO_INLINE int
getchar (void)
{
return _IO_getc (stdin);
}
-#endif /* Optimizing. */
+#endif /* Use extern inlines. */
#if defined __USE_POSIX || defined __USE_MISC
/* These are defined in POSIX.1:1996. */
extern int getc_unlocked __P ((FILE *__stream));
extern int getchar_unlocked __P ((void));
-# ifdef __OPTIMIZE__
+# ifdef __USE_EXTERN_INLINES
__STDIO_INLINE int
getc_unlocked (FILE *__fp)
{
{
return _IO_getc_unlocked (stdin);
}
-# endif /* Optimizing. */
+# endif /* Use extern inlines. */
#endif /* Use POSIX or MISC. */
so we always do the optimization for it. */
#define putc(_ch, _fp) _IO_putc (_ch, _fp)
-#if defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__
+#ifdef __USE_EXTERN_INLINES
__STDIO_INLINE int
putchar (int __c)
{
return _IO_putc (__c, stdout);
}
-#endif
+#endif /* Use extern inlines. */
#ifdef __USE_MISC
/* Faster version when locking is not necessary. */
extern int fputc_unlocked __P ((int __c, FILE *__stream));
-# ifdef __OPTIMIZE__
+# ifdef __USE_EXTERN_INLINES
__STDIO_INLINE int
fputc_unlocked (int __c, FILE *__stream)
{
return _IO_putc_unlocked (__c, __stream);
}
-# endif /* Optimizing. */
+# endif /* Use extern inlines. */
#endif /* Use MISC. */
#if defined __USE_POSIX || defined __USE_MISC
extern int putc_unlocked __P ((int __c, FILE *__stream));
extern int putchar_unlocked __P ((int __c));
-# ifdef __OPTIMIZE__
+# ifdef __USE_EXTERN_INLINES
__STDIO_INLINE int
putc_unlocked (int __c, FILE *__stream)
{
{
return _IO_putc_unlocked (__c, stdout);
}
-# endif /* Optimizing. */
+# endif /* Use extern inlines. */
#endif /* Use POSIX or MISC. */
extern _IO_ssize_t getline __P ((char **__lineptr, size_t *__n,
FILE *__stream));
-# if defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__
+# ifdef __USE_EXTERN_INLINES
__STDIO_INLINE _IO_ssize_t
getline (char **__lineptr, size_t *__n, FILE *__stream)
{
return __getdelim (__lineptr, __n, '\n', __stream);
}
-# endif /* Optimizing. */
+# endif /* Use extern inlines. */
#endif
extern int feof_unlocked __P ((FILE *__stream));
extern int ferror_unlocked __P ((FILE *__stream));
-# ifdef __OPTIMIZE__
+# ifdef __USE_EXTERN_INLINES
__STDIO_INLINE int
feof_unlocked (FILE *__stream)
{
{
return _IO_ferror_unlocked (__stream);
}
-# endif /* Optimizing. */
+# endif /* Use extern inlines. */
#endif
/* Get machine-dependent inline versions (if there are any). */
-#ifdef __OPTIMIZE__
+#ifdef __USE_EXTERN_INLINES
# include <bits/mathinline.h>
#endif
if (yp_get_default_domain (&domain) != YPERR_SUCCESS)
{
ent->nis = 0;
+ *errnop = ENOENT;
return NSS_STATUS_NOTFOUND;
}
!= YPERR_SUCCESS)
{
ent->nis = 0;
+ *errnop = ENOENT;
return NSS_STATUS_NOTFOUND;
}
if (yp_match (domain, "group.byname", name, strlen (name),
&outval, &outvallen) != YPERR_SUCCESS)
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
if (buflen < ((size_t) outvallen + 1))
{
buffer[buflen - 1] = '\xff';
p = fgets (buffer, buflen, ent->stream);
if (p == NULL && feof (ent->stream))
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
if (p == NULL || buffer[buflen - 1] != '\xff')
{
fsetpos (ent->stream, &pos);
buffer[buflen - 1] = '\xff';
p = fgets (buffer, buflen, ent->stream);
if (p == NULL && feof (ent->stream))
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
if (p == NULL || buffer[buflen - 1] != '\xff')
{
fsetpos (ent->stream, &pos);
if (result->gr_name[0] == '-' && result->gr_name[1] != '\0')
{
if (strcmp (&result->gr_name[1], name) == 0)
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
else
continue;
}
buffer[buflen - 1] = '\xff';
p = fgets (buffer, buflen, ent->stream);
if (p == NULL && feof (ent->stream))
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
if (p == NULL || buffer[buflen - 1] != '\xff')
{
fsetpos (ent->stream, &pos);
&outval, &outvallen) != YPERR_SUCCESS)
{
ent->nis = 0;
+ *errnop = ENOENT;
return NSS_STATUS_UNAVAIL;
}
!= YPERR_SUCCESS)
{
ent->nis = 0;
+ *errnop = ENOENT;
return NSS_STATUS_NOTFOUND;
}
int outvallen;
if (yp_get_default_domain (&domain) != YPERR_SUCCESS)
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
if (yp_match (domain, "group.byname", name, strlen (name),
&outval, &outvallen) != YPERR_SUCCESS)
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
if (buflen < ((size_t) outvallen + 1))
{
buffer[buflen - 1] = '\xff';
p = fgets (buffer, buflen, ent->stream);
if (p == NULL && feof (ent->stream))
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
if (p == NULL || buffer[buflen - 1] != '\xff')
{
fsetpos (ent->stream, &pos);
{
ent->nis = 0;
give_pwd_free (&ent->pwd);
+ *errnop = ENOENT;
return NSS_STATUS_NOTFOUND;
}
if (yp_match (domain, "passwd.byname", name, strlen (name),
&outval, &outvallen) != YPERR_SUCCESS)
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
if (buflen < ((size_t) outvallen + 1))
{
buffer[buflen - 1] = '\xff';
p = fgets (buffer, buflen, ent->stream);
if (p == NULL && feof (ent->stream))
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
if (p == NULL || buffer[buflen - 1] != '\xff')
{
fsetpos (ent->stream, &pos);
if (status == NSS_STATUS_RETURN)
continue;
else
- return status;
+ {
+ if (status == NSS_STATUS_NOTFOUND)
+ *errnop = ENOENT;
+ return status;
+ }
}
/* -user */
buffer[buflen - 1] = '\xff';
p = fgets (buffer, buflen, ent->stream);
if (p == NULL && feof (ent->stream))
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
if (p == NULL || buffer[buflen - 1] != '\xff')
{
fsetpos (ent->stream, &pos);
&& result->pw_name[1] != '@')
{
if (strcmp (&result->pw_name[1], name) == 0)
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
else
continue;
}
enum nss_status status;
if (name[0] == '-' || name[0] == '+')
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
__libc_lock_lock (lock);
{
ent->nis = 0;
give_spwd_free (&ent->pwd);
+ *errnop = ENOENT;
return NSS_STATUS_NOTFOUND;
}
int outvallen;
if (yp_get_default_domain (&domain) != YPERR_SUCCESS)
- return NSS_STATUS_NOTFOUND;
-
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
if (yp_match (domain, "shadow.byname", name, strlen (name),
&outval, &outvallen) != YPERR_SUCCESS)
- return NSS_STATUS_NOTFOUND;
-
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
if (buflen < ((size_t) outvallen + 1))
{
free (outval);
buffer[buflen - 1] = '\xff';
p = fgets (buffer, buflen, ent->stream);
if (p == NULL && feof (ent->stream))
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
if (p == NULL || buffer[buflen - 1] != '\xff')
{
fsetpos (ent->stream, &pos);
buffer[buflen - 1] = '\xff';
p = fgets (buffer, buflen, ent->stream);
if (p == NULL && feof (ent->stream))
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
if (p == NULL || buffer[buflen - 1] != '\xff')
{
fsetpos (ent->stream, &pos);
{
if (user != NULL && user[0] != '-')
if (strcmp (user, name) == 0)
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
}
__internal_endnetgrent (&netgrdata);
continue;
&result, &len));
if (retval != NSS_STATUS_SUCCESS)
{
- if (retval == NSS_STATUS_TRYAGAIN)
+ if (retval == NSS_STATUS_NOTFOUND)
+ *errnop = ENOENT;
+ else if (retval == NSS_STATUS_TRYAGAIN)
*errnop = errno;
return retval;
}
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996.
char *p;
if (next == NULL)
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
p = strncpy (buffer, next->val, buflen);
while (isspace (*p))
if (retval != NSS_STATUS_SUCCESS)
{
- if (retval == NSS_STATUS_TRYAGAIN)
+ if (retval == NSS_STATUS_NOTFOUND)
+ *errnop = ENOENT;
+ else if (retval == NSS_STATUS_TRYAGAIN)
*errnop = errno;
return retval;
}
if (parse_res == -1)
return NSS_STATUS_TRYAGAIN;
else
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
}
return NSS_STATUS_SUCCESS;
}
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996.
if (retval != NSS_STATUS_SUCCESS)
{
- if (retval == NSS_STATUS_TRYAGAIN)
+ if (retval == NSS_STATUS_NOTFOUND)
+ *errnop = ENOENT;
+ else if (retval == NSS_STATUS_TRYAGAIN)
*errnop = errno;
return retval;
}
if (retval != NSS_STATUS_SUCCESS)
{
- if (retval == NSS_STATUS_TRYAGAIN)
+ if (retval == NSS_STATUS_NOTFOUND)
+ *errnop = EAGAIN;
+ else if (retval == NSS_STATUS_TRYAGAIN)
*errnop = errno;
return retval;
}
if (parse_res == -1)
return NSS_STATUS_TRYAGAIN;
else
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = EAGAIN;
+ return NSS_STATUS_NOTFOUND;
+ }
}
return NSS_STATUS_SUCCESS;
}
if (retval != NSS_STATUS_SUCCESS)
{
- if (retval == NSS_STATUS_TRYAGAIN)
+ if (retval == NSS_STATUS_NOTFOUND)
+ *errnop = ENOENT;
+ else if (retval == NSS_STATUS_TRYAGAIN)
*errnop = errno;
return retval;
}
if (parse_res == -1)
return NSS_STATUS_TRYAGAIN;
else
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
}
return NSS_STATUS_SUCCESS;
}
*h_errnop = TRY_AGAIN;
break;
case NSS_STATUS_NOTFOUND:
+ *errnop = ENOENT;
*h_errnop = HOST_NOT_FOUND;
break;
default:
do
{
if (intern->next == NULL)
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
p = strncpy (buffer, intern->next->val, buflen);
while (isspace (*p))
++p;
if (retval != NSS_STATUS_SUCCESS)
{
- if (retval == NSS_STATUS_TRYAGAIN)
+ if (retval == NSS_STATUS_NOTFOUND)
+ *errnop = ENOENT;
+ else if (retval == NSS_STATUS_TRYAGAIN)
{
*herrnop = NETDB_INTERNAL;
*errnop = errno;
if (retval != NSS_STATUS_SUCCESS)
{
- if (retval == NSS_STATUS_TRYAGAIN)
+ if (retval == NSS_STATUS_NOTFOUND)
+ *errnop = ENOENT;
+ else if (retval == NSS_STATUS_TRYAGAIN)
{
*errnop = errno;
*herrnop = NETDB_INTERNAL;
if (parse_res == -1)
return NSS_STATUS_TRYAGAIN;
else
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
}
else
return NSS_STATUS_SUCCESS;
continue;
}
else
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
}
else
{
if (parse_res == -1)
return NSS_STATUS_TRYAGAIN;
else
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
}
else
return NSS_STATUS_SUCCESS;
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996.
char *p;
if (next == NULL)
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
p = strncpy (buffer, next->val, buflen);
while (isspace (*p))
if (retval != NSS_STATUS_SUCCESS)
{
- if (retval == NSS_STATUS_TRYAGAIN)
+ if (retval == NSS_STATUS_NOTFOUND)
+ *errnop = ENOENT;
+ else if (retval == NSS_STATUS_TRYAGAIN)
*errnop = errno;
return retval;
}
if (parse_res == -1)
return NSS_STATUS_TRYAGAIN;
else
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
}
return NSS_STATUS_SUCCESS;
}
if (retval != NSS_STATUS_SUCCESS)
{
- if (retval == NSS_STATUS_TRYAGAIN)
+ if (retval == NSS_STATUS_NOTFOUND)
+ *errnop = ENOENT;
+ else if (retval == NSS_STATUS_TRYAGAIN)
*errnop = errno;
return retval;
}
if (parse_res == -1)
return NSS_STATUS_TRYAGAIN;
else
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
}
return NSS_STATUS_SUCCESS;
}
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996.
#include "nss-nis.h"
-/* If we haven't found the entry, we give a SUCCESS and an empty key back. */
+/* If we haven't found the entry, we give a SUCCESS and an empty key back.
+ Solaris docu says: sizeof (pkey) == HEXKEYBYTES + 1.
+*/
enum nss_status
_nss_nis_getpublickey (const char *netname, char *pkey, int *errnop)
{
if (retval != NSS_STATUS_SUCCESS)
{
- if (retval == NSS_STATUS_TRYAGAIN)
+ if (retval == NSS_STATUS_NOTFOUND)
+ *errnop = ENOENT;
+ else if (retval == NSS_STATUS_TRYAGAIN)
*errnop = errno;
return retval;
}
char *p = strchr (result, ':');
if (p != NULL)
*p = 0;
- strcpy (pkey, result);
+ strncpy (pkey, result, HEXKEYBYTES + 1);
+ pkey[HEXKEYBYTES] = '\0';
}
return NSS_STATUS_SUCCESS;
}
int *errnop)
{
enum nss_status retval;
- char buf[1024];
+ char buf[2 * (HEXKEYBYTES + 1)];
char *domain, *result;
int len;
if (retval != NSS_STATUS_SUCCESS)
{
- if (retval == NSS_STATUS_TRYAGAIN)
+ if (retval == NSS_STATUS_NOTFOUND)
+ *errnop = ENOENT;
+ else if (retval == NSS_STATUS_TRYAGAIN)
*errnop = errno;
return retval;
}
if (p == NULL)
return NSS_STATUS_SUCCESS;
- p++;
- strcpy (buf, p);
+ ++p;
+ strncpy (buf, p, 2 * (HEXKEYBYTES + 1));
+ buf[2 * (HEXKEYBYTES + 1)] = '\0';
if (!xdecrypt (buf, passwd))
return NSS_STATUS_SUCCESS;
if (memcmp (buf, &(buf[HEXKEYBYTES]), KEYCHECKSUMSIZE) != 0)
return NSS_STATUS_SUCCESS;
- buf[HEXKEYBYTES] = 0;
+ buf[HEXKEYBYTES] = '\0';
strcpy (skey, buf);
}
return NSS_STATUS_SUCCESS;
if (retval != NSS_STATUS_SUCCESS)
{
- if (retval == NSS_STATUS_TRYAGAIN)
+ if (retval == NSS_STATUS_NOTFOUND)
+ *errnop = ENOENT;
+ else if (retval == NSS_STATUS_TRYAGAIN)
*errnop = errno;
return retval;
}
if (retval != NSS_STATUS_SUCCESS)
{
- if (retval == NSS_STATUS_TRYAGAIN)
+ if (retval == NSS_STATUS_NOTFOUND)
+ *errnop = ENOENT;
+ else if (retval == NSS_STATUS_TRYAGAIN)
*errnop = errno;
return retval;
}
if (parse_res == -1)
return NSS_STATUS_TRYAGAIN;
else
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
}
else
return NSS_STATUS_SUCCESS;
if (retval != NSS_STATUS_SUCCESS)
{
- if (retval == NSS_STATUS_TRYAGAIN)
+ if (retval == NSS_STATUS_NOTFOUND)
+ *errnop = ENOENT;
+ else if (retval == NSS_STATUS_TRYAGAIN)
*errnop = errno;
return retval;
}
{
if (parse_res == -1)
return NSS_STATUS_TRYAGAIN;
- else
- return NSS_STATUS_NOTFOUND;
+ else
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
}
else
return NSS_STATUS_SUCCESS;
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996.
do
{
if (data->next == NULL)
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
p = strncpy (buffer, data->next->val, buflen);
while (isspace (*p))
++p;
internal_nis_endrpcent (&data);
if (!found && status == NSS_STATUS_SUCCESS)
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
else
return status;
}
if (retval != NSS_STATUS_SUCCESS)
{
- if (retval == NSS_STATUS_TRYAGAIN)
+ if (retval == NSS_STATUS_NOTFOUND)
+ *errnop = ENOENT;
+ else if (retval == NSS_STATUS_TRYAGAIN)
*errnop = errno;
return retval;
}
if (parse_res == -1)
return NSS_STATUS_TRYAGAIN;
else
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
}
else
return NSS_STATUS_SUCCESS;
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996.
do
{
if (data->next == NULL)
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
p = strncpy (buffer, data->next->val, buflen);
while (isspace (*p))
++p;
internal_nis_endservent (&data);
if (!found && status == NSS_STATUS_SUCCESS)
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
else
return status;
}
internal_nis_endservent (&data);
if (!found && status == NSS_STATUS_SUCCESS)
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
else
return status;
}
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996.
if (retval != NSS_STATUS_SUCCESS)
{
- if (retval == NSS_STATUS_TRYAGAIN)
+ if (retval == NSS_STATUS_NOTFOUND)
+ *errnop = ENOENT;
+ else if (retval == NSS_STATUS_TRYAGAIN)
*errnop = errno;
return retval;
}
if (retval != NSS_STATUS_SUCCESS)
{
- if (retval == NSS_STATUS_TRYAGAIN)
+ if (retval == NSS_STATUS_NOTFOUND)
+ *errnop = ENOENT;
+ else if (retval == NSS_STATUS_TRYAGAIN)
*errnop = errno;
return retval;
}
if (parse_res == -1)
return NSS_STATUS_TRYAGAIN;
else
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
}
return NSS_STATUS_SUCCESS;
}
#ifndef __RPCSVC_YP_H__
#define __RPCSVC_YP_H__
+#include <features.h>
#include <rpc/rpc.h>
#define YPMAXRECORD 1024
YP_VERS = -8,
};
typedef enum ypstat ypstat;
-#ifdef __cplusplus
-extern "C" bool_t xdr_ypstat(XDR *, ypstat*);
-#elif __STDC__
-extern bool_t xdr_ypstat(XDR *, ypstat*);
-#else /* Old Style C */
-bool_t xdr_ypstat();
-#endif /* Old Style C */
-
enum ypxfrstat {
YPXFR_SUCC = 1,
YPXFR_REFUSED = -14,
};
typedef enum ypxfrstat ypxfrstat;
-#ifdef __cplusplus
-extern "C" bool_t xdr_ypxfrstat(XDR *, ypxfrstat*);
-#elif __STDC__
-extern bool_t xdr_ypxfrstat(XDR *, ypxfrstat*);
-#else /* Old Style C */
-bool_t xdr_ypxfrstat();
-#endif /* Old Style C */
-
typedef char *domainname;
-#ifdef __cplusplus
-extern "C" bool_t xdr_domainname(XDR *, domainname*);
-#elif __STDC__
-extern bool_t xdr_domainname(XDR *, domainname*);
-#else /* Old Style C */
-bool_t xdr_domainname();
-#endif /* Old Style C */
-
-
typedef char *mapname;
-#ifdef __cplusplus
-extern "C" bool_t xdr_mapname(XDR *, mapname*);
-#elif __STDC__
-extern bool_t xdr_mapname(XDR *, mapname*);
-#else /* Old Style C */
-bool_t xdr_mapname();
-#endif /* Old Style C */
-
-
typedef char *peername;
-#ifdef __cplusplus
-extern "C" bool_t xdr_peername(XDR *, peername*);
-#elif __STDC__
-extern bool_t xdr_peername(XDR *, peername*);
-#else /* Old Style C */
-bool_t xdr_peername();
-#endif /* Old Style C */
-
typedef struct {
- u_int keydat_len;
- char *keydat_val;
+ u_int keydat_len;
+ char *keydat_val;
} keydat;
-#ifdef __cplusplus
-extern "C" bool_t xdr_keydat(XDR *, keydat*);
-#elif __STDC__
-extern bool_t xdr_keydat(XDR *, keydat*);
-#else /* Old Style C */
-bool_t xdr_keydat();
-#endif /* Old Style C */
-
typedef struct {
- u_int valdat_len;
- char *valdat_val;
+ u_int valdat_len;
+ char *valdat_val;
} valdat;
-#ifdef __cplusplus
-extern "C" bool_t xdr_valdat(XDR *, valdat*);
-#elif __STDC__
-extern bool_t xdr_valdat(XDR *, valdat*);
-#else /* Old Style C */
-bool_t xdr_valdat();
-#endif /* Old Style C */
-
struct ypmap_parms {
- domainname domain;
- mapname map;
- u_int ordernum;
- peername peer;
+ domainname domain;
+ mapname map;
+ u_int ordernum;
+ peername peer;
};
typedef struct ypmap_parms ypmap_parms;
-#ifdef __cplusplus
-extern "C" bool_t xdr_ypmap_parms(XDR *, ypmap_parms*);
-#elif __STDC__
-extern bool_t xdr_ypmap_parms(XDR *, ypmap_parms*);
-#else /* Old Style C */
-bool_t xdr_ypmap_parms();
-#endif /* Old Style C */
-
struct ypreq_key {
- domainname domain;
- mapname map;
- keydat key;
+ domainname domain;
+ mapname map;
+ keydat key;
};
typedef struct ypreq_key ypreq_key;
-#ifdef __cplusplus
-extern "C" bool_t xdr_ypreq_key(XDR *, ypreq_key*);
-#elif __STDC__
-extern bool_t xdr_ypreq_key(XDR *, ypreq_key*);
-#else /* Old Style C */
-bool_t xdr_ypreq_key();
-#endif /* Old Style C */
-
struct ypreq_nokey {
- domainname domain;
- mapname map;
+ domainname domain;
+ mapname map;
};
typedef struct ypreq_nokey ypreq_nokey;
-#ifdef __cplusplus
-extern "C" bool_t xdr_ypreq_nokey(XDR *, ypreq_nokey*);
-#elif __STDC__
-extern bool_t xdr_ypreq_nokey(XDR *, ypreq_nokey*);
-#else /* Old Style C */
-bool_t xdr_ypreq_nokey();
-#endif /* Old Style C */
-
struct ypreq_xfr {
- ypmap_parms map_parms;
- u_int transid;
- u_int prog;
- u_int port;
+ ypmap_parms map_parms;
+ u_int transid;
+ u_int prog;
+ u_int port;
};
typedef struct ypreq_xfr ypreq_xfr;
-#ifdef __cplusplus
-extern "C" bool_t xdr_ypreq_xfr(XDR *, ypreq_xfr*);
-#elif __STDC__
-extern bool_t xdr_ypreq_xfr(XDR *, ypreq_xfr*);
-#else /* Old Style C */
-bool_t xdr_ypreq_xfr();
-#endif /* Old Style C */
-
struct ypresp_val {
- ypstat stat;
- valdat val;
+ ypstat stat;
+ valdat val;
};
typedef struct ypresp_val ypresp_val;
-#ifdef __cplusplus
-extern "C" bool_t xdr_ypresp_val(XDR *, ypresp_val*);
-#elif __STDC__
-extern bool_t xdr_ypresp_val(XDR *, ypresp_val*);
-#else /* Old Style C */
-bool_t xdr_ypresp_val();
-#endif /* Old Style C */
-
struct ypresp_key_val {
- ypstat stat;
+ ypstat stat;
#ifdef STUPID_SUN_BUG
- /* This is the form as distributed by Sun. But even the Sun NIS
- servers expect the values in the other order. So their
- implementation somehow must change the order internally. We
- don't want to follow this bad example since the user should be
- able to use rpcgen on this file. */
- keydat key;
- valdat val;
+ /* This is the form as distributed by Sun. But even the Sun NIS
+ servers expect the values in the other order. So their
+ implementation somehow must change the order internally. We
+ don't want to follow this bad example since the user should be
+ able to use rpcgen on this file. */
+ keydat key;
+ valdat val;
#else
- valdat val;
- keydat key;
+ valdat val;
+ keydat key;
#endif
};
typedef struct ypresp_key_val ypresp_key_val;
-#ifdef __cplusplus
-extern "C" bool_t xdr_ypresp_key_val(XDR *, ypresp_key_val*);
-#elif __STDC__
-extern bool_t xdr_ypresp_key_val(XDR *, ypresp_key_val*);
-#else /* Old Style C */
-bool_t xdr_ypresp_key_val();
-#endif /* Old Style C */
-
struct ypresp_master {
- ypstat stat;
- peername peer;
+ ypstat stat;
+ peername peer;
};
typedef struct ypresp_master ypresp_master;
-#ifdef __cplusplus
-extern "C" bool_t xdr_ypresp_master(XDR *, ypresp_master*);
-#elif __STDC__
-extern bool_t xdr_ypresp_master(XDR *, ypresp_master*);
-#else /* Old Style C */
-bool_t xdr_ypresp_master();
-#endif /* Old Style C */
-
struct ypresp_order {
- ypstat stat;
- u_int ordernum;
+ ypstat stat;
+ u_int ordernum;
};
typedef struct ypresp_order ypresp_order;
-#ifdef __cplusplus
-extern "C" bool_t xdr_ypresp_order(XDR *, ypresp_order*);
-#elif __STDC__
-extern bool_t xdr_ypresp_order(XDR *, ypresp_order*);
-#else /* Old Style C */
-bool_t xdr_ypresp_order();
-#endif /* Old Style C */
-
struct ypresp_all {
- bool_t more;
- union {
- ypresp_key_val val;
- } ypresp_all_u;
+ bool_t more;
+ union {
+ ypresp_key_val val;
+ } ypresp_all_u;
};
typedef struct ypresp_all ypresp_all;
-#ifdef __cplusplus
-extern "C" bool_t xdr_ypresp_all(XDR *, ypresp_all*);
-#elif __STDC__
-extern bool_t xdr_ypresp_all(XDR *, ypresp_all*);
-#else /* Old Style C */
-bool_t xdr_ypresp_all();
-#endif /* Old Style C */
-
struct ypresp_xfr {
- u_int transid;
- ypxfrstat xfrstat;
+ u_int transid;
+ ypxfrstat xfrstat;
};
typedef struct ypresp_xfr ypresp_xfr;
-#ifdef __cplusplus
-extern "C" bool_t xdr_ypresp_xfr(XDR *, ypresp_xfr*);
-#elif __STDC__
-extern bool_t xdr_ypresp_xfr(XDR *, ypresp_xfr*);
-#else /* Old Style C */
-bool_t xdr_ypresp_xfr();
-#endif /* Old Style C */
-
struct ypmaplist {
- mapname map;
- struct ypmaplist *next;
+ mapname map;
+ struct ypmaplist *next;
};
typedef struct ypmaplist ypmaplist;
-#ifdef __cplusplus
-extern "C" bool_t xdr_ypmaplist(XDR *, ypmaplist*);
-#elif __STDC__
-extern bool_t xdr_ypmaplist(XDR *, ypmaplist*);
-#else /* Old Style C */
-bool_t xdr_ypmaplist();
-#endif /* Old Style C */
-
struct ypresp_maplist {
- ypstat stat;
- ypmaplist *maps;
+ ypstat stat;
+ ypmaplist *maps;
};
typedef struct ypresp_maplist ypresp_maplist;
-#ifdef __cplusplus
-extern "C" bool_t xdr_ypresp_maplist(XDR *, ypresp_maplist*);
-#elif __STDC__
-extern bool_t xdr_ypresp_maplist(XDR *, ypresp_maplist*);
-#else /* Old Style C */
-bool_t xdr_ypresp_maplist();
-#endif /* Old Style C */
-
enum yppush_status {
- YPPUSH_SUCC = 1,
- YPPUSH_AGE = 2,
- YPPUSH_NOMAP = -1,
- YPPUSH_NODOM = -2,
- YPPUSH_RSRC = -3,
- YPPUSH_RPC = -4,
- YPPUSH_MADDR = -5,
- YPPUSH_YPERR = -6,
- YPPUSH_BADARGS = -7,
- YPPUSH_DBM = -8,
- YPPUSH_FILE = -9,
- YPPUSH_SKEW = -10,
- YPPUSH_CLEAR = -11,
- YPPUSH_FORCE = -12,
- YPPUSH_XFRERR = -13,
- YPPUSH_REFUSED = -14,
+ YPPUSH_SUCC = 1,
+ YPPUSH_AGE = 2,
+ YPPUSH_NOMAP = -1,
+ YPPUSH_NODOM = -2,
+ YPPUSH_RSRC = -3,
+ YPPUSH_RPC = -4,
+ YPPUSH_MADDR = -5,
+ YPPUSH_YPERR = -6,
+ YPPUSH_BADARGS = -7,
+ YPPUSH_DBM = -8,
+ YPPUSH_FILE = -9,
+ YPPUSH_SKEW = -10,
+ YPPUSH_CLEAR = -11,
+ YPPUSH_FORCE = -12,
+ YPPUSH_XFRERR = -13,
+ YPPUSH_REFUSED = -14,
};
typedef enum yppush_status yppush_status;
-#ifdef __cplusplus
-extern "C" bool_t xdr_yppush_status(XDR *, yppush_status*);
-#elif __STDC__
-extern bool_t xdr_yppush_status(XDR *, yppush_status*);
-#else /* Old Style C */
-bool_t xdr_yppush_status();
-#endif /* Old Style C */
-
struct yppushresp_xfr {
- u_int transid;
- yppush_status status;
+ u_int transid;
+ yppush_status status;
};
typedef struct yppushresp_xfr yppushresp_xfr;
-#ifdef __cplusplus
-extern "C" bool_t xdr_yppushresp_xfr(XDR *, yppushresp_xfr*);
-#elif __STDC__
-extern bool_t xdr_yppushresp_xfr(XDR *, yppushresp_xfr*);
-#else /* Old Style C */
-bool_t xdr_yppushresp_xfr();
-#endif /* Old Style C */
-
enum ypbind_resptype {
- YPBIND_SUCC_VAL = 1,
- YPBIND_FAIL_VAL = 2,
+ YPBIND_SUCC_VAL = 1,
+ YPBIND_FAIL_VAL = 2,
};
typedef enum ypbind_resptype ypbind_resptype;
-#ifdef __cplusplus
-extern "C" bool_t xdr_ypbind_resptype(XDR *, ypbind_resptype*);
-#elif __STDC__
-extern bool_t xdr_ypbind_resptype(XDR *, ypbind_resptype*);
-#else /* Old Style C */
-bool_t xdr_ypbind_resptype();
-#endif /* Old Style C */
-
struct ypbind_binding {
- char ypbind_binding_addr[4];
- char ypbind_binding_port[2];
+ char ypbind_binding_addr[4];
+ char ypbind_binding_port[2];
};
typedef struct ypbind_binding ypbind_binding;
-#ifdef __cplusplus
-extern "C" bool_t xdr_ypbind_binding(XDR *, ypbind_binding*);
-#elif __STDC__
-extern bool_t xdr_ypbind_binding(XDR *, ypbind_binding*);
-#else /* Old Style C */
-bool_t xdr_ypbind_binding();
-#endif /* Old Style C */
-
struct ypbind_resp {
- ypbind_resptype ypbind_status;
- union {
- u_int ypbind_error;
- ypbind_binding ypbind_bindinfo;
- } ypbind_resp_u;
+ ypbind_resptype ypbind_status;
+ union {
+ u_int ypbind_error;
+ ypbind_binding ypbind_bindinfo;
+ } ypbind_resp_u;
};
typedef struct ypbind_resp ypbind_resp;
-#ifdef __cplusplus
-extern "C" bool_t xdr_ypbind_resp(XDR *, ypbind_resp*);
-#elif __STDC__
-extern bool_t xdr_ypbind_resp(XDR *, ypbind_resp*);
-#else /* Old Style C */
-bool_t xdr_ypbind_resp();
-#endif /* Old Style C */
#define YPBIND_ERR_ERR 1
#define YPBIND_ERR_NOSERV 2
#define YPBIND_ERR_RESC 3
struct ypbind_setdom {
- domainname ypsetdom_domain;
- ypbind_binding ypsetdom_binding;
- u_int ypsetdom_vers;
+ domainname ypsetdom_domain;
+ ypbind_binding ypsetdom_binding;
+ u_int ypsetdom_vers;
};
typedef struct ypbind_setdom ypbind_setdom;
-#ifdef __cplusplus
-extern "C" bool_t xdr_ypbind_setdom(XDR *, ypbind_setdom*);
-#elif __STDC__
-extern bool_t xdr_ypbind_setdom(XDR *, ypbind_setdom*);
-#else /* Old Style C */
-bool_t xdr_ypbind_setdom();
-#endif /* Old Style C */
+__BEGIN_DECLS
#define YPPROG ((u_long)100004)
#define YPVERS ((u_long)2)
-#ifdef __cplusplus
#define YPPROC_NULL ((u_long)0)
-extern "C" void * ypproc_null_2(void *, CLIENT *);
-extern "C" void * ypproc_null_2_svc(void *, struct svc_req *);
+extern void *ypproc_null_2 __P ((void *, CLIENT *));
+extern void *ypproc_null_2_svc __P ((void *, struct svc_req *));
#define YPPROC_DOMAIN ((u_long)1)
-extern "C" bool_t * ypproc_domain_2(domainname *, CLIENT *);
-extern "C" bool_t * ypproc_domain_2_svc(domainname *, struct svc_req *);
+extern bool_t *ypproc_domain_2 __P ((domainname *, CLIENT *));
+extern bool_t *ypproc_domain_2_svc __P ((domainname *, struct svc_req *));
#define YPPROC_DOMAIN_NONACK ((u_long)2)
-extern "C" bool_t * ypproc_domain_nonack_2(domainname *, CLIENT *);
-extern "C" bool_t * ypproc_domain_nonack_2_svc(domainname *, struct svc_req *);
+extern bool_t *ypproc_domain_nonack_2 __P ((domainname *, CLIENT *));
+extern bool_t *ypproc_domain_nonack_2_svc __P ((domainname *, struct svc_req *));
#define YPPROC_MATCH ((u_long)3)
-extern "C" ypresp_val * ypproc_match_2(ypreq_key *, CLIENT *);
-extern "C" ypresp_val * ypproc_match_2_svc(ypreq_key *, struct svc_req *);
+extern ypresp_val *ypproc_match_2 __P ((ypreq_key *, CLIENT *));
+extern ypresp_val *ypproc_match_2_svc __P ((ypreq_key *, struct svc_req *));
#define YPPROC_FIRST ((u_long)4)
-extern "C" ypresp_key_val * ypproc_first_2(ypreq_key *, CLIENT *);
-extern "C" ypresp_key_val * ypproc_first_2_svc(ypreq_key *, struct svc_req *);
+extern ypresp_key_val *ypproc_first_2 __P ((ypreq_key *, CLIENT *));
+extern ypresp_key_val *ypproc_first_2_svc __P ((ypreq_key *, struct svc_req *));
#define YPPROC_NEXT ((u_long)5)
-extern "C" ypresp_key_val * ypproc_next_2(ypreq_key *, CLIENT *);
-extern "C" ypresp_key_val * ypproc_next_2_svc(ypreq_key *, struct svc_req *);
+extern ypresp_key_val *ypproc_next_2 __P ((ypreq_key *, CLIENT *));
+extern ypresp_key_val *ypproc_next_2_svc __P ((ypreq_key *, struct svc_req *));
#define YPPROC_XFR ((u_long)6)
-extern "C" ypresp_xfr * ypproc_xfr_2(ypreq_xfr *, CLIENT *);
-extern "C" ypresp_xfr * ypproc_xfr_2_svc(ypreq_xfr *, struct svc_req *);
+extern ypresp_xfr *ypproc_xfr_2 __P ((ypreq_xfr *, CLIENT *));
+extern ypresp_xfr *ypproc_xfr_2_svc __P ((ypreq_xfr *, struct svc_req *));
#define YPPROC_CLEAR ((u_long)7)
-extern "C" void * ypproc_clear_2(void *, CLIENT *);
-extern "C" void * ypproc_clear_2_svc(void *, struct svc_req *);
+extern void *ypproc_clear_2 __P ((void *, CLIENT *));
+extern void *ypproc_clear_2_svc __P ((void *, struct svc_req *));
#define YPPROC_ALL ((u_long)8)
-extern "C" ypresp_all * ypproc_all_2(ypreq_nokey *, CLIENT *);
-extern "C" ypresp_all * ypproc_all_2_svc(ypreq_nokey *, struct svc_req *);
+extern ypresp_all *ypproc_all_2 __P ((ypreq_nokey *, CLIENT *));
+extern ypresp_all *ypproc_all_2_svc __P ((ypreq_nokey *, struct svc_req *));
#define YPPROC_MASTER ((u_long)9)
-extern "C" ypresp_master * ypproc_master_2(ypreq_nokey *, CLIENT *);
-extern "C" ypresp_master * ypproc_master_2_svc(ypreq_nokey *, struct svc_req *);
+extern ypresp_master *ypproc_master_2 __P ((ypreq_nokey *, CLIENT *));
+extern ypresp_master *ypproc_master_2_svc __P ((ypreq_nokey *, struct svc_req *));
#define YPPROC_ORDER ((u_long)10)
-extern "C" ypresp_order * ypproc_order_2(ypreq_nokey *, CLIENT *);
-extern "C" ypresp_order * ypproc_order_2_svc(ypreq_nokey *, struct svc_req *);
+extern ypresp_order *ypproc_order_2 __P ((ypreq_nokey *, CLIENT *));
+extern ypresp_order *ypproc_order_2_svc __P ((ypreq_nokey *, struct svc_req *));
#define YPPROC_MAPLIST ((u_long)11)
-extern "C" ypresp_maplist * ypproc_maplist_2(domainname *, CLIENT *);
-extern "C" ypresp_maplist * ypproc_maplist_2_svc(domainname *, struct svc_req *);
+extern ypresp_maplist *ypproc_maplist_2 __P ((domainname *, CLIENT *));
+extern ypresp_maplist *ypproc_maplist_2_svc __P ((domainname *, struct svc_req *));
+extern int ypprog_2_freeresult __P ((SVCXPRT *, xdrproc_t, caddr_t));
-#elif __STDC__
-#define YPPROC_NULL ((u_long)0)
-extern void * ypproc_null_2(void *, CLIENT *);
-extern void * ypproc_null_2_svc(void *, struct svc_req *);
-#define YPPROC_DOMAIN ((u_long)1)
-extern bool_t * ypproc_domain_2(domainname *, CLIENT *);
-extern bool_t * ypproc_domain_2_svc(domainname *, struct svc_req *);
-#define YPPROC_DOMAIN_NONACK ((u_long)2)
-extern bool_t * ypproc_domain_nonack_2(domainname *, CLIENT *);
-extern bool_t * ypproc_domain_nonack_2_svc(domainname *, struct svc_req *);
-#define YPPROC_MATCH ((u_long)3)
-extern ypresp_val * ypproc_match_2(ypreq_key *, CLIENT *);
-extern ypresp_val * ypproc_match_2_svc(ypreq_key *, struct svc_req *);
-#define YPPROC_FIRST ((u_long)4)
-extern ypresp_key_val * ypproc_first_2(ypreq_key *, CLIENT *);
-extern ypresp_key_val * ypproc_first_2_svc(ypreq_key *, struct svc_req *);
-#define YPPROC_NEXT ((u_long)5)
-extern ypresp_key_val * ypproc_next_2(ypreq_key *, CLIENT *);
-extern ypresp_key_val * ypproc_next_2_svc(ypreq_key *, struct svc_req *);
-#define YPPROC_XFR ((u_long)6)
-extern ypresp_xfr * ypproc_xfr_2(ypreq_xfr *, CLIENT *);
-extern ypresp_xfr * ypproc_xfr_2_svc(ypreq_xfr *, struct svc_req *);
-#define YPPROC_CLEAR ((u_long)7)
-extern void * ypproc_clear_2(void *, CLIENT *);
-extern void * ypproc_clear_2_svc(void *, struct svc_req *);
-#define YPPROC_ALL ((u_long)8)
-extern ypresp_all * ypproc_all_2(ypreq_nokey *, CLIENT *);
-extern ypresp_all * ypproc_all_2_svc(ypreq_nokey *, struct svc_req *);
-#define YPPROC_MASTER ((u_long)9)
-extern ypresp_master * ypproc_master_2(ypreq_nokey *, CLIENT *);
-extern ypresp_master * ypproc_master_2_svc(ypreq_nokey *, struct svc_req *);
-#define YPPROC_ORDER ((u_long)10)
-extern ypresp_order * ypproc_order_2(ypreq_nokey *, CLIENT *);
-extern ypresp_order * ypproc_order_2_svc(ypreq_nokey *, struct svc_req *);
-#define YPPROC_MAPLIST ((u_long)11)
-extern ypresp_maplist * ypproc_maplist_2(domainname *, CLIENT *);
-extern ypresp_maplist * ypproc_maplist_2_svc(domainname *, struct svc_req *);
-
-#else /* Old Style C */
-#define YPPROC_NULL ((u_long)0)
-extern void * ypproc_null_2();
-extern void * ypproc_null_2_svc();
-#define YPPROC_DOMAIN ((u_long)1)
-extern bool_t * ypproc_domain_2();
-extern bool_t * ypproc_domain_2_svc();
-#define YPPROC_DOMAIN_NONACK ((u_long)2)
-extern bool_t * ypproc_domain_nonack_2();
-extern bool_t * ypproc_domain_nonack_2_svc();
-#define YPPROC_MATCH ((u_long)3)
-extern ypresp_val * ypproc_match_2();
-extern ypresp_val * ypproc_match_2_svc();
-#define YPPROC_FIRST ((u_long)4)
-extern ypresp_key_val * ypproc_first_2();
-extern ypresp_key_val * ypproc_first_2_svc();
-#define YPPROC_NEXT ((u_long)5)
-extern ypresp_key_val * ypproc_next_2();
-extern ypresp_key_val * ypproc_next_2_svc();
-#define YPPROC_XFR ((u_long)6)
-extern ypresp_xfr * ypproc_xfr_2();
-extern ypresp_xfr * ypproc_xfr_2_svc();
-#define YPPROC_CLEAR ((u_long)7)
-extern void * ypproc_clear_2();
-extern void * ypproc_clear_2_svc();
-#define YPPROC_ALL ((u_long)8)
-extern ypresp_all * ypproc_all_2();
-extern ypresp_all * ypproc_all_2_svc();
-#define YPPROC_MASTER ((u_long)9)
-extern ypresp_master * ypproc_master_2();
-extern ypresp_master * ypproc_master_2_svc();
-#define YPPROC_ORDER ((u_long)10)
-extern ypresp_order * ypproc_order_2();
-extern ypresp_order * ypproc_order_2_svc();
-#define YPPROC_MAPLIST ((u_long)11)
-extern ypresp_maplist * ypproc_maplist_2();
-extern ypresp_maplist * ypproc_maplist_2_svc();
-#endif /* Old Style C */
#define YPPUSH_XFRRESPPROG ((u_long)0x40000000)
#define YPPUSH_XFRRESPVERS ((u_long)1)
-#ifdef __cplusplus
-#define YPPUSHPROC_NULL ((u_long)0)
-extern "C" void * yppushproc_null_1(void *, CLIENT *);
-extern "C" void * yppushproc_null_1_svc(void *, struct svc_req *);
-#define YPPUSHPROC_XFRRESP ((u_long)1)
-extern "C" void * yppushproc_xfrresp_1(yppushresp_xfr *, CLIENT *);
-extern "C" void * yppushproc_xfrresp_1_svc(yppushresp_xfr *, struct svc_req *);
-
-#elif __STDC__
#define YPPUSHPROC_NULL ((u_long)0)
-extern void * yppushproc_null_1(void *, CLIENT *);
-extern void * yppushproc_null_1_svc(void *, struct svc_req *);
+extern void *yppushproc_null_1 __P ((void *, CLIENT *));
+extern void *yppushproc_null_1_svc __P ((void *, struct svc_req *));
#define YPPUSHPROC_XFRRESP ((u_long)1)
-extern void * yppushproc_xfrresp_1(yppushresp_xfr *, CLIENT *);
-extern void * yppushproc_xfrresp_1_svc(yppushresp_xfr *, struct svc_req *);
+extern void *yppushproc_xfrresp_1 __P ((yppushresp_xfr *, CLIENT *));
+extern void *yppushproc_xfrresp_1_svc __P ((yppushresp_xfr *, struct svc_req *));
+extern int yppush_xfrrespprog_1_freeresult __P ((SVCXPRT *, xdrproc_t, caddr_t));
-#else /* Old Style C */
-#define YPPUSHPROC_NULL ((u_long)0)
-extern void * yppushproc_null_1();
-extern void * yppushproc_null_1_svc();
-#define YPPUSHPROC_XFRRESP ((u_long)1)
-extern void * yppushproc_xfrresp_1();
-extern void * yppushproc_xfrresp_1_svc();
-#endif /* Old Style C */
#define YPBINDPROG ((u_long)100007)
#define YPBINDVERS ((u_long)2)
-#ifdef __cplusplus
-#define YPBINDPROC_NULL ((u_long)0)
-extern "C" void * ypbindproc_null_2(void *, CLIENT *);
-extern "C" void * ypbindproc_null_2_svc(void *, struct svc_req *);
-#define YPBINDPROC_DOMAIN ((u_long)1)
-extern "C" ypbind_resp * ypbindproc_domain_2(domainname *, CLIENT *);
-extern "C" ypbind_resp * ypbindproc_domain_2_svc(domainname *, struct svc_req *);
-#define YPBINDPROC_SETDOM ((u_long)2)
-extern "C" void * ypbindproc_setdom_2(ypbind_setdom *, CLIENT *);
-extern "C" void * ypbindproc_setdom_2_svc(ypbind_setdom *, struct svc_req *);
-
-#elif __STDC__
-#define YPBINDPROC_NULL ((u_long)0)
-extern void * ypbindproc_null_2(void *, CLIENT *);
-extern void * ypbindproc_null_2_svc(void *, struct svc_req *);
-#define YPBINDPROC_DOMAIN ((u_long)1)
-extern ypbind_resp * ypbindproc_domain_2(domainname *, CLIENT *);
-extern ypbind_resp * ypbindproc_domain_2_svc(domainname *, struct svc_req *);
-#define YPBINDPROC_SETDOM ((u_long)2)
-extern void * ypbindproc_setdom_2(ypbind_setdom *, CLIENT *);
-extern void * ypbindproc_setdom_2_svc(ypbind_setdom *, struct svc_req *);
-
-#else /* Old Style C */
#define YPBINDPROC_NULL ((u_long)0)
-extern void * ypbindproc_null_2();
-extern void * ypbindproc_null_2_svc();
+extern void *ypbindproc_null_2 __P ((void *, CLIENT *));
+extern void *ypbindproc_null_2_svc __P ((void *, struct svc_req *));
#define YPBINDPROC_DOMAIN ((u_long)1)
-extern ypbind_resp * ypbindproc_domain_2();
-extern ypbind_resp * ypbindproc_domain_2_svc();
+extern ypbind_resp *ypbindproc_domain_2 __P ((domainname *, CLIENT *));
+extern ypbind_resp *ypbindproc_domain_2_svc __P ((domainname *, struct svc_req *));
#define YPBINDPROC_SETDOM ((u_long)2)
-extern void * ypbindproc_setdom_2();
-extern void * ypbindproc_setdom_2_svc();
-#endif /* Old Style C */
+extern void *ypbindproc_setdom_2 __P ((ypbind_setdom *, CLIENT *));
+extern void *ypbindproc_setdom_2_svc __P ((ypbind_setdom *, struct svc_req *));
+extern int ypbindprog_2_freeresult __P ((SVCXPRT *, xdrproc_t, caddr_t));
+
+
+extern bool_t xdr_ypstat __P ((XDR *, ypstat*));
+extern bool_t xdr_ypxfrstat __P ((XDR *, ypxfrstat*));
+extern bool_t xdr_domainname __P ((XDR *, domainname*));
+extern bool_t xdr_mapname __P ((XDR *, mapname*));
+extern bool_t xdr_peername __P ((XDR *, peername*));
+extern bool_t xdr_keydat __P ((XDR *, keydat*));
+extern bool_t xdr_valdat __P ((XDR *, valdat*));
+extern bool_t xdr_ypmap_parms __P ((XDR *, ypmap_parms*));
+extern bool_t xdr_ypreq_key __P ((XDR *, ypreq_key*));
+extern bool_t xdr_ypreq_nokey __P ((XDR *, ypreq_nokey*));
+extern bool_t xdr_ypreq_xfr __P ((XDR *, ypreq_xfr*));
+extern bool_t xdr_ypresp_val __P ((XDR *, ypresp_val*));
+extern bool_t xdr_ypresp_key_val __P ((XDR *, ypresp_key_val*));
+extern bool_t xdr_ypresp_master __P ((XDR *, ypresp_master*));
+extern bool_t xdr_ypresp_order __P ((XDR *, ypresp_order*));
+extern bool_t xdr_ypresp_all __P ((XDR *, ypresp_all*));
+extern bool_t xdr_ypresp_xfr __P ((XDR *, ypresp_xfr*));
+extern bool_t xdr_ypmaplist __P ((XDR *, ypmaplist*));
+extern bool_t xdr_ypresp_maplist __P ((XDR *, ypresp_maplist*));
+extern bool_t xdr_yppush_status __P ((XDR *, yppush_status*));
+extern bool_t xdr_yppushresp_xfr __P ((XDR *, yppushresp_xfr*));
+extern bool_t xdr_ypbind_resptype __P ((XDR *, ypbind_resptype*));
+extern bool_t xdr_ypbind_binding __P ((XDR *, ypbind_binding*));
+extern bool_t xdr_ypbind_resp __P ((XDR *, ypbind_resp*));
+extern bool_t xdr_ypbind_setdom __P ((XDR *, ypbind_setdom*));
+
+__END_DECLS
#endif /* !__RPCSVC_YP_H__ */
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
bool_t
xdr_ypstat (XDR *xdrs, ypstat *objp)
{
- if (!xdr_enum(xdrs, (enum_t *)objp))
- return (FALSE);
- return (TRUE);
+ if (!xdr_enum (xdrs, (enum_t *) objp))
+ return FALSE;
+ return TRUE;
}
bool_t
-xdr_ypxfrstat(XDR *xdrs, ypxfrstat *objp)
+xdr_ypxfrstat (XDR *xdrs, ypxfrstat *objp)
{
- if (!xdr_enum(xdrs, (enum_t *)objp)) {
- return (FALSE);
- }
- return (TRUE);
+ if (!xdr_enum (xdrs, (enum_t *) objp))
+ return FALSE;
+ return TRUE;
}
bool_t
-xdr_domainname(XDR *xdrs, domainname *objp)
+xdr_domainname (XDR *xdrs, domainname *objp)
{
- if (!xdr_string(xdrs, objp, YPMAXDOMAIN)) {
- return (FALSE);
- }
- return (TRUE);
+ if (!xdr_string (xdrs, objp, ~0))
+ return FALSE;
+ return TRUE;
}
bool_t
-xdr_mapname(XDR *xdrs, mapname *objp)
+xdr_mapname (XDR *xdrs, mapname *objp)
{
- if (!xdr_string(xdrs, objp, YPMAXMAP)) {
- return (FALSE);
- }
- return (TRUE);
+ if (!xdr_string (xdrs, objp, ~0))
+ return FALSE;
+ return TRUE;
}
bool_t
-xdr_peername(XDR *xdrs, peername *objp)
+xdr_peername (XDR *xdrs, peername *objp)
{
- if (!xdr_string(xdrs, objp, YPMAXPEER)) {
- return (FALSE);
- }
- return (TRUE);
+ if (!xdr_string (xdrs, objp, ~0))
+ return FALSE;
+ return TRUE;
}
bool_t
-xdr_keydat(XDR *xdrs, keydat *objp)
+xdr_keydat (XDR *xdrs, keydat *objp)
{
- if (!xdr_bytes(xdrs, (char **)&objp->keydat_val, (u_int *)&objp->keydat_len, YPMAXRECORD)) {
- return (FALSE);
- }
- return (TRUE);
+ if (!xdr_bytes (xdrs, (char **) &objp->keydat_val,
+ (u_int *) &objp->keydat_len, ~0))
+ return FALSE;
+ return TRUE;
}
bool_t
-xdr_valdat(XDR *xdrs, valdat *objp)
+xdr_valdat (XDR *xdrs, valdat *objp)
{
- if (!xdr_bytes(xdrs, (char **)&objp->valdat_val, (u_int *)&objp->valdat_len, YPMAXRECORD)) {
- return (FALSE);
- }
- return (TRUE);
+ if (!xdr_bytes (xdrs, (char **) &objp->valdat_val,
+ (u_int *) &objp->valdat_len, ~0))
+ return FALSE;
+ return TRUE;
}
bool_t
-xdr_ypmap_parms(XDR *xdrs, ypmap_parms *objp)
+xdr_ypmap_parms (XDR *xdrs, ypmap_parms *objp)
{
- if (!xdr_domainname(xdrs, &objp->domain)) {
- return (FALSE);
- }
- if (!xdr_mapname(xdrs, &objp->map)) {
- return (FALSE);
- }
- if (!xdr_u_int(xdrs, &objp->ordernum)) {
- return (FALSE);
- }
- if (!xdr_peername(xdrs, &objp->peer)) {
- return (FALSE);
- }
- return (TRUE);
+ if (!xdr_domainname (xdrs, &objp->domain))
+ return FALSE;
+ if (!xdr_mapname (xdrs, &objp->map))
+ return FALSE;
+ if (!xdr_u_int (xdrs, &objp->ordernum))
+ return FALSE;
+ if (!xdr_peername (xdrs, &objp->peer))
+ return FALSE;
+ return TRUE;
}
bool_t
-xdr_ypreq_key(XDR *xdrs, ypreq_key *objp)
+xdr_ypreq_key (XDR *xdrs, ypreq_key *objp)
{
- if (!xdr_domainname(xdrs, &objp->domain)) {
- return (FALSE);
- }
- if (!xdr_mapname(xdrs, &objp->map)) {
- return (FALSE);
- }
- if (!xdr_keydat(xdrs, &objp->key)) {
- return (FALSE);
- }
- return (TRUE);
+ if (!xdr_domainname (xdrs, &objp->domain))
+ return FALSE;
+ if (!xdr_mapname (xdrs, &objp->map))
+ return FALSE;
+ if (!xdr_keydat (xdrs, &objp->key))
+ return FALSE;
+ return TRUE;
}
bool_t
-xdr_ypreq_nokey(XDR *xdrs, ypreq_nokey *objp)
+xdr_ypreq_nokey (XDR *xdrs, ypreq_nokey *objp)
{
- if (!xdr_domainname(xdrs, &objp->domain)) {
- return (FALSE);
- }
- if (!xdr_mapname(xdrs, &objp->map)) {
- return (FALSE);
- }
- return (TRUE);
+ if (!xdr_domainname (xdrs, &objp->domain))
+ return FALSE;
+ if (!xdr_mapname (xdrs, &objp->map))
+ return FALSE;
+ return TRUE;
}
bool_t
-xdr_ypreq_xfr(XDR *xdrs, ypreq_xfr *objp)
+xdr_ypreq_xfr (XDR *xdrs, ypreq_xfr *objp)
{
- if (!xdr_ypmap_parms(xdrs, &objp->map_parms)) {
- return (FALSE);
- }
- if (!xdr_u_int(xdrs, &objp->transid)) {
- return (FALSE);
- }
- if (!xdr_u_int(xdrs, &objp->prog)) {
- return (FALSE);
- }
- if (!xdr_u_int(xdrs, &objp->port)) {
- return (FALSE);
- }
- return (TRUE);
+ if (!xdr_ypmap_parms (xdrs, &objp->map_parms))
+ return FALSE;
+ if (!xdr_u_int (xdrs, &objp->transid))
+ return FALSE;
+ if (!xdr_u_int (xdrs, &objp->prog))
+ return FALSE;
+ if (!xdr_u_int (xdrs, &objp->port))
+ return FALSE;
+ return TRUE;
}
bool_t
-xdr_ypresp_val(XDR *xdrs, ypresp_val *objp)
+xdr_ypresp_val (XDR *xdrs, ypresp_val *objp)
{
- if (!xdr_ypstat(xdrs, &objp->stat)) {
- return (FALSE);
- }
- if (!xdr_valdat(xdrs, &objp->val)) {
- return (FALSE);
- }
- return (TRUE);
+ if (!xdr_ypstat (xdrs, &objp->stat))
+ return FALSE;
+ if (!xdr_valdat (xdrs, &objp->val))
+ return FALSE;
+ return TRUE;
}
bool_t
-xdr_ypresp_key_val(XDR *xdrs, ypresp_key_val *objp)
+xdr_ypresp_key_val (XDR *xdrs, ypresp_key_val *objp)
{
- if (!xdr_ypstat(xdrs, &objp->stat)) {
- return (FALSE);
- }
- if (!xdr_valdat(xdrs, &objp->val)) {
- return (FALSE);
- }
- if (!xdr_keydat(xdrs, &objp->key)) {
- return (FALSE);
- }
- return (TRUE);
+ if (!xdr_ypstat (xdrs, &objp->stat))
+ return FALSE;
+ if (!xdr_valdat (xdrs, &objp->val))
+ return FALSE;
+ if (!xdr_keydat (xdrs, &objp->key))
+ return FALSE;
+ return TRUE;
}
bool_t
-xdr_ypresp_master(XDR *xdrs, ypresp_master *objp)
+xdr_ypresp_master (XDR *xdrs, ypresp_master *objp)
{
- if (!xdr_ypstat(xdrs, &objp->stat)) {
- return (FALSE);
- }
- if (!xdr_peername(xdrs, &objp->peer)) {
- return (FALSE);
- }
- return (TRUE);
+ if (!xdr_ypstat (xdrs, &objp->stat))
+ return FALSE;
+ if (!xdr_peername (xdrs, &objp->peer))
+ return FALSE;
+ return TRUE;
}
bool_t
-xdr_ypresp_order(XDR *xdrs, ypresp_order *objp)
+xdr_ypresp_order (XDR *xdrs, ypresp_order *objp)
{
- if (!xdr_ypstat(xdrs, &objp->stat)) {
- return (FALSE);
- }
- if (!xdr_u_int(xdrs, &objp->ordernum)) {
- return (FALSE);
- }
- return (TRUE);
+ if (!xdr_ypstat (xdrs, &objp->stat))
+ return FALSE;
+ if (!xdr_u_int (xdrs, &objp->ordernum))
+ return FALSE;
+ return TRUE;
}
bool_t
-xdr_ypresp_all(XDR *xdrs, ypresp_all *objp)
+xdr_ypresp_all (XDR *xdrs, ypresp_all *objp)
{
- if (!xdr_bool(xdrs, &objp->more)) {
- return (FALSE);
- }
- switch (objp->more) {
- case TRUE:
- if (!xdr_ypresp_key_val(xdrs, &objp->ypresp_all_u.val)) {
- return (FALSE);
+ if (!xdr_bool (xdrs, &objp->more))
+ return FALSE;
+ switch (objp->more)
+ {
+ case TRUE:
+ if (!xdr_ypresp_key_val (xdrs, &objp->ypresp_all_u.val))
+ return FALSE;
+ break;
+ case FALSE:
+ break;
+ default:
+ return FALSE;
}
- break;
- case FALSE:
- break;
- default:
- return (FALSE);
- }
- return (TRUE);
+ return TRUE;
}
bool_t
-xdr_ypresp_xfr(XDR *xdrs, ypresp_xfr *objp)
+xdr_ypresp_xfr (XDR *xdrs, ypresp_xfr *objp)
{
- if (!xdr_u_int(xdrs, &objp->transid)) {
- return (FALSE);
- }
- if (!xdr_ypxfrstat(xdrs, &objp->xfrstat)) {
- return (FALSE);
- }
- return (TRUE);
+ if (!xdr_u_int (xdrs, &objp->transid))
+ return FALSE;
+ if (!xdr_ypxfrstat (xdrs, &objp->xfrstat))
+ return FALSE;
+ return TRUE;
}
bool_t
-xdr_ypmaplist(XDR *xdrs, ypmaplist *objp)
+xdr_ypmaplist (XDR *xdrs, ypmaplist *objp)
{
- if (!xdr_mapname(xdrs, &objp->map)) {
- return (FALSE);
- }
- if (!xdr_pointer(xdrs, (char **)&objp->next, sizeof(ypmaplist), (xdrproc_t)xdr_ypmaplist)) {
- return (FALSE);
- }
- return (TRUE);
+ if (!xdr_mapname (xdrs, &objp->map))
+ return FALSE;
+ if (!xdr_pointer (xdrs, (char **) &objp->next, sizeof (ypmaplist),
+ (xdrproc_t) xdr_ypmaplist))
+ return FALSE;
+ return TRUE;
}
bool_t
-xdr_ypresp_maplist(XDR *xdrs, ypresp_maplist *objp)
+xdr_ypresp_maplist (XDR *xdrs, ypresp_maplist *objp)
{
- if (!xdr_ypstat(xdrs, &objp->stat)) {
- return (FALSE);
- }
- if (!xdr_pointer(xdrs, (char **)&objp->maps, sizeof(ypmaplist), (xdrproc_t)xdr_ypmaplist)) {
- return (FALSE);
- }
- return (TRUE);
+ if (!xdr_ypstat (xdrs, &objp->stat))
+ return FALSE;
+ if (!xdr_pointer (xdrs, (char **) &objp->maps, sizeof (ypmaplist),
+ (xdrproc_t) xdr_ypmaplist))
+ return FALSE;
+ return TRUE;
}
bool_t
-xdr_yppush_status(XDR *xdrs, yppush_status *objp)
+xdr_yppush_status (XDR *xdrs, yppush_status *objp)
{
- if (!xdr_enum(xdrs, (enum_t *)objp)) {
- return (FALSE);
- }
- return (TRUE);
+ if (!xdr_enum (xdrs, (enum_t *) objp))
+ return FALSE;
+ return TRUE;
}
bool_t
-xdr_yppushresp_xfr(XDR *xdrs, yppushresp_xfr *objp)
+xdr_yppushresp_xfr (XDR *xdrs, yppushresp_xfr *objp)
{
- if (!xdr_u_int(xdrs, &objp->transid)) {
- return (FALSE);
- }
- if (!xdr_yppush_status(xdrs, &objp->status)) {
- return (FALSE);
- }
- return (TRUE);
+ if (!xdr_u_int (xdrs, &objp->transid))
+ return FALSE;
+ if (!xdr_yppush_status (xdrs, &objp->status))
+ return FALSE;
+ return TRUE;
}
bool_t
-xdr_ypbind_resptype(XDR *xdrs, ypbind_resptype *objp)
+xdr_ypbind_resptype (XDR *xdrs, ypbind_resptype *objp)
{
- if (!xdr_enum(xdrs, (enum_t *)objp)) {
- return (FALSE);
- }
- return (TRUE);
+ if (!xdr_enum (xdrs, (enum_t *) objp))
+ return FALSE;
+ return TRUE;
}
bool_t
-xdr_ypbind_binding(XDR *xdrs, ypbind_binding *objp)
+xdr_ypbind_binding (XDR *xdrs, ypbind_binding *objp)
{
- if (!xdr_opaque(xdrs, objp->ypbind_binding_addr, 4)) {
- return (FALSE);
- }
- if (!xdr_opaque(xdrs, objp->ypbind_binding_port, 2)) {
- return (FALSE);
- }
- return (TRUE);
+ if (!xdr_opaque (xdrs, objp->ypbind_binding_addr, 4))
+ return FALSE;
+ if (!xdr_opaque (xdrs, objp->ypbind_binding_port, 2))
+ return FALSE;
+ return TRUE;
}
bool_t
-xdr_ypbind_resp(XDR *xdrs, ypbind_resp *objp)
+xdr_ypbind_resp (XDR *xdrs, ypbind_resp *objp)
{
- if (!xdr_ypbind_resptype(xdrs, &objp->ypbind_status)) {
- return (FALSE);
- }
- switch (objp->ypbind_status) {
- case YPBIND_FAIL_VAL:
- if (!xdr_u_int(xdrs, &objp->ypbind_resp_u.ypbind_error)) {
- return (FALSE);
- }
- break;
- case YPBIND_SUCC_VAL:
- if (!xdr_ypbind_binding(xdrs, &objp->ypbind_resp_u.ypbind_bindinfo)) {
- return (FALSE);
+ if (!xdr_ypbind_resptype (xdrs, &objp->ypbind_status))
+ return FALSE;
+ switch (objp->ypbind_status)
+ {
+ case YPBIND_FAIL_VAL:
+ if (!xdr_u_int (xdrs, &objp->ypbind_resp_u.ypbind_error))
+ return FALSE;
+ break;
+ case YPBIND_SUCC_VAL:
+ if (!xdr_ypbind_binding (xdrs, &objp->ypbind_resp_u.ypbind_bindinfo))
+ return FALSE;
+ break;
+ default:
+ return FALSE;
}
- break;
- default:
- return (FALSE);
- }
- return (TRUE);
+ return TRUE;
}
bool_t
-xdr_ypbind_setdom(XDR *xdrs, ypbind_setdom *objp)
+xdr_ypbind_setdom (XDR *xdrs, ypbind_setdom *objp)
{
- if (!xdr_domainname(xdrs, &objp->ypsetdom_domain)) {
- return (FALSE);
- }
- if (!xdr_ypbind_binding(xdrs, &objp->ypsetdom_binding)) {
- return (FALSE);
- }
- if (!xdr_u_int(xdrs, &objp->ypsetdom_vers)) {
- return (FALSE);
- }
- return (TRUE);
+ if (!xdr_domainname (xdrs, &objp->ypsetdom_domain))
+ return FALSE;
+ if (!xdr_ypbind_binding (xdrs, &objp->ypsetdom_binding))
+ return FALSE;
+ if (!xdr_u_int (xdrs, &objp->ypsetdom_vers))
+ return FALSE;
+ return TRUE;
}
do
{
- try++;
+ ++try;
if (try > MAXTRIES)
{
if (is_new)
}
#if USE_BINDINGDIR
- if (ysd->dom_vers < 1 && try < 3)
+ if (ysd->dom_vers < 1 && try == 1) /* Try binding dir only first time */
{
char path[sizeof (BINDINGDIR) - 1 + strlen (domain) + 10];
struct iovec vec[2];
* Copyright (c) 1986, 1990 by Sun Microsystems, Inc.
*/
-/* from @(#)ypupdate_prot.x 1.3 91/03/11 TIRPC 1.0 */
-
-/*
- * Compiled from ypupdate_prot.x using rpcgen
- * This is NOT source code!
- * DO NOT EDIT THIS FILE!
- */
-
-
#include <rpcsvc/ypupd.h>
-bool_t
-xdr_yp_buf (XDR * xdrs, yp_buf * objp)
+bool_t
+xdr_yp_buf (XDR *xdrs, yp_buf *objp)
{
- if (!xdr_bytes (xdrs, (char **) &objp->yp_buf_val, (u_int *) & objp->yp_buf_len, MAXYPDATALEN))
- return (FALSE);
- return (TRUE);
+ if (!xdr_bytes (xdrs, (char **) &objp->yp_buf_val,
+ (u_int *) &objp->yp_buf_len, ~0))
+ return FALSE;
+ return TRUE;
}
-bool_t
-xdr_ypupdate_args (XDR * xdrs, ypupdate_args * objp)
+bool_t
+xdr_ypupdate_args (XDR *xdrs, ypupdate_args *objp)
{
- if (!xdr_string (xdrs, &objp->mapname, MAXMAPNAMELEN))
- return (FALSE);
+ if (!xdr_string (xdrs, &objp->mapname, ~0))
+ return FALSE;
if (!xdr_yp_buf (xdrs, &objp->key))
- return (FALSE);
+ return FALSE;
if (!xdr_yp_buf (xdrs, &objp->datum))
- return (FALSE);
- return (TRUE);
+ return FALSE;
+ return TRUE;
}
-bool_t
-xdr_ypdelete_args (XDR * xdrs, ypdelete_args * objp)
+bool_t
+xdr_ypdelete_args (XDR *xdrs, ypdelete_args *objp)
{
- if (!xdr_string (xdrs, &objp->mapname, MAXMAPNAMELEN))
- return (FALSE);
+ if (!xdr_string (xdrs, &objp->mapname, ~0))
+ return FALSE;
if (!xdr_yp_buf (xdrs, &objp->key))
- return (FALSE);
- return (TRUE);
+ return FALSE;
+ return TRUE;
}
# endif
#endif /* GCC */
-#if defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__ && __GNUC__ >= 2
+#if defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__ \
+ && defined __USE_EXTERN_INLINES
/* Define inline functions which call the internal entry points. */
extern __inline double
return strtoll (__nptr, (char **) NULL, 10);
}
# endif
-#endif /* Optimizing GCC >=2. */
+#endif /* Optimizing and Inlining. */
#if defined __USE_SVID || defined __USE_XOPEN_EXTENDED
extern char *argz_next __P ((char *argz, size_t __argz_len,
__const char *entry));
-#if defined __OPTIMIZE__ && __GNUC__ >= 2
+#ifdef __USE_EXTERN_INLINES
extern inline char *
__argz_next (char *__argz, size_t __argz_len, __const char *__entry)
{
{
return __argz_next (__argz, __argz_len, __entry);
}
-#endif /* optimizing GCC2 */
+#endif /* Use extern inlines. */
__END_DECLS
#define _SIGSET_H_fns 1
#ifndef _EXTERN_INLINE
-#define _EXTERN_INLINE extern __inline
+# define _EXTERN_INLINE extern __inline
#endif
/* Return a mask that includes SIG only. The cast to `sigset_t' avoids
extern int __sigaddset (__sigset_t *, int);
extern int __sigdelset (__sigset_t *, int);
-#define __SIGSETFN(NAME, BODY, CONST) \
+#ifdef __USE_EXTERN_INLINES
+# define __SIGSETFN(NAME, BODY, CONST) \
_EXTERN_INLINE int \
NAME (CONST __sigset_t *__set, int __sig) \
{ \
__SIGSETFN (__sigaddset, ((*__set |= __mask), 0), )
__SIGSETFN (__sigdelset, ((*__set &= ~__mask), 0), )
-#undef __SIGSETFN
+# undef __SIGSETFN
+#endif
#endif /* ! _SIGSET_H_fns. */
# define readdir(str) __readdir (str)
# define getpwnam_r(name, bufp, buf, len, res) \
__getpwnam_r (name, bufp, buf, len, res)
+# define __stat(fname, buf) __xstat (_STAT_VER, fname, buf)
#endif
#if !(defined STDC_HEADERS || defined __GNU_LIBRARY__)
extern int __sigaddset (__sigset_t *, int);
extern int __sigdelset (__sigset_t *, int);
-# define __SIGSETFN(NAME, BODY, CONST) \
+# ifdef __USE_EXTERN_INLINES
+# define __SIGSETFN(NAME, BODY, CONST) \
_EXTERN_INLINE int \
NAME (CONST __sigset_t *__set, int __sig) \
{ \
__SIGSETFN (__sigaddset, ((__set->__val[__word] |= __mask), 0), )
__SIGSETFN (__sigdelset, ((__set->__val[__word] &= ~__mask), 0), )
-#undef __SIGSETFN
+# undef __SIGSETFN
+# endif
#endif /* ! _SIGSET_H_fns. */
#define __SSELT(s) ((s) / __NSSBITS)
#define __SSMASK(s) (1 << ((s) % __NSSBITS))
-#ifndef _EXTERN_INLINE
-#define _EXTERN_INLINE extern __inline
-#endif
+#ifdef __USE_EXTERN_INLINES
+# ifndef _EXTERN_INLINE
+# define _EXTERN_INLINE extern __inline
+# endif
_EXTERN_INLINE int
__sigemptyset (__sigset_t *__set)
return 1;
return 0;
}
+#endif /* use extern inlines. */
#endif /* ! _SIGSET_H_fns */
extern uintmax_t wcstoumax __P ((__const wchar_t * __restrict __nptr,
wchar_t ** __restrict __endptr, int __base));
-#if defined __GNUC__ && __GNUC__ >= 2 && defined __OPTIMIZE__
+#ifdef __USE_EXTERN_INLINES
/* Like `strtol' but convert to `intmax_t'. */
# ifndef __strtoll_internal_defined
{
return __wcstoull_internal (nptr, endptr, base, 0);
}
-#endif /* GCC and Optimization. */
+#endif /* Use extern inlines. */
__END_DECLS
extern uintmax_t wcstoumax __P ((__const wchar_t * __restrict __nptr,
wchar_t ** __restrict __endptr, int __base));
-#if defined __GNUC__ && __GNUC__ >= 2 && defined __OPTIMIZE__
+#ifdef __USE_EXTERN_INLINES
/* Like `strtol' but convert to `intmax_t'. */
# ifndef __strtol_internal_defined
{
return __wcstoul_internal (nptr, endptr, base, 0);
}
-#endif /* GCC and Optimization. */
+#endif /* Use extern inlines. */
__END_DECLS
mbstate_t *__restrict __ps));
#if defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__ \
- && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7))
+ && defined __USE_EXTERN_INLINES
/* Define inline function as optimization. */
extern __inline size_t mbrlen (__const char *__restrict __s, size_t __n,
mbstate_t *__restrict __ps)