X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=include%2Flibnfs-private.h;h=07ce9a8f96b2b9d3edf355cbbc56cb0a4994cee5;hb=2449d3f787d5a95e7cd19a0a9c95fd24ade60e3d;hp=a2f3e1a2a09bc8cebba77132ba1f8bdc6850c1d7;hpb=6d89ace041388b1770167eb473ac539ae74f37db;p=deb_libnfs.git diff --git a/include/libnfs-private.h b/include/libnfs-private.h index a2f3e1a..07ce9a8 100644 --- a/include/libnfs-private.h +++ b/include/libnfs-private.h @@ -14,6 +14,10 @@ You should have received a copy of the GNU Lesser General Public License along with this program; if not, see . */ + +#ifndef _LIBNFS_PRIVATE_H_ +#define _LIBNFS_PRIVATE_H_ + #ifdef HAVE_CONFIG_H #include "config.h" /* HAVE_SOCKADDR_STORAGE ? */ #endif @@ -24,6 +28,9 @@ #include "libnfs-zdr.h" +#ifdef __cplusplus +extern "C" { +#endif #if !defined(HAVE_SOCKADDR_STORAGE) && !defined(WIN32) /* @@ -94,7 +101,7 @@ struct rpc_context { /* fragment reassembly */ struct rpc_fragment *fragments; - + /* parameters passable via URL */ int tcp_syncnt; int uid; @@ -126,8 +133,17 @@ int rpc_get_pdu_size(char *buf); int rpc_process_pdu(struct rpc_context *rpc, char *buf, int size); void rpc_error_all_pdus(struct rpc_context *rpc, char *error); -void rpc_set_error(struct rpc_context *rpc, char *error_string, ...); -void nfs_set_error(struct nfs_context *nfs, char *error_string, ...); +void rpc_set_error(struct rpc_context *rpc, char *error_string, ...) +#ifdef __GNUC__ + __attribute__((format(printf, 2, 3))) +#endif +; + +void nfs_set_error(struct nfs_context *nfs, char *error_string, ...) +#ifdef __GNUC__ + __attribute__((format(printf, 2, 3))) +#endif +; const char *nfs_get_server(struct nfs_context *nfs); const char *nfs_get_export(struct nfs_context *nfs); @@ -149,3 +165,9 @@ int rpc_add_fragment(struct rpc_context *rpc, char *data, uint64_t size); void rpc_free_all_fragments(struct rpc_context *rpc); const struct nfs_fh3 *nfs_get_rootfh(struct nfs_context *nfs); + +#ifdef __cplusplus +} +#endif + +#endif /* !_LIBNFS_PRIVATE_H_ */