Commit f58bc315 authored by Dave Boutcher's avatar Dave Boutcher Committed by Jim Harris
Browse files

include: wrap header files in extern "C" for c++



Update all the header files in include/spdk to include
extern "C" declarations.

Change-Id: I43299f68e962d0df18c1b23fbbaa19bc924fcb96
Signed-off-by: default avatarDave Boutcher <dboutcher@ocient.com>
Reviewed-on: https://review.gerrithub.io/390896


Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: default avatarDariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent a7d816bf
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -44,6 +44,10 @@
#include "spdk/scsi_spec.h"
#include "spdk/nvme_spec.h"

#ifdef __cplusplus
extern "C" {
#endif

#define SPDK_BDEV_SMALL_BUF_MAX_SIZE 8192
#define SPDK_BDEV_LARGE_BUF_MAX_SIZE (64 * 1024)

@@ -751,4 +755,8 @@ void spdk_bdev_io_get_scsi_status(const struct spdk_bdev_io *bdev_io,
 */
void spdk_bdev_io_get_iovec(struct spdk_bdev_io *bdev_io, struct iovec **iovp, int *iovcntp);

#ifdef __cplusplus
}
#endif

#endif /* SPDK_BDEV_H_ */
+8 −0
Original line number Diff line number Diff line
@@ -68,6 +68,10 @@

#include "spdk/stdinc.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef uint64_t spdk_blob_id;
#define SPDK_BLOBID_INVALID	(uint64_t)-1
#define SPDK_BLOBSTORE_TYPE_LENGTH 16
@@ -305,4 +309,8 @@ void spdk_xattr_names_free(struct spdk_xattr_names *names);
struct spdk_bs_type spdk_bs_get_bstype(struct spdk_blob_store *bs);
void spdk_bs_set_bstype(struct spdk_blob_store *bs, struct spdk_bs_type bstype);

#ifdef __cplusplus
}
#endif

#endif /* SPDK_BLOB_H_ */
+8 −0
Original line number Diff line number Diff line
@@ -42,6 +42,10 @@

#include "spdk/blob.h"

#ifdef __cplusplus
extern "C" {
#endif

#define SPDK_FILE_NAME_MAX	255

struct spdk_file;
@@ -129,4 +133,8 @@ void spdk_file_set_priority(struct spdk_file *file, uint32_t priority);

int spdk_file_sync(struct spdk_file *file, struct spdk_io_channel *channel);

#ifdef __cplusplus
}
#endif

#endif /* SPDK_FS_H_ */
+8 −0
Original line number Diff line number Diff line
@@ -41,6 +41,10 @@

#include "spdk/stdinc.h"

#ifdef __cplusplus
extern "C" {
#endif

struct spdk_conf_value;
struct spdk_conf_item;
struct spdk_conf_section;
@@ -67,4 +71,8 @@ bool spdk_conf_section_get_boolval(struct spdk_conf_section *sp, const char *key

void spdk_conf_set_as_default(struct spdk_conf *cp);

#ifdef __cplusplus
}
#endif

#endif
+8 −0
Original line number Diff line number Diff line
@@ -40,6 +40,10 @@

#include "spdk/stdinc.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef void (*spdk_copy_completion_cb)(void *ref, int status);
typedef void (*spdk_copy_fini_cb)(void *cb_arg);

@@ -58,4 +62,8 @@ int spdk_copy_submit_fill(struct spdk_copy_task *copy_req, struct spdk_io_channe
			  void *dst, uint8_t fill, uint64_t nbytes, spdk_copy_completion_cb cb);
size_t spdk_copy_task_size(void);

#ifdef __cplusplus
}
#endif

#endif
Loading