headers: add C++ wrappers (closes #136)
parent
b5da424ef7
commit
048deb95b3
|
@ -18,8 +18,16 @@
|
||||||
|
|
||||||
#include <libpkgconf/libpkgconf-api.h>
|
#include <libpkgconf/libpkgconf-api.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
PKGCONF_API extern size_t pkgconf_strlcpy(char *dst, const char *src, size_t siz);
|
PKGCONF_API extern size_t pkgconf_strlcpy(char *dst, const char *src, size_t siz);
|
||||||
PKGCONF_API extern size_t pkgconf_strlcat(char *dst, const char *src, size_t siz);
|
PKGCONF_API extern size_t pkgconf_strlcat(char *dst, const char *src, size_t siz);
|
||||||
PKGCONF_API extern char *pkgconf_strndup(const char *src, size_t len);
|
PKGCONF_API extern char *pkgconf_strndup(const char *src, size_t len);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -16,6 +16,10 @@
|
||||||
#ifndef PKGCONF__ITER_H
|
#ifndef PKGCONF__ITER_H
|
||||||
#define PKGCONF__ITER_H
|
#define PKGCONF__ITER_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct pkgconf_node_ pkgconf_node_t;
|
typedef struct pkgconf_node_ pkgconf_node_t;
|
||||||
|
|
||||||
struct pkgconf_node_ {
|
struct pkgconf_node_ {
|
||||||
|
@ -94,4 +98,8 @@ pkgconf_node_delete(pkgconf_node_t *node, pkgconf_list_t *list)
|
||||||
node->next->prev = node->prev;
|
node->next->prev = node->prev;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -21,6 +21,10 @@
|
||||||
#include <libpkgconf/bsdstubs.h>
|
#include <libpkgconf/bsdstubs.h>
|
||||||
#include <libpkgconf/libpkgconf-api.h>
|
#include <libpkgconf/libpkgconf-api.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/* pkg-config uses ';' on win32 as ':' is part of path */
|
/* pkg-config uses ';' on win32 as ':' is part of path */
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define PKG_CONFIG_PATH_SEP_S ";"
|
#define PKG_CONFIG_PATH_SEP_S ";"
|
||||||
|
@ -317,4 +321,8 @@ PKGCONF_API bool pkgconf_path_match_list(const char *path, const pkgconf_list_t
|
||||||
PKGCONF_API void pkgconf_path_free(pkgconf_list_t *dirlist);
|
PKGCONF_API void pkgconf_path_free(pkgconf_list_t *dirlist);
|
||||||
PKGCONF_API bool pkgconf_path_relocate(char *buf, size_t buflen);
|
PKGCONF_API bool pkgconf_path_relocate(char *buf, size_t buflen);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue