Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Sep 2012 22:23:24 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r240062 - head/include/rpc
Message-ID:  <201209022223.q82MNOQr078013@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pfg
Date: Sun Sep  2 22:23:23 2012
New Revision: 240062
URL: http://svn.freebsd.org/changeset/base/240062

Log:
  Revert	r240060: (Partial)
  
  __BEGIN_DECLS and __END_DECLS in cdefs.h take care of the
  __cplusplus mangling issues so most of the definitions
  were redundant.
  
  In the few places where they were not redundant we should
  use BSD style instead of the guards used upstream.
  
  Reported by:	Yuri Pankov

Modified:
  head/include/rpc/auth.h
  head/include/rpc/auth_unix.h
  head/include/rpc/clnt.h
  head/include/rpc/clnt_soc.h
  head/include/rpc/des_crypt.h
  head/include/rpc/nettype.h
  head/include/rpc/pmap_clnt.h
  head/include/rpc/pmap_rmt.h
  head/include/rpc/rpc_com.h
  head/include/rpc/rpc_msg.h
  head/include/rpc/rpcb_clnt.h
  head/include/rpc/rpcent.h
  head/include/rpc/rpcsec_gss.h
  head/include/rpc/svc.h
  head/include/rpc/svc_soc.h
  head/include/rpc/xdr.h

Modified: head/include/rpc/auth.h
==============================================================================
--- head/include/rpc/auth.h	Sun Sep  2 21:44:24 2012	(r240061)
+++ head/include/rpc/auth.h	Sun Sep  2 22:23:23 2012	(r240062)
@@ -51,10 +51,6 @@
 #include <sys/cdefs.h>
 #include <sys/socket.h>
 
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
 #define MAX_AUTH_BYTES	400
 #define MAXNETNAMELEN	255	/* maximum length of network user's name */
 
@@ -370,8 +366,4 @@ __END_DECLS
 #define	RPCSEC_GSS_KRB5I	390004
 #define	RPCSEC_GSS_KRB5P	390005
 
-#ifdef	__cplusplus
-}
-#endif
-
 #endif /* !_RPC_AUTH_H */

Modified: head/include/rpc/auth_unix.h
==============================================================================
--- head/include/rpc/auth_unix.h	Sun Sep  2 21:44:24 2012	(r240061)
+++ head/include/rpc/auth_unix.h	Sun Sep  2 22:23:23 2012	(r240062)
@@ -48,10 +48,6 @@
 #define _RPC_AUTH_UNIX_H
 #include <sys/cdefs.h>
 
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
 /* The machine name is part of a credential; it may not exceed 255 bytes */
 #define MAX_MACHINE_NAME 255
 
@@ -85,8 +81,4 @@ struct short_hand_verf {
 	struct opaque_auth new_cred;
 };
 
-#ifdef	__cplusplus
-}
-#endif
-
 #endif /* !_RPC_AUTH_UNIX_H */

Modified: head/include/rpc/clnt.h
==============================================================================
--- head/include/rpc/clnt.h	Sun Sep  2 21:44:24 2012	(r240061)
+++ head/include/rpc/clnt.h	Sun Sep  2 22:23:23 2012	(r240062)
@@ -64,10 +64,6 @@
 #include <netconfig.h>
 #include <sys/un.h>
 
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
 /*
  * Well-known IPV6 RPC broadcast address.
  */
@@ -555,10 +551,6 @@ extern enum clnt_stat rpc_broadcast_exp(
 					const int, const char *);
 __END_DECLS
 
-#ifdef	__cplusplus
-}
-#endif
-
 /* For backward compatibility */
 #include <rpc/clnt_soc.h>
 

Modified: head/include/rpc/clnt_soc.h
==============================================================================
--- head/include/rpc/clnt_soc.h	Sun Sep  2 21:44:24 2012	(r240061)
+++ head/include/rpc/clnt_soc.h	Sun Sep  2 22:23:23 2012	(r240062)
@@ -49,10 +49,6 @@
 
 #include <sys/cdefs.h>
 
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
 #define UDPMSGSIZE      8800    /* rpc imposed limit on udp msg size */  
 
 /*
@@ -107,8 +103,4 @@ extern CLIENT *clntudp_bufcreate(struct 
 				 struct timeval, int *, u_int, u_int);
 __END_DECLS
 
-#ifdef	__cplusplus
-}
-#endif
-
 #endif /* _RPC_CLNT_SOC_H */

Modified: head/include/rpc/des_crypt.h
==============================================================================
--- head/include/rpc/des_crypt.h	Sun Sep  2 21:44:24 2012	(r240061)
+++ head/include/rpc/des_crypt.h	Sun Sep  2 22:23:23 2012	(r240062)
@@ -47,10 +47,6 @@
 #include <sys/cdefs.h>
 #include <rpc/rpc.h>
 
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
 #define DES_MAXDATA 8192	/* max bytes encrypted in one call */
 #define DES_DIRMASK (1 << 0)
 #define DES_ENCRYPT (0*DES_DIRMASK)	/* Encrypt */
@@ -107,8 +103,4 @@ __BEGIN_DECLS
 void des_setparity( char *);
 __END_DECLS
 
-#ifdef	__cplusplus
-}
-#endif
-
 #endif  /* _DES_DES_CRYPT_H */

Modified: head/include/rpc/nettype.h
==============================================================================
--- head/include/rpc/nettype.h	Sun Sep  2 21:44:24 2012	(r240061)
+++ head/include/rpc/nettype.h	Sun Sep  2 22:23:23 2012	(r240062)
@@ -44,10 +44,6 @@
 
 #include <netconfig.h>
 
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
 #define	_RPC_NONE	0
 #define	_RPC_NETPATH	1
 #define	_RPC_VISIBLE	2
@@ -65,8 +61,4 @@ extern struct netconfig *__rpc_getconf(v
 extern struct netconfig *__rpc_getconfip(const char *);
 __END_DECLS
 
-#ifdef	__cplusplus
-}
-#endif
-
 #endif	/* !_RPC_NETTYPE_H */

Modified: head/include/rpc/pmap_clnt.h
==============================================================================
--- head/include/rpc/pmap_clnt.h	Sun Sep  2 21:44:24 2012	(r240061)
+++ head/include/rpc/pmap_clnt.h	Sun Sep  2 22:23:23 2012	(r240062)
@@ -66,10 +66,6 @@
 #define _RPC_PMAP_CLNT_H_
 #include <sys/cdefs.h>
 
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
 __BEGIN_DECLS
 extern bool_t		pmap_set(u_long, u_long, int, int);
 extern bool_t		pmap_unset(u_long, u_long);
@@ -87,8 +83,4 @@ extern u_short		pmap_getport(struct sock
 				     u_long, u_long, u_int);
 __END_DECLS
 
-#ifdef	__cplusplus
-}
-#endif
-
 #endif /* !_RPC_PMAP_CLNT_H_ */

Modified: head/include/rpc/pmap_rmt.h
==============================================================================
--- head/include/rpc/pmap_rmt.h	Sun Sep  2 21:44:24 2012	(r240061)
+++ head/include/rpc/pmap_rmt.h	Sun Sep  2 22:23:23 2012	(r240062)
@@ -44,10 +44,6 @@
 #define _RPC_PMAP_RMT_H
 #include <sys/cdefs.h>
 
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
 struct rmtcallargs {
 	u_long prog, vers, proc, arglen;
 	caddr_t args_ptr;
@@ -66,8 +62,4 @@ extern bool_t xdr_rmtcall_args(XDR *, st
 extern bool_t xdr_rmtcallres(XDR *, struct rmtcallres *);
 __END_DECLS
 
-#ifdef	__cplusplus
-}
-#endif
-
 #endif /* !_RPC_PMAP_RMT_H */

Modified: head/include/rpc/rpc_com.h
==============================================================================
--- head/include/rpc/rpc_com.h	Sun Sep  2 21:44:24 2012	(r240061)
+++ head/include/rpc/rpc_com.h	Sun Sep  2 22:23:23 2012	(r240062)
@@ -42,13 +42,9 @@
 #ifndef _RPC_RPCCOM_H
 #define	_RPC_RPCCOM_H
 
-/* #pragma ident	"@(#)rpc_com.h	1.11	93/07/05 SMI" */
-
 #include <sys/cdefs.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+/* #pragma ident	"@(#)rpc_com.h	1.11	93/07/05 SMI" */
 
 /*
  * The max size of the transport, if the size cannot be determined
@@ -84,8 +80,4 @@ char *_get_next_token(char *, int);
 
 __END_DECLS
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* _RPC_RPCCOM_H */

Modified: head/include/rpc/rpc_msg.h
==============================================================================
--- head/include/rpc/rpc_msg.h	Sun Sep  2 21:44:24 2012	(r240061)
+++ head/include/rpc/rpc_msg.h	Sun Sep  2 22:23:23 2012	(r240062)
@@ -43,10 +43,6 @@
 #ifndef _RPC_RPC_MSG_H
 #define _RPC_RPC_MSG_H
 
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
 #define RPC_MSG_VERSION		((u_int32_t) 2)
 #define RPC_SERVICE_PORT	((u_short) 2048)
 
@@ -215,8 +211,4 @@ extern bool_t	xdr_rejected_reply(XDR *, 
 extern void	_seterr_reply(struct rpc_msg *, struct rpc_err *);
 __END_DECLS
 
-#ifdef	__cplusplus
-}
-#endif
-
 #endif /* !_RPC_RPC_MSG_H */

Modified: head/include/rpc/rpcb_clnt.h
==============================================================================
--- head/include/rpc/rpcb_clnt.h	Sun Sep  2 21:44:24 2012	(r240061)
+++ head/include/rpc/rpcb_clnt.h	Sun Sep  2 22:23:23 2012	(r240062)
@@ -61,10 +61,6 @@
 #include <rpc/types.h>
 #include <rpc/rpcb_prot.h>
 
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
 __BEGIN_DECLS
 extern bool_t rpcb_set(const rpcprog_t, const rpcvers_t,
 		       const struct netconfig  *, const struct netbuf *);
@@ -86,8 +82,4 @@ extern char *rpcb_taddr2uaddr(struct net
 extern struct netbuf *rpcb_uaddr2taddr(struct netconfig *, char *);
 __END_DECLS
 
-#ifdef	__cplusplus
-}
-#endif
-
 #endif	/* !_RPC_RPCB_CLNT_H */

Modified: head/include/rpc/rpcent.h
==============================================================================
--- head/include/rpc/rpcent.h	Sun Sep  2 21:44:24 2012	(r240061)
+++ head/include/rpc/rpcent.h	Sun Sep  2 22:23:23 2012	(r240062)
@@ -45,9 +45,6 @@
 /*	#pragma ident "@(#)rpcent.h   1.13    94/04/25 SMI"	*/
 /*      @(#)rpcent.h 1.1 88/12/06 SMI   */
 
-#ifdef	__cplusplus
-extern "C" {
-#endif
 
 struct rpcent {
       char    *r_name;        /* name of server for this rpc program */
@@ -67,8 +64,4 @@ extern void setrpcent(int);
 extern void endrpcent(void);
 __END_DECLS
 
-#ifdef	__cplusplus
-}
-#endif
-
 #endif /* !_RPC_CENT_H */

Modified: head/include/rpc/rpcsec_gss.h
==============================================================================
--- head/include/rpc/rpcsec_gss.h	Sun Sep  2 21:44:24 2012	(r240061)
+++ head/include/rpc/rpcsec_gss.h	Sun Sep  2 22:23:23 2012	(r240062)
@@ -29,10 +29,6 @@
 #ifndef _RPCSEC_GSS_H
 #define _RPCSEC_GSS_H
 
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
 #include <gssapi/gssapi.h>
 
 #ifndef MAX_GSS_MECH
@@ -180,8 +176,4 @@ bool_t __rpc_gss_set_error(int rpc_gss_e
 
 __END_DECLS
 
-#ifdef	__cplusplus
-}
-#endif
-
 #endif /* !_RPCSEC_GSS_H */

Modified: head/include/rpc/svc.h
==============================================================================
--- head/include/rpc/svc.h	Sun Sep  2 21:44:24 2012	(r240061)
+++ head/include/rpc/svc.h	Sun Sep  2 22:23:23 2012	(r240062)
@@ -65,10 +65,6 @@
  * parameters, struct svc_req * and SVCXPRT *, defined below.
  */
 
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
 /*
  *      Service control requests
  */
@@ -471,9 +467,6 @@ int __rpc_get_local_uid(SVCXPRT *_transp
 
 __END_DECLS
 
-#ifdef	__cplusplus
-}
-#endif
 
 /* for backward compatibility */
 #include <rpc/svc_soc.h>

Modified: head/include/rpc/svc_soc.h
==============================================================================
--- head/include/rpc/svc_soc.h	Sun Sep  2 21:44:24 2012	(r240061)
+++ head/include/rpc/svc_soc.h	Sun Sep  2 22:23:23 2012	(r240062)
@@ -49,10 +49,6 @@
  * with TS-RPC
  */
 
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
 /*
  *  Approved way of getting address of caller
  */
@@ -117,8 +113,4 @@ __BEGIN_DECLS
 extern SVCXPRT *svcfd_create(int, u_int, u_int);
 __END_DECLS
 
-#ifdef	__cplusplus
-}
-#endif
-
 #endif /* !_RPC_SVC_SOC_H */

Modified: head/include/rpc/xdr.h
==============================================================================
--- head/include/rpc/xdr.h	Sun Sep  2 21:44:24 2012	(r240061)
+++ head/include/rpc/xdr.h	Sun Sep  2 22:23:23 2012	(r240062)
@@ -43,10 +43,6 @@
 #define _RPC_XDR_H
 #include <sys/cdefs.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*
  * XDR provides a conventional way for converting between C data
  * types and an external bit-string representation.  Library supplied
@@ -370,8 +366,4 @@ extern bool_t xdrrec_eof(XDR *);
 extern u_int xdrrec_readbytes(XDR *, caddr_t, u_int);
 __END_DECLS
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* !_RPC_XDR_H */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209022223.q82MNOQr078013>