api: add C++ guards
This commit is contained in:
@@ -22,6 +22,10 @@
|
||||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct sd_bus_vtable sd_bus_vtable;
|
||||
|
||||
#include "sd-bus.h"
|
||||
@@ -124,4 +128,8 @@ struct sd_bus_vtable {
|
||||
.type = _SD_BUS_VTABLE_END, \
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -37,6 +37,10 @@
|
||||
- Handles signals and child PIDs
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct sd_event sd_event;
|
||||
typedef struct sd_event_source sd_event_source;
|
||||
|
||||
@@ -111,4 +115,8 @@ int sd_event_source_get_time_accuracy(sd_event_source *s, uint64_t *usec);
|
||||
int sd_event_source_get_signal(sd_event_source *s);
|
||||
int sd_event_source_get_child_pid(sd_event_source *s, pid_t *pid);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
|
||||
|
||||
#ifndef fooid128hfoo
|
||||
#define fooid128hfoo
|
||||
#ifndef foosdid128hfoo
|
||||
#define foosdid128hfoo
|
||||
|
||||
/***
|
||||
This file is part of systemd.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
|
||||
|
||||
#ifndef foojournalhfoo
|
||||
#define foojournalhfoo
|
||||
#ifndef foosdjournalhfoo
|
||||
#define foosdjournalhfoo
|
||||
|
||||
/***
|
||||
This file is part of systemd.
|
||||
|
||||
@@ -24,6 +24,10 @@
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct sd_rtnl sd_rtnl;
|
||||
typedef struct sd_rtnl_message sd_rtnl_message;
|
||||
|
||||
@@ -53,4 +57,8 @@ int sd_rtnl_message_get_type(sd_rtnl_message *m, uint16_t *type);
|
||||
int sd_rtnl_message_append(sd_rtnl_message *m, unsigned short type, const void *data);
|
||||
int sd_rtnl_message_read(sd_rtnl_message *m, unsigned short *type, void **data);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
+10
-2
@@ -1,7 +1,7 @@
|
||||
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
|
||||
|
||||
#ifndef fooutf8hfoo
|
||||
#define fooutf8hfoo
|
||||
#ifndef foosdutf8hfoo
|
||||
#define foosdutf8hfoo
|
||||
|
||||
/***
|
||||
This file is part of systemd.
|
||||
@@ -22,7 +22,15 @@
|
||||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
const char *sd_utf8_is_valid(const char *s);
|
||||
const char *sd_ascii_is_valid(const char *s);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user