]> granicus.if.org Git - libtirpc/commitdiff
Avoid use of internal glibc sys/cdefs.h header
authorNatanael Copa <ncopa@alpinelinux.org>
Wed, 22 Apr 2015 18:43:52 +0000 (14:43 -0400)
committerSteve Dickson <steved@redhat.com>
Thu, 23 Apr 2015 12:29:45 +0000 (08:29 -0400)
This header was never intended to be used by programs.

Expand the macros used, __BEGIN_CDECLS, __END_CDECLS and __P()

The __THROW macro is a non-portable hint for optimization so we simply
remove those.

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Signed-off-by: Steve Dickson <steved@redhat.com>
57 files changed:
src/auth_des.c
src/auth_none.c
src/auth_time.c
src/auth_unix.c
src/authdes_prot.c
src/authunix_prot.c
src/bindresvport.c
src/clnt_bcast.c
src/clnt_perror.c
src/clnt_simple.c
src/crypt_client.c
src/des_crypt.c
src/getnetconfig.c
src/getnetpath.c
src/getpeereid.c
src/getpublickey.c
src/key_call.c
src/key_prot_xdr.c
src/mt_misc.c
src/pmap_clnt.c
src/pmap_getmaps.c
src/rpc_com.h
src/rpc_generic.c
src/rpcb_st_xdr.c
src/rpcdname.c
src/svc_dg.c
src/svc_simple.c
src/svc_vc.c
src/xdr.c
src/xdr_array.c
src/xdr_float.c
src/xdr_mem.c
src/xdr_rec.c
src/xdr_reference.c
src/xdr_sizeof.c
src/xdr_stdio.c
tirpc/netconfig.h
tirpc/rpc/auth.h
tirpc/rpc/auth_des.h
tirpc/rpc/auth_gss.h
tirpc/rpc/auth_unix.h
tirpc/rpc/clnt.h
tirpc/rpc/clnt_soc.h
tirpc/rpc/des_crypt.h
tirpc/rpc/nettype.h
tirpc/rpc/pmap_clnt.h
tirpc/rpc/pmap_prot.h
tirpc/rpc/pmap_rmt.h
tirpc/rpc/rpc.h
tirpc/rpc/rpc_com.h
tirpc/rpc/rpc_msg.h
tirpc/rpc/rpcb_clnt.h
tirpc/rpc/rpcent.h
tirpc/rpc/svc.h
tirpc/rpc/svc_auth.h
tirpc/rpc/svc_soc.h
tirpc/rpc/xdr.h

index cff777cbfdbb44fb91784cc73383c6ec114da633..1ccbf28625b60964aa0bb966c926786ec98a39b9 100644 (file)
@@ -38,7 +38,6 @@
 #include <string.h>
 #include <stdlib.h>
 #include <unistd.h>
-#include <sys/cdefs.h>
 #include <rpc/des_crypt.h>
 #include <syslog.h>
 #include <rpc/types.h>
@@ -52,7 +51,6 @@
 
 #if defined(LIBC_SCCS) && !defined(lint)
 #endif
-#include <sys/cdefs.h>
 
 #include "debug.h"
 
index affc92b99e81e98435029f8746bc67f0826690e5..0b0bbd148ad0cf2f4309ec2d9f7db87bf894bd59 100644 (file)
@@ -31,7 +31,6 @@
 static char *sccsid = "@(#)auth_none.c 1.19 87/08/11 Copyr 1984 Sun Micro";
 static char *sccsid = "@(#)auth_none.c 2.1 88/07/29 4.0 RPCSRC";
 #endif
-#include <sys/cdefs.h>
 __FBSDID("$FreeBSD: src/lib/libc/rpc/auth_none.c,v 1.12 2002/03/22 23:18:35 obrien Exp $");
 */
 
index 7cfbb7ea260a665ea29c9e443e81d517ad35adc5..ace86bffff9682aacf52336cee3b27ffb635bfd7 100644 (file)
@@ -25,7 +25,6 @@
  *     needed to deal with TCP connections.
  */
 
-#include <sys/cdefs.h>
 #include <stdio.h>
 #include <syslog.h>
 #include <string.h>
index 4b9b13fd6a4c5d84a6dbdfc5b3c67106a88ac378..30095438a8147184b3da1fc407b4ed2648471496 100644 (file)
@@ -26,7 +26,6 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 
 /*
  * auth_unix.c, Implements UNIX style authentication parameters.
index ed061a55d7b22e0888a0cbb6e2337e19b2289611..227d08ad0653ba8f06f2b06fce69b01e8b0d0591 100644 (file)
@@ -1,4 +1,3 @@
-#include <sys/cdefs.h>
 /*
  * Copyright (c) 2009, Sun Microsystems, Inc.
  * All rights reserved.
index bf76a9da960b8e359548a12269bbc2c8d344b195..0a04336659d9c631fcc072250be056483ff4776b 100644 (file)
@@ -26,7 +26,6 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 
 /*
  * authunix_prot.c
index 5a7a1a92c27c37db2715156e33e9471de082903a..2d8f2bc304fbabb9fff2ab0ce9115b8ab7692c3c 100644 (file)
@@ -26,7 +26,6 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 
 /*
  * Copyright (c) 1987 by Sun Microsystems, Inc.
index ddcb6945d4c36dbf288f67c029453d2b9ac2c76e..194a738c7f011eb620ab4f45d75206ce723bb08d 100644 (file)
@@ -28,7 +28,6 @@
 /*
  * Copyright (c) 1986-1991 by Sun Microsystems Inc. 
  */
-#include <sys/cdefs.h>
 
 /*
  * clnt_bcast.c
index bcd8af8eb0b02bfeed97adb9304bb612344c71d1..fb7fb80f4f7f4a149f108e1f653797841de86a46 100644 (file)
@@ -26,9 +26,6 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-/*
-#include <sys/cdefs.h>
-*/
 /*
  * clnt_perror.c
  *
index 7ee9542b6882e521efe44c5c7801e1e1fa1e2e79..170006078e3623a7e52b558a2268b3ed4713d7f0 100644 (file)
@@ -29,7 +29,6 @@
  * Copyright (c) 1986-1991 by Sun Microsystems Inc. 
  */
 
-#include <sys/cdefs.h>
 
 /*
  * clnt_simple.c
index 670b253c3df87d097a027c38f9abfebfa45be86e..f393926216243b82431ace34e1cca8f30bd77df0 100644 (file)
@@ -30,7 +30,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 
 #include <err.h>
 #include <sys/types.h>
index 37a1022ee5e968b77d2c8a66daa73052f8f02c62..980a6cb1cab5bd6d859583104f3a29cd560045b5 100644 (file)
@@ -39,7 +39,6 @@
 static char sccsid[] = "@(#)des_crypt.c        2.2 88/08/10 4.0 RPCSRC; from 1.13 88/02/08 SMI";
 #endif
 #endif
-#include <sys/cdefs.h>
 
 static int common_crypt( char *, char *, unsigned, unsigned, struct desparams * );
 int (*__des_crypt_LOCAL)() = 0;
index 635c03a7ff9c5296f58f7b0108b9995a16b52709..92e7c432dc8dcd8bef831bb0814e781f5a7b2ef9 100644 (file)
@@ -32,7 +32,6 @@
  
 #include <pthread.h>
 #include <reentrant.h>
-#include <sys/cdefs.h>
 #include <stdio.h>
 #include <errno.h>
 #include <netconfig.h>
index cd80dcaeeedb69a4da13c7081a692f11fe9fc5d1..7c199329e905897e33613b399d412dcbd869f8d8 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  */
-#include <sys/cdefs.h>
 
 /*
  * Copyright (c) 1989 by Sun Microsystems, Inc.
  */
 
-#include <sys/cdefs.h>
 #include <stdio.h>
 #include <errno.h>
 #include <netconfig.h>
index 57ee19717117c834986d395662c5477c2d42e7ec..dd85270dcdf3d1ece6890168bddb8276226d04c8 100644 (file)
@@ -24,7 +24,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 
 #include <sys/param.h>
 #include <sys/socket.h>
index 85935d83a803a177824c1946145e4bf84f8e1f29..764a5f9e91249902d20f66c49c91d9f19eecbeab 100644 (file)
@@ -25,9 +25,6 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  */
-/*
-#include <sys/cdefs.h>
-*/
 
 /*
  * publickey.c
index 8b9f388106d6d9c5bc4564ce503bcbeef537e646..1a6430b2f51454032d090425c764816fbe12fe3a 100644 (file)
@@ -30,7 +30,6 @@
  */
 
 
-#include <sys/cdefs.h>
 
 /*
  * key_call.c, Interface to keyserver
index df2842fda2ec18e9ca2b941ab1429eb821fa0352..772f5829bc09c5447d97330e3a6b1ea8243a3886 100644 (file)
@@ -33,7 +33,6 @@
  */
 /* Copyright (c)  1990, 1991 Sun Microsystems, Inc. */
 
-#include <sys/cdefs.h>
 
 /* 
  * Compiled from key_prot.x using rpcgen.
index 093086e8815294fd229cf92ad3d788aea3fdcd6f..a50f3855ab83aa759bd23f60c6e7e391aee4e449 100644 (file)
@@ -1,5 +1,4 @@
 
-#include <sys/cdefs.h>
 #include <pthread.h>
 #include <reentrant.h>
 #include <rpc/rpc.h>
index 1d5d153f5a04b1a6c6e613f05bc6121e5c1c6093..4b5fd85bfa3acf97755dfc076464356bba2fee01 100644 (file)
@@ -26,7 +26,6 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 
 /*
  * pmap_clnt.c
index 54338f71ac55aa7b1190f9aa90b8a66a2fb4c177..853f724e108f45be434fae1bbb45a20a3f848771 100644 (file)
@@ -26,7 +26,6 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 
 /*
  * pmap_getmap.c
index 38c2cfe0b0d9da09a04aca4d4570cf8e6bf018e4..52a8c48a4e0ce0ab3a120d097afe89284be1aea0 100644 (file)
@@ -40,7 +40,6 @@
 #ifndef _TIRPC_RPCCOM_H
 #define        _TIRPC_RPCCOM_H
 
-#include <sys/cdefs.h>
 
 /* #pragma ident       "@(#)rpc_com.h  1.11    93/07/05 SMI" */
 
@@ -54,7 +53,9 @@
 #define __RPC_GETXID(now) ((u_int32_t)getpid() ^ (u_int32_t)(now)->tv_sec ^ \
     (u_int32_t)(now)->tv_usec)
 
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern u_int __rpc_get_a_size(int);
 extern int __rpc_dtbsize(void);
 extern struct netconfig * __rpcgettp(int);
@@ -90,6 +91,8 @@ void __xprt_set_raddr(SVCXPRT *, const struct sockaddr_storage *);
 SVCXPRT **__svc_xports;
 int __svc_maxrec;
 
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 #endif /* _TIRPC_RPCCOM_H */
index 764a25cc63cd3a055072fd201fadafa7ac01ca5d..6148830df7701ad476a1d50dfb608708b124f354 100644 (file)
@@ -29,7 +29,6 @@
  * Copyright (c) 1986-1991 by Sun Microsystems Inc. 
  */
 
-#include <sys/cdefs.h>
 
 /*
  * rpc_generic.c, Miscl routines for RPC.
index c5d3575f483893173317fa550542888c2a0a758f..08db7457bd4a29074a8d506c39217340e7e76df4 100644 (file)
@@ -35,7 +35,6 @@
  * routines used with the rpcbind stats facility.
  */
 
-#include <sys/cdefs.h>
 
 #include <rpc/rpc.h>
 
index 094cea358671cae897346fc0ca2ac4d40a3601ac..3e6a988f215e00d467ff11cd3ed1c014cd3af38c 100644 (file)
@@ -25,7 +25,6 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  */
-#include <sys/cdefs.h>
 
 /*
  * rpcdname.c
index f8255cc36bdad26c9469d009a7415e4be413f390..1fd6f926170731a836f2a32b4faff01677e8fdd5 100644 (file)
@@ -31,7 +31,6 @@
  * Copyright (c) 1986-1991 by Sun Microsystems Inc.
  */
 
-#include <sys/cdefs.h>
 
 /*
  * svc_dg.c, Server side for connectionless RPC.
index b6c371ebf1113c00f90dc31efed7dc55981cd2e5..cb58002cb6b683eb663d3a7ef717cfc8232aa849 100644 (file)
@@ -29,7 +29,6 @@
  * Copyright (c) 1986-1991 by Sun Microsystems Inc. 
  */
 
-#include <sys/cdefs.h>
 
 /*
  * svc_simple.c
index 4d3ea51e7a0ab73aefd71647aeabbcbc3d91b278..9dba72a2a0e2cea5308bc2aa1b3bbac84f5724f6 100644 (file)
@@ -27,7 +27,6 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 
 /*
  * svc_vc.c, Server side for Connection Oriented based RPC. 
index 1142a888071d17291d3ebd1343128770e34e44ad..f3fb9ad14c03ab0ec6ab7f919d3b749f8496e66f 100644 (file)
--- a/src/xdr.c
+++ b/src/xdr.c
@@ -26,7 +26,6 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 
 /*
  * xdr.c, Generic XDR routines implementation.
index 216173d2684c67373a37aed13e7bf4371bc231b5..7fc8fb8e420f67d59d1b4918ce57b996574b75c5 100644 (file)
@@ -27,7 +27,6 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 
 /*
  * xdr_array.c, Generic XDR routines impelmentation.
index 90daf3fe896264a2b98e97719980c412e175fd86..26bc8655e06afe3208b91a3ca340a64107a230a4 100644 (file)
@@ -27,7 +27,6 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 
 /*
  * xdr_float.c, Generic XDR routines implementation.
index bd86f00781c8825f26dbf9a26da98c52505930dc..ecdc932d14b881f750fdfba8e232bbc26718de6b 100644 (file)
@@ -26,7 +26,6 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 
 /*
  * xdr_mem.h, XDR implementation using memory buffers.
index 2aca623a98ba45432bfe300b37bd7e4b542c4308..7d535cf5c2962cfbc70963737323bdce9b7e4d83 100644 (file)
@@ -27,8 +27,6 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
-#include <sys/cdefs.h>
 
 /*
  * xdr_rec.c, Implements TCP/IP based XDR streams with a "record marking"
index affe19e1caaec54ffe73014b0fb769f043a816e9..13f64106e14c6b88f3e32511aadc1d951b405aa1 100644 (file)
@@ -26,8 +26,6 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
-#include <sys/cdefs.h>
 
 /*
  * xdr_reference.c, Generic XDR routines impelmentation.
index a805e31166c85fac1ebff453db244f8fc9852092..cc5414b7677592bce51d1518f93887b5dc668d9d 100644 (file)
@@ -34,7 +34,6 @@
  * when serialized using XDR.
  */
 
-#include <sys/cdefs.h>
 
 #include <rpc/types.h>
 #include <rpc/xdr.h>
index 45b115081cb464dbecaf78b0be33aabf94f7ee48..4410262275b614c220c6f87854e8d794b62aa2d2 100644 (file)
@@ -26,7 +26,6 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 
 /*
  * xdr_stdio.c, XDR implementation on standard i/o file.
index 7d6c2bc289adc1d14e6575edae9c888f77fd3fad..c25788cd4a03f16ea86f325fe9b1fff15d93fd69 100644 (file)
@@ -74,7 +74,9 @@ typedef struct {
 #define NC_UDP         "udp"
 #define NC_ICMP                "icmp"
 
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 extern void *setnetconfig (void);
 extern struct netconfig *getnetconfig (void *);
@@ -89,6 +91,8 @@ extern int endnetpath (void *);
 extern void nc_perror (const char *);
 extern char *nc_sperror (void);
 
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 #endif /* _NETCONFIG_H_ */
index 7c8f81352350a4cc0269df36fa3bcafea086f779..434d35cbd70a18f55a1be1a68ac32b9a6f1fb5d6 100644 (file)
@@ -48,7 +48,6 @@
 
 #include <rpc/xdr.h>
 #include <rpc/clnt_stat.h>
-#include <sys/cdefs.h>
 #include <sys/socket.h>
 #include <sys/types.h>
 
@@ -164,9 +163,13 @@ union des_block {
        char c[8];
 };
 typedef union des_block des_block;
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern bool_t xdr_des_block(XDR *, des_block *);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 /*
  * Authentication info.  Opaque to client.
@@ -277,9 +280,13 @@ auth_put(AUTH *auth)
                xfunc, xwhere))
 
 
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern struct opaque_auth _null_auth;
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 /*
  * Any style authentication.  These routines can be used by any
@@ -300,11 +307,15 @@ int authany_wrap(void), authany_unwrap(void);
  *     int len;
  *     int *aup_gids;
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern AUTH *authunix_create(char *, uid_t, uid_t, int, uid_t *);
 extern AUTH *authunix_create_default(void);    /* takes no parameters */
 extern AUTH *authnone_create(void);            /* takes no parameters */
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 /*
  * DES style authentication
  * AUTH *authsecdes_create(servername, window, timehost, ckey)
@@ -313,15 +324,23 @@ __END_DECLS
  *     const char *timehost;                   - optional hostname to sync with
  *     des_block *ckey;                - optional conversation key to use
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern AUTH *authdes_create (char *, u_int, struct sockaddr *, des_block *);
 extern AUTH *authdes_seccreate (const char *, const u_int, const  char *,
     const  des_block *);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern bool_t xdr_opaque_auth          (XDR *, struct opaque_auth *);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 #define authsys_create(c,i1,i2,i3,ip) authunix_create((c),(i1),(i2),(i3),(ip))
 #define authsys_create_default() authunix_create_default()
@@ -329,36 +348,48 @@ __END_DECLS
 /*
  * Netname manipulation routines.
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern int getnetname(char *);
 extern int host2netname(char *, const char *, const char *);
 extern int user2netname(char *, const uid_t, const char *);
 extern int netname2user(char *, uid_t *, gid_t *, int *, gid_t *);
 extern int netname2host(char *, char *, const int);
 extern void passwd2des ( char *, char * );
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 /*
  *
  * These routines interface to the keyserv daemon
  *
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern int key_decryptsession(const char *, des_block *);
 extern int key_encryptsession(const char *, des_block *);
 extern int key_gendes(des_block *);
 extern int key_setsecret(const char *);
 extern int key_secretkey_is_set(void);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 /*
  * Publickey routines.
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern int getpublickey (const char *, char *);
 extern int getpublicandprivatekey (char *, char *);
 extern int getsecretkey (char *, char *, char *);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 #ifdef KERBEROS
 /*
@@ -371,10 +402,14 @@ __END_DECLS
  *     const char *timehost;                   - optional hostname to sync with
  *     int *status;                            - kerberos status returned
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern AUTH    *authkerb_seccreate(const char *, const char *, const  char *,
                    const u_int, const char *, int *);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 /*
  * Map a kerberos credential into a unix cred.
@@ -387,20 +422,28 @@ __END_DECLS
  *     int *groups;
  *
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern int     authkerb_getucred(/* struct svc_req *, uid_t *, gid_t *,
                    short *, int * */);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 #endif /* KERBEROS */
 
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 struct svc_req;
 struct rpc_msg;
 enum auth_stat _svcauth_none (struct svc_req *, struct rpc_msg *);
 enum auth_stat _svcauth_short (struct svc_req *, struct rpc_msg *);
 enum auth_stat _svcauth_unix (struct svc_req *, struct rpc_msg *);
 enum auth_stat _svcauth_gss (struct svc_req *, struct rpc_msg *, bool_t *);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 #define AUTH_NONE      0               /* no authentication */
 #define        AUTH_NULL       0               /* backward compatibility */
index 39b533276b390aee7768bf6b7d22ad0318551cf0..77e169ddef10d3b2aceec4759e302b4eae0826cb 100644 (file)
@@ -114,17 +114,25 @@ struct authdes_verf {
  * Map a des credential into a unix cred.
  *
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern int authdes_getucred( struct authdes_cred *, uid_t *, gid_t *, int *, gid_t * );
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern bool_t  xdr_authdes_cred(XDR *, struct authdes_cred *);
 extern bool_t  xdr_authdes_verf(XDR *, struct authdes_verf *);
 extern int     rtime(dev_t, struct netbuf *, int, struct timeval *,
                    struct timeval *);
 extern void    kgetnetname(char *);
 extern enum auth_stat _svcauth_des(struct svc_req *, struct rpc_msg *);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 #endif /* ndef _TI_AUTH_DES_ */
index d6f2bbd2bf9e301ac9a7653e531ccc692bf788a7..a17b34b90311c7d8bfdf6fb4d0318ef8c8cee29c 100644 (file)
@@ -104,28 +104,29 @@ struct rpc_gss_init_res {
 #define MAXSEQ         0x80000000
 
 /* Prototypes. */
-__BEGIN_DECLS
-bool_t xdr_rpc_gss_cred        __P((XDR *xdrs, struct rpc_gss_cred *p));
-bool_t xdr_rpc_gss_init_args   __P((XDR *xdrs, gss_buffer_desc *p));
-bool_t xdr_rpc_gss_init_res    __P((XDR *xdrs, struct rpc_gss_init_res *p));
-bool_t xdr_rpc_gss_data        __P((XDR *xdrs, xdrproc_t xdr_func,
-                                    caddr_t xdr_ptr, gss_ctx_id_t ctx,
-                                    gss_qop_t qop, rpc_gss_svc_t svc,
-                                    u_int seq));
-
-AUTH   *authgss_create         __P((CLIENT *, gss_name_t,
-                                    struct rpc_gss_sec *));
-AUTH   *authgss_create_default __P((CLIENT *, char *, struct rpc_gss_sec *));
-bool_t authgss_service         __P((AUTH *auth, int svc));
-bool_t authgss_get_private_data        __P((AUTH *auth,
-                                    struct authgss_private_data *));
-bool_t authgss_free_private_data __P((struct authgss_private_data *));
-
-void   gss_log_debug           __P((const char *fmt, ...));
-void   gss_log_status          __P((char *m, OM_uint32 major,
-                                    OM_uint32 minor));
-void   gss_log_hexdump         __P((const u_char *buf, int len, int offset));
-
-__END_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
+bool_t xdr_rpc_gss_cred        (XDR *xdrs, struct rpc_gss_cred *p);
+bool_t xdr_rpc_gss_init_args   (XDR *xdrs, gss_buffer_desc *p);
+bool_t xdr_rpc_gss_init_res    (XDR *xdrs, struct rpc_gss_init_res *p);
+bool_t xdr_rpc_gss_data        (XDR *xdrs, xdrproc_t xdr_func,
+                                caddr_t xdr_ptr, gss_ctx_id_t ctx,
+                                gss_qop_t qop, rpc_gss_svc_t svc,
+                                u_int seq);
+
+AUTH   *authgss_create         (CLIENT *, gss_name_t, struct rpc_gss_sec *);
+AUTH   *authgss_create_default (CLIENT *, char *, struct rpc_gss_sec *);
+bool_t authgss_service         (AUTH *auth, int svc);
+bool_t authgss_get_private_data        (AUTH *auth, struct authgss_private_data *);
+bool_t authgss_free_private_data (struct authgss_private_data *);
+
+void   gss_log_debug           (const char *fmt, ...);
+void   gss_log_status          (char *m, OM_uint32 major, OM_uint32 minor);
+void   gss_log_hexdump         (const u_char *buf, int len, int offset);
+
+#ifdef __cplusplus
+}
+#endif
 
 #endif /* !_TIRPC_AUTH_GSS_H */
index 602889b4b6c3b46402b165e9d10f5bb561396189..b10e71d41ce705d27817f0ef0931eae2d5b022c9 100644 (file)
@@ -45,7 +45,6 @@
 
 #ifndef _TIRPC_AUTH_UNIX_H
 #define _TIRPC_AUTH_UNIX_H
-#include <sys/cdefs.h>
 
 /* The machine name is part of a credential; it may not exceed 255 bytes */
 #define MAX_MACHINE_NAME 255
@@ -67,9 +66,13 @@ struct authunix_parms {
 
 #define authsys_parms authunix_parms
 
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern bool_t xdr_authunix_parms(XDR *, struct authunix_parms *);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 /*
  * If a response verifier has flavor AUTH_SHORT,
index 9ee619e09695c53d7e55c57c9622d5aae87c7162..05f2215aa1afb95f337e6b4f72811f9e1516ed73 100644 (file)
@@ -42,7 +42,6 @@
 #include <rpc/clnt_stat.h>
 #include <rpc/auth.h>
 
-#include <sys/cdefs.h>
 #include <netconfig.h>
 #include <sys/un.h>
 
@@ -267,7 +266,9 @@ struct rpc_timers {
  * Generic client creation routine. Supported protocols are those that
  * belong to the nettype namespace (/etc/netconfig).
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern CLIENT *clnt_create(const char *, const rpcprog_t, const rpcvers_t,
                           const char *);
 /*
@@ -414,32 +415,46 @@ extern CLIENT *clnt_dg_create(const int, const struct netbuf *,
  */
 extern CLIENT *clnt_raw_create(rpcprog_t, rpcvers_t);
 
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 
 /*
  * Print why creation failed
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern void clnt_pcreateerror(const char *);                   /* stderr */
 extern char *clnt_spcreateerror(const char *);                 /* string */
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 /*
  * Like clnt_perror(), but is more verbose in its output
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern void clnt_perrno(enum clnt_stat);               /* stderr */
 extern char *clnt_sperrno(enum clnt_stat);             /* string */
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 /*
  * Print an English error message, given the client error code
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern void clnt_perror(CLIENT *, const char *);               /* stderr */
 extern char *clnt_sperror(CLIENT *, const char *);             /* string */
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 
 /*
@@ -450,9 +465,13 @@ struct rpc_createerr {
        struct rpc_err cf_error; /* useful when cf_stat == RPC_PMAPFAILURE */
 };
 
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern struct rpc_createerr    *__rpc_createerr(void);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 #define get_rpc_createerr()    (*(__rpc_createerr()))
 #define rpc_createerr          (*(__rpc_createerr()))
 
@@ -469,12 +488,16 @@ __END_DECLS
  *     char *out;
  *     const char *nettype;
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern enum clnt_stat rpc_call(const char *, const rpcprog_t,
                               const rpcvers_t, const rpcproc_t,
                               const xdrproc_t, const char *,
                               const xdrproc_t, char *, const char *);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 /*
  * RPC broadcast interface
@@ -522,7 +545,9 @@ __END_DECLS
 
 typedef bool_t (*resultproc_t)(caddr_t, ...);
 
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern enum clnt_stat rpc_broadcast(const rpcprog_t, const rpcvers_t,
                                    const rpcproc_t, const xdrproc_t,
                                    caddr_t, const xdrproc_t, caddr_t,
@@ -532,7 +557,9 @@ extern enum clnt_stat rpc_broadcast_exp(const rpcprog_t, const rpcvers_t,
                                        caddr_t, const xdrproc_t, caddr_t,
                                        const resultproc_t, const int,
                                        const int, const char *);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 /* For backward compatibility */
 #include <rpc/clnt_soc.h>
index 82330a3041fb62f82ae3ef66a8973cb9c0121e78..6ec545c30ecbddedb6d64b1fb9978146fdd73dd8 100644 (file)
@@ -46,7 +46,6 @@
  * with TS-RPC.
  */
 
-#include <sys/cdefs.h>
 
 #define UDPMSGSIZE      8800    /* rpc imposed limit on udp msg size */  
 
  *     u_int sendsz;
  *     u_int recvsz;
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern CLIENT *clnttcp_create(struct sockaddr_in *, u_long, u_long, int *,
                              u_int, u_int);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 /*
  * Raw (memory) rpc.
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern CLIENT *clntraw_create(u_long, u_long);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 
 /*
 IPv6 socket version 
 */
 #ifdef INET6
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern CLIENT *clnttcp6_create(struct sockaddr_in6 *, u_long, u_long, int *,
                              u_int, u_int);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 #endif
 
 /*
@@ -105,7 +116,9 @@ __END_DECLS
  *     u_int sendsz;
  *     u_int recvsz;
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern CLIENT *clntudp_create(struct sockaddr_in *, u_long, u_long, 
                              struct timeval, int *);
 extern CLIENT *clntudp_bufcreate(struct sockaddr_in *, u_long, u_long,
@@ -116,7 +129,9 @@ extern CLIENT *clntudp6_create(struct sockaddr_in6 *, u_long, u_long,
 extern CLIENT *clntudp6_bufcreate(struct sockaddr_in6 *, u_long, u_long,
                                 struct timeval, int *, u_int, u_int);
 #endif
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 
 #endif /* _RPC_CLNT_SOC_H */
index 837088cb07530e7814e9698c59b6aba65554d495..2358960df9349c6293340eaad6855fb5ed820a64 100644 (file)
@@ -43,7 +43,6 @@
 #ifndef _DES_DES_CRYPT_H
 #define _DES_DES_CRYPT_H
 
-#include <sys/cdefs.h>
 #include <rpc/rpc.h>
 
 #define DES_MAXDATA 8192       /* max bytes encrypted in one call */
 /*
  * Cipher Block Chaining mode
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 int cbc_crypt( char *, char *, unsigned int, unsigned int, char *);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 /*
  * Electronic Code Book mode
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 int ecb_crypt( char *, char *, unsigned int, unsigned int );
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 /* 
  * Set des parity for a key.
  * DES parity is odd and in the low bit of each byte
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 void des_setparity( char *);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 #endif  /* _DES_DES_CRYPT_H */
index 92063c6bf011533496420c540a2cab4b522f88c0..926797a0792f0c802167391984f2fac8cd3b4dba 100644 (file)
 #define        _RPC_TCP        7
 #define        _RPC_UDP        8
 
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern void *__rpc_setconf(const char *);
 extern void __rpc_endconf(void *);
 extern struct netconfig *__rpc_getconf(void *);
 extern struct netconfig *__rpc_getconfip(const char *);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 #endif /* !_TIRPC_NETTYPE_H */
index 0d2390804ab0caaa620a6011681dcddc404282e7..6abd58381df5bef40698a801a3451a1b0518dff8 100644 (file)
 
 #ifndef _RPC_PMAP_CLNT_H_
 #define _RPC_PMAP_CLNT_H_
-#include <sys/cdefs.h>
 
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern bool_t          pmap_set(u_long, u_long, int, int);
 extern bool_t          pmap_unset(u_long, u_long);
 extern struct pmaplist *pmap_getmaps(struct sockaddr_in *);
@@ -80,6 +81,8 @@ extern enum clnt_stat clnt_broadcast(u_long, u_long, u_long,
                                       resultproc_t);
 extern u_short         pmap_getport(struct sockaddr_in *,
                                     u_long, u_long, u_int);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 #endif /* !_RPC_PMAP_CLNT_H_ */
index c1a25467f18d87a245ae1de8e08ed7855f7ee2c0..75354ce54cf2914eee0d0c7f8d507bdb6b68eeba 100644 (file)
@@ -71,7 +71,6 @@
 
 #ifndef _RPC_PMAP_PROT_H
 #define _RPC_PMAP_PROT_H
-#include <sys/cdefs.h>
 
 #define PMAPPORT               ((u_short)111)
 #define PMAPPROG               ((u_long)100000)
@@ -97,10 +96,14 @@ struct pmaplist {
        struct pmaplist *pml_next;
 };
 
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern bool_t xdr_pmap(XDR *, struct pmap *);
 extern bool_t xdr_pmaplist(XDR *, struct pmaplist **);
 extern bool_t xdr_pmaplist_ptr(XDR *, struct pmaplist *);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 #endif /* !_RPC_PMAP_PROT_H */
index dd59a15b90c47dd75119196dc6be4f6186304835..2a385e75c731ca34d8588649e8858bc57be120ad 100644 (file)
@@ -41,7 +41,6 @@
 
 #ifndef _RPC_PMAP_RMT_H
 #define _RPC_PMAP_RMT_H
-#include <sys/cdefs.h>
 
 struct rmtcallargs {
        u_long prog, vers, proc, arglen;
@@ -56,9 +55,13 @@ struct rmtcallres {
        xdrproc_t xdr_results;
 };
 
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern bool_t xdr_rmtcall_args(XDR *, struct rmtcallargs *);
 extern bool_t xdr_rmtcallres(XDR *, struct rmtcallres *);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 #endif /* !_RPC_PMAP_RMT_H */
index 6c0222eb810725ed44ed7b1045d3e815fc7acf83..fac2fa9a36802b8495d307b8b36170577840b3a3 100644 (file)
 #define UDPMSGSIZE 8800
 #endif
 
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern int get_myaddress(struct sockaddr_in *);
-extern int bindresvport(int, struct sockaddr_in *) __THROW;
+extern int bindresvport(int, struct sockaddr_in *);
 extern int registerrpc(int, int, int, char *(*)(char [UDPMSGSIZE]),
     xdrproc_t, xdrproc_t);
 extern int callrpc(const char *, int, int, int, xdrproc_t, void *,
@@ -93,18 +95,24 @@ struct netbuf *uaddr2taddr(const struct netconfig *, const char *);
 
 struct sockaddr;
 extern int bindresvport_sa(int, struct sockaddr *);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 /*
  * The following are not exported interfaces, they are for internal library
  * and rpcbind use only. Do not use, they may change without notice.
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 int __rpc_nconf2fd(const struct netconfig *);
 int __rpc_nconf2fd_flags(const struct netconfig *, int);
 int __rpc_nconf2sockinfo(const struct netconfig *, struct __rpc_sockinfo *);
 int __rpc_fd2sockinfo(int, struct __rpc_sockinfo *);
 u_int __rpc_get_t_size(int, int, int);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 #endif /* !_RPC_RPC_H */
index cb3bbbb7a7b22a8b61d3a635263961a18519a349..236fcee696871555da9b3c204be943b834e45de8 100644 (file)
@@ -41,7 +41,6 @@
 #ifndef _RPC_RPCCOM_H
 #define        _RPC_RPCCOM_H
 
-#include <sys/cdefs.h>
 
 /* #pragma ident       "@(#)rpc_com.h  1.11    93/07/05 SMI" */
 
@@ -55,7 +54,9 @@
 #define __RPC_GETXID(now) ((u_int32_t)getpid() ^ (u_int32_t)(now)->tv_sec ^ \
     (u_int32_t)(now)->tv_usec)
 
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern u_int __rpc_get_a_size(int);
 extern int __rpc_dtbsize(void);
 extern int _rpc_dtablesize(void);
@@ -77,6 +78,8 @@ bool_t rpc_control(int,void *);
 
 char *_get_next_token(char *, int);
 
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 #endif /* _RPC_RPCCOM_H */
index 16d8eefec2f70fd42c1fb219257ec6f68b25b07b..f7aabd84d0c8c31e5286917ea1d495140a3f692f 100644 (file)
@@ -161,7 +161,9 @@ struct rpc_msg {
 #define        acpted_rply     ru.RM_rmb.ru.RP_ar
 #define        rjcted_rply     ru.RM_rmb.ru.RP_dr
 
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 /*
  * XDR routine to handle a rpc message.
  * xdr_callmsg(xdrs, cmsg)
@@ -210,6 +212,8 @@ extern bool_t       xdr_rejected_reply(XDR *, struct rejected_reply *);
  *     struct rpc_err *error;
  */
 extern void    _seterr_reply(struct rpc_msg *, struct rpc_err *);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 #endif /* !_TIRPC_RPC_MSG_H */
index 7e64f8f1d2a99a46ce3a3fb730e0eb5960f990d9..86d81f6395523a250745534128be40f6602cd13e 100644 (file)
@@ -59,7 +59,9 @@
 
 #include <rpc/types.h>
 #include <rpc/rpcb_prot.h>
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern bool_t rpcb_set(const rpcprog_t, const rpcvers_t,
                       const struct netconfig  *, const struct netbuf *);
 extern bool_t rpcb_unset(const rpcprog_t, const rpcvers_t,
@@ -78,6 +80,8 @@ extern bool_t rpcb_getaddr(const rpcprog_t, const rpcvers_t,
 extern bool_t rpcb_gettime(const char *, time_t *);
 extern char *rpcb_taddr2uaddr(struct netconfig *, struct netbuf *);
 extern struct netbuf *rpcb_uaddr2taddr(struct netconfig *, char *);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 #endif /* !_RPC_RPCB_CLNT_H */
index c865e518654ad0e58bca04f25554336b7f18e52c..6619cd39fa28a501212f63159ab0aa86fa40e40a 100644 (file)
@@ -44,7 +44,9 @@
 /*     #pragma ident "@(#)rpcent.h   1.13    94/04/25 SMI"     */
 /*      @(#)rpcent.h 1.1 88/12/06 SMI   */
 
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 /* These are defined in /usr/include/rpc/netdb.h */
 #if 0
@@ -60,8 +62,10 @@ extern struct rpcent *getrpcbynumber(int);
 extern struct rpcent *getrpcent(void);
 #endif
 
-extern void setrpcent(int) __THROW;
-extern void endrpcent(void) __THROW;
-__END_DECLS
+extern void setrpcent(int);
+extern void endrpcent(void);
+#ifdef __cplusplus
+}
+#endif
 
 #endif /* !_RPC_CENT_H */
index b9691a822b533794645d8326939c0299a35ee237..8273c95f36bba993bbba8088b06f751e4d8a8997 100644 (file)
@@ -40,7 +40,6 @@
 
 #ifndef _TIRPC_SVC_H
 #define _TIRPC_SVC_H
-#include <sys/cdefs.h>
 
 /*
  * This interface must manage two items concerning remote procedure calling:
@@ -200,11 +199,15 @@ struct svc_req {
  *     const struct netconfig *nconf;
  */
 
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern bool_t  svc_reg(SVCXPRT *, const rpcprog_t, const rpcvers_t,
                        void (*)(struct svc_req *, SVCXPRT *),
                        const struct netconfig *);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 /*
  * Service un-registration
@@ -214,9 +217,13 @@ __END_DECLS
  *     const rpcvers_t vers;
  */
 
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern void    svc_unreg(const rpcprog_t, const rpcvers_t);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 /*
  * Transport registration.
@@ -224,9 +231,13 @@ __END_DECLS
  * xprt_register(xprt)
  *     SVCXPRT *xprt;
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern void    xprt_register(SVCXPRT *);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 /*
  * Transport un-register
@@ -234,9 +245,13 @@ __END_DECLS
  * xprt_unregister(xprt)
  *     SVCXPRT *xprt;
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern void    xprt_unregister(SVCXPRT *);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 
 /*
@@ -265,7 +280,9 @@ __END_DECLS
  * deadlock the caller and server processes!
  */
 
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern bool_t  svc_sendreply(SVCXPRT *, xdrproc_t, void *);
 extern void    svcerr_decode(SVCXPRT *);
 extern void    svcerr_weakauth(SVCXPRT *);
@@ -277,7 +294,9 @@ extern void svcerr_systemerr(SVCXPRT *);
 extern int     rpc_reg(rpcprog_t, rpcvers_t, rpcproc_t,
                        char *(*)(char *), xdrproc_t, xdrproc_t,
                        char *);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 /*
  * Lowest level dispatching -OR- who owns this process anyway.
@@ -306,11 +325,17 @@ extern int svc_fds;
  * a small program implemented by the svc_rpc implementation itself;
  * also see clnt.h for protocol numbers.
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern void rpctest_service(void);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern void    svc_getreq(int);
 extern void    svc_getreqset(fd_set *);
 extern void    svc_getreq_common(int);
@@ -319,7 +344,9 @@ extern void svc_getreq_poll(struct pollfd *, int);
 
 extern void    svc_run(void);
 extern void    svc_exit(void);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 /*
  * Socket to use on svcxxx_create call to get default socket
@@ -331,7 +358,9 @@ __END_DECLS
  * These are the existing service side transport implementations
  */
 
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 /*
  * Transport independent svc_create routine.
  */
@@ -427,7 +456,9 @@ int svc_dg_enablecache(SVCXPRT *, const u_int);
 
 int __rpc_get_local_uid(SVCXPRT *_transp, uid_t *_uid);
 
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 
 /* for backward compatibility */
index 723c989996f97fdb50ac76788975f668aac2f8af..67608d06147eb338e18756a192c9fdde1cbe3f00 100644 (file)
@@ -65,13 +65,17 @@ typedef struct SVCAUTH {
 /*
  * Server side authenticator
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern enum auth_stat _gss_authenticate(struct svc_req *, struct rpc_msg *,
                bool_t *);
 extern enum auth_stat _authenticate(struct svc_req *, struct rpc_msg *);
 extern int svc_auth_reg(int, enum auth_stat (*)(struct svc_req *,
                          struct rpc_msg *));
 
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 #endif /* !_RPC_SVC_AUTH_H */
index 6148d7b4e5790fae1647e1c8242400bf7ce3dec0..9b7befa9d203c32544ddfd86f15d5d2fbdbe10ff 100644 (file)
@@ -38,7 +38,6 @@
 
 #ifndef _RPC_SVC_SOC_H
 #define _RPC_SVC_SOC_H
-#include <sys/cdefs.h>
 
 /* #pragma ident   "@(#)svc_soc.h  1.11    94/04/25 SMI" */
 /*      svc_soc.h 1.8 89/05/01 SMI      */
  *     void (*dispatch)();
  *     int protocol;    like TCP or UDP, zero means do not register 
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern bool_t  svc_register(SVCXPRT *, u_long, u_long,
                    void (*)(struct svc_req *, SVCXPRT *), int);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 /*
  * Service un-registration
@@ -76,44 +79,64 @@ __END_DECLS
  *     u_long prog;
  *     u_long vers;
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern void    svc_unregister(u_long, u_long);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 
 /*
  * Memory based rpc for testing and timing.
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern SVCXPRT *svcraw_create(void);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 
 /*
  * Udp based rpc.
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern SVCXPRT *svcudp_create(int);
 extern SVCXPRT *svcudp_bufcreate(int, u_int, u_int);
 extern int svcudp_enablecache(SVCXPRT *, u_long);
 extern SVCXPRT *svcudp6_create(int);
 extern SVCXPRT *svcudp6_bufcreate(int, u_int, u_int);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 
 /*
  * Tcp based rpc.
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern SVCXPRT *svctcp_create(int, u_int, u_int);
 extern SVCXPRT *svctcp6_create(int, u_int, u_int);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 /*
  * Fd based rpc.
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern SVCXPRT *svcfd_create(int, u_int, u_int);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 #endif /* !_RPC_SVC_SOC_H */
index 613fab055da3392412ae33ee9dd41fc74861dc61..917c06761d65bf0c3ab91fad4e085bc4abb33d23 100644 (file)
@@ -40,7 +40,6 @@
 
 #ifndef _TIRPC_XDR_H
 #define _TIRPC_XDR_H
-#include <sys/cdefs.h>
 #include <stdio.h>
 #include <netinet/in.h>
 
@@ -287,7 +286,9 @@ struct xdr_discrim {
 /*
  * These are the "generic" xdr routines.
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 extern bool_t  xdr_void(void);
 extern bool_t  xdr_int(XDR *, int *);
 extern bool_t  xdr_u_int(XDR *, u_int *);
@@ -330,7 +331,9 @@ extern bool_t       xdr_hyper(XDR *, quad_t *);
 extern bool_t  xdr_u_hyper(XDR *, u_quad_t *);
 extern bool_t  xdr_longlong_t(XDR *, quad_t *);
 extern bool_t  xdr_u_longlong_t(XDR *, u_quad_t *);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 /*
  * Common opaque bytes objects used by many rpc protocols;
@@ -348,7 +351,9 @@ extern bool_t   xdr_netobj(XDR *, struct netobj *);
  * These are the public routines for the various implementations of
  * xdr streams.
  */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 /* XDR using memory buffers */
 extern void   xdrmem_create(XDR *, char *, u_int, enum xdr_op);
 
@@ -369,6 +374,8 @@ extern bool_t xdrrec_skiprecord(XDR *);
 /* true if no more input */
 extern bool_t xdrrec_eof(XDR *);
 extern u_int xdrrec_readbytes(XDR *, caddr_t, u_int);
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
 
 #endif /* !_TIRPC_XDR_H */