]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Add prototypes to prevent warnings.
authorUlrich Drepper <drepper@redhat.com>
Tue, 3 Mar 1998 17:03:27 +0000 (17:03 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 3 Mar 1998 17:03:27 +0000 (17:03 +0000)
nis/rpcsvc/ypclnt.h
sunrpc/rpc/auth.h
sunrpc/rpc/xdr.h

index b61a498417bf825bcc797a630e7be5928f1bb4c0..6d96364eef4352cc1bf5bcb1ddfb4b93b4995279 100644 (file)
@@ -5,12 +5,12 @@
 ** 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.
-** 
+**
 ** This 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 this library; if not, write to the Free
 ** Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 __BEGIN_DECLS
 
 /* struct ypall_callback * is the arg which must be passed to yp_all */
-struct ypall_callback {
-       int (*foreach)();
-       char *data;
-};
+struct ypall_callback
+  {
+    int (*foreach) __P ((int __status, char *__key, int __keylen,
+                        char *__val, int __vallen, char *__data));
+    char *data;
+  };
 
 /* External NIS client function references. */
 extern int yp_bind __P ((__const char *));
 extern void yp_unbind __P ((__const char *));
 extern int yp_get_default_domain __P ((char **));
-extern int yp_match __P ((__const char *, __const char *, __const char *, 
+extern int yp_match __P ((__const char *, __const char *, __const char *,
                          __const int, char **, int *));
-extern int yp_first __P ((__const char *, __const char *, char **, 
+extern int yp_first __P ((__const char *, __const char *, char **,
                          int *, char **, int *));
-extern int yp_next __P ((__const char *, __const char *, __const char *, 
+extern int yp_next __P ((__const char *, __const char *, __const char *,
                         __const int, char **, int *, char **, int *));
 extern int yp_master __P ((__const char *, __const char *, char **));
 extern int yp_order __P ((__const char *, __const char *, unsigned int *));
-extern int yp_all __P ((__const char *, __const char *, 
+extern int yp_all __P ((__const char *, __const char *,
                        __const struct ypall_callback *));
 extern __const char *yperr_string __P ((__const int));
 extern __const char *ypbinderr_string __P ((__const int));
@@ -81,7 +83,7 @@ extern int yp_maplist __P ((__const char *, struct ypmaplist **));
 #endif
 
 /* Exist only under BSD and Linux systems */
-extern int __yp_check __P ((char **)); 
+extern int __yp_check __P ((char **));
 
 __END_DECLS
 
index fff60baccdfcd9c6e28ff8c202549f3b06a41b3d..5ce54ae5ee2e6a5bba54fccc53e752f4f81a57ac 100644 (file)
@@ -42,6 +42,7 @@
 
 #define _RPC_AUTH_H    1
 #include <features.h>
+#include <rpc/xdr.h>
 
 __BEGIN_DECLS
 
@@ -76,7 +77,7 @@ union des_block {
        char c[8];
 };
 typedef union des_block des_block;
-extern bool_t xdr_des_block();
+extern bool_t xdr_des_block __P ((XDR *__xdrs, des_block *__blkp));
 
 /*
  * Authentication info.  Opaque to client.
@@ -90,19 +91,21 @@ struct opaque_auth {
 /*
  * Auth handle, interface to client side authenticators.
  */
-typedef struct {
-       struct  opaque_auth     ah_cred;
-       struct  opaque_auth     ah_verf;
-       union   des_block       ah_key;
-       struct auth_ops {
-               void    (*ah_nextverf)();
-               int     (*ah_marshal)();        /* nextverf & serialize */
-               int     (*ah_validate)();       /* validate verifier */
-               int     (*ah_refresh)();        /* refresh credentials */
-               void    (*ah_destroy)();        /* destroy this structure */
-       } *ah_ops;
-       caddr_t ah_private;
-} AUTH;
+typedef struct AUTH AUTH;
+struct AUTH {
+  struct opaque_auth ah_cred;
+  struct opaque_auth ah_verf;
+  union des_block ah_key;
+  struct auth_ops {
+    void (*ah_nextverf) __P ((AUTH *));
+    int  (*ah_marshal) __P ((AUTH *, XDR *));  /* nextverf & serialize */
+    int  (*ah_validate) __P ((AUTH *, struct opaque_auth *));
+                                               /* validate verifier */
+    int  (*ah_refresh) __P ((AUTH *));         /* refresh credentials */
+    void (*ah_destroy) __P ((AUTH *));         /* destroy this structure */
+  } *ah_ops;
+  caddr_t ah_private;
+};
 
 
 /*
index c99962edad8aa0fc74cb1e5a24d2527793a0a3b8..cfc62a19fee351daf1f9275cf79d2697563a5242 100644 (file)
@@ -101,23 +101,36 @@ enum xdr_op {
  * an operations vector for the particular implementation (e.g. see xdr_mem.c),
  * and two private fields for the use of the particular implementation.
  */
-typedef struct {
-       enum xdr_op     x_op;           /* operation; fast additional param */
-       struct xdr_ops {
-               bool_t  (*x_getlong)(); /* get a long from underlying stream */
-               bool_t  (*x_putlong)(); /* put a long to " */
-               bool_t  (*x_getbytes)();/* get some bytes from " */
-               bool_t  (*x_putbytes)();/* put some bytes to " */
-               u_int   (*x_getpostn)();/* returns bytes off from beginning */
-               bool_t  (*x_setpostn)();/* lets you reposition the stream */
-               long *  (*x_inline)();  /* buf quick ptr to buffered data */
-               void    (*x_destroy)(); /* free privates of this xdr_stream */
-       } *x_ops;
-       caddr_t         x_public;       /* users' data */
-       caddr_t         x_private;      /* pointer to private data */
-       caddr_t         x_base;         /* private used for position info */
-       int             x_handy;        /* extra private word */
-} XDR;
+typedef struct XDR XDR;
+struct XDR
+  {
+    enum xdr_op x_op;          /* operation; fast additional param */
+    const struct xdr_ops
+      {
+       bool_t (*x_getlong) __P ((XDR * __xdrs, long *__lp));
+       /* get a long from underlying stream */
+       bool_t (*x_putlong) __P ((XDR * __xdrs, __const long *__lp));
+       /* put a long to " */
+       bool_t (*x_getbytes) __P ((XDR * __xdrs, caddr_t __addr, u_int __len));
+       /* get some bytes from " */
+       bool_t (*x_putbytes) __P ((XDR * __xdrs, __const char *__addr,
+                                  u_int __len));
+       /* put some bytes to " */
+       u_int (*x_getpostn) __P ((__const XDR * __xdrs));
+       /* returns bytes off from beginning */
+       bool_t (*x_setpostn) __P ((XDR * __xdrs, u_int pos));
+       /* lets you reposition the stream */
+       long *(*x_inline) __P ((XDR * __xdrs, int len));
+       /* buf quick ptr to buffered data */
+       void (*x_destroy) __P ((XDR * __xdrs));
+       /* free privates of this xdr_stream */
+      }
+     *x_ops;
+    caddr_t x_public;          /* users' data */
+    caddr_t x_private;         /* pointer to private data */
+    caddr_t x_base;            /* private used for position info */
+    int x_handy;               /* extra private word */
+  };
 
 /*
  * A xdrproc_t exists for each data type which is to be encoded or decoded.