diff options
Diffstat (limited to 'rpc/rpcl')
-rw-r--r-- | rpc/rpcl/Makefile.am | 22 | ||||
-rw-r--r-- | rpc/rpcl/block.x | 5 | ||||
-rw-r--r-- | rpc/rpcl/block_svc.h | 20 | ||||
-rw-r--r-- | rpc/rpcl/rpc-pragmas.h | 28 |
4 files changed, 75 insertions, 0 deletions
diff --git a/rpc/rpcl/Makefile.am b/rpc/rpcl/Makefile.am new file mode 100644 index 0000000..3aa6f0d --- /dev/null +++ b/rpc/rpcl/Makefile.am @@ -0,0 +1,22 @@ +libgbrpcxdr_la_SOURCES = block_clnt.c block_xdr.c block_svc.c + +noinst_LTLIBRARIES = libgbrpcxdr.la +noinst_HEADERS = block.h block_svc.h rpc-pragmas.h + +EXTRA_DIST = block.x +BUILT_SOURCES = block.h block_clnt.c block_svc.c block_xdr.c + +DISTCLEANFILES = Makefile.in $(BUILT_SOURCES) +CLEANFILES = *~ $(BUILT_SOURCES) + +block.h: block.x + rpcgen -h -o $(top_builddir)/rpc/rpcl/$@ $^ + +block_xdr.c: block.x + rpcgen -c -o $(top_builddir)/rpc/rpcl/$@ $^ + +block_clnt.c: block.x + rpcgen -l -o $(top_builddir)/rpc/rpcl/$@ $^ + +block_svc.c: block.x + rpcgen -m -o $(top_builddir)/rpc/rpcl/$@ $^ diff --git a/rpc/rpcl/block.x b/rpc/rpcl/block.x index e876ba4..4d840ff 100644 --- a/rpc/rpcl/block.x +++ b/rpc/rpcl/block.x @@ -1,3 +1,8 @@ +/* rpcgen generates code that results in unused-variable warnings */ +#ifdef RPC_XDR +%#include "rpc-pragmas.h" +#endif + struct blockCreate { char ipaddr[255]; char volume[255]; diff --git a/rpc/rpcl/block_svc.h b/rpc/rpcl/block_svc.h new file mode 100644 index 0000000..8d1a378 --- /dev/null +++ b/rpc/rpcl/block_svc.h @@ -0,0 +1,20 @@ +/* + Copyright (c) 2017 Red Hat, Inc. <http://www.redhat.com> + This file is part of gluster-block. + + This file is licensed to you under your choice of the GNU Lesser + General Public License, version 3 or any later version (LGPLv3 or + later), or the GNU General Public License, version 2 (GPLv2), in all + cases as published by the Free Software Foundation. +*/ + +# ifndef _BLOCK_SVC_H +# define _BLOCK_SVC_H + +void +gluster_block_cli_1(struct svc_req *rqstp, register SVCXPRT *transp); + +void +gluster_block_1(struct svc_req *rqstp, register SVCXPRT *transp); + +# endif /* _BLOCK_SVC_H */ diff --git a/rpc/rpcl/rpc-pragmas.h b/rpc/rpcl/rpc-pragmas.h new file mode 100644 index 0000000..91bd501 --- /dev/null +++ b/rpc/rpcl/rpc-pragmas.h @@ -0,0 +1,28 @@ +/* + Copyright (c) 2017 Red Hat, Inc. <http://www.redhat.com> + This file is part of gluster-block. + + This file is licensed to you under your choice of the GNU Lesser + General Public License, version 3 or any later version (LGPLv3 or + later), or the GNU General Public License, version 2 (GPLv2), in all + cases as published by the Free Software Foundation. +*/ + +#ifndef RPC_PRAGMAS_H +#define RPC_PRAGMAS_H + +#if defined(__GNUC__) +#if __GNUC__ >= 4 +#if !defined(__clang__) +#if !defined(__NetBSD__) +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif +#else +#pragma clang diagnostic ignored "-Wunused-variable" +#pragma clang diagnostic ignored "-Wunused-value" +#endif +#endif +#endif + +#endif /* RPC_PRAGMAS_H */ |