summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dc45cf5)
raw | patch | inline | side by side (parent: dc45cf5)
author | Sebastian Harl <sh@tokkee.org> | |
Sun, 11 Jan 2009 14:23:28 +0000 (15:23 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Sun, 11 Jan 2009 14:23:28 +0000 (15:23 +0100) |
These macros define an extern "C" block when using C++. This allows to use the
headers from C++ as well.
headers from C++ as well.
src/libcollectdclient/client.h | patch | blob | history | |
src/libcollectdclient/lcc_features.h.in | patch | blob | history |
index 41fe8d7a0d7ccdc772aa594a67ca848fe6ef9e55..d5371fb2a20f8f6a1c80b3401fefb0b69f02aeab 100644 (file)
#ifndef LIBCOLLECTD_COLLECTDCLIENT_H
#define LIBCOLLECTD_COLLECTDCLIENT_H 1
+#include "lcc_features.h"
+
/*
* Includes (for data types)
*/
#define LCC_TYPE_COUNTER 0
#define LCC_TYPE_GAUGE 1
+LCC_BEGIN_DECLS
+
typedef uint64_t counter_t;
typedef double gauge_t;
int lcc_string_to_identifier (lcc_connection_t *c,
lcc_identifier_t *ident, const char *string);
+LCC_END_DECLS
+
/* vim: set sw=2 sts=2 et : */
#endif /* LIBCOLLECTD_COLLECTDCLIENT_H */
index 844e6012c1019c5666799b859c18cfad3dea429b..3916a179ea71ea9a618891d04674e2d1b58a85fd 100644 (file)
#ifndef LIBCOLLECTD_LCC_FEATURES_H
#define LIBCOLLECTD_LCC_FEATURES_H 1
+#ifdef __cplusplus
+# define LCC_BEGIN_DECLS extern "C" {
+# define LCC_END_DECLS }
+#else
+# define LCC_BEGIN_DECLS
+# define LCC_END_DECLS
+#endif
+
#define LCC_API_VERSION 0
#define LCC_VERSION_MAJOR @LCC_VERSION_MAJOR@
#define LCC_VERSION \
LCC_VERSION_ENCODE(LCC_VERSION_MAJOR, LCC_VERSION_MINOR, LCC_VERSION_PATCH)
+LCC_BEGIN_DECLS
+
unsigned int lcc_version (void);
const char *lcc_version_string (void);
const char *lcc_version_extra (void);
+LCC_END_DECLS
+
#endif /* ! LIBCOLLECTD_LCC_FEATURES_H */
/* vim: set sw=4 ts=4 tw=78 noexpandtab : */