mirror of
https://github.com/systemd/systemd.git
synced 2025-02-22 09:57:34 +03:00
api: add C++ guards to all headers
This commit is contained in:
parent
ebda471d89
commit
f987397649
@ -26,6 +26,10 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef union sd_id128 sd_id128_t;
|
typedef union sd_id128 sd_id128_t;
|
||||||
|
|
||||||
union sd_id128 {
|
union sd_id128 {
|
||||||
@ -58,4 +62,8 @@ static inline bool sd_id128_equal(sd_id128_t a, sd_id128_t b) {
|
|||||||
return memcmp(&a, &b, 16) == 0;
|
return memcmp(&a, &b, 16) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -29,6 +29,10 @@
|
|||||||
|
|
||||||
#include <systemd/sd-id128.h>
|
#include <systemd/sd-id128.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/* TODO:
|
/* TODO:
|
||||||
*
|
*
|
||||||
* - OR of matches is borked...
|
* - OR of matches is borked...
|
||||||
@ -122,4 +126,8 @@ int sd_journal_process(sd_journal *j);
|
|||||||
#define SD_JOURNAL_FOREACH_UNIQUE(j, data, l) \
|
#define SD_JOURNAL_FOREACH_UNIQUE(j, data, l) \
|
||||||
for (sd_journal_restart_unique(j); sd_journal_enumerate_data((j), &(data), &(l)) > 0; )
|
for (sd_journal_restart_unique(j); sd_journal_enumerate_data((j), &(data), &(l)) > 0; )
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -24,6 +24,10 @@
|
|||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* A few points:
|
* A few points:
|
||||||
*
|
*
|
||||||
@ -125,4 +129,8 @@ int sd_login_monitor_flush(sd_login_monitor *m);
|
|||||||
/* Get FD from monitor */
|
/* Get FD from monitor */
|
||||||
int sd_login_monitor_get_fd(sd_login_monitor *m);
|
int sd_login_monitor_get_fd(sd_login_monitor *m);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -24,8 +24,16 @@
|
|||||||
|
|
||||||
#include <systemd/sd-id128.h>
|
#include <systemd/sd-id128.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
#define SD_MESSAGE_JOURNAL_START SD_ID128_MAKE(f7,73,79,a8,49,0b,40,8b,be,5f,69,40,50,5a,77,7b)
|
#define SD_MESSAGE_JOURNAL_START SD_ID128_MAKE(f7,73,79,a8,49,0b,40,8b,be,5f,69,40,50,5a,77,7b)
|
||||||
#define SD_MESSAGE_JOURNAL_STOP SD_ID128_MAKE(d9,3f,b3,c9,c2,4d,45,1a,97,ce,a6,15,ce,59,c0,0b)
|
#define SD_MESSAGE_JOURNAL_STOP SD_ID128_MAKE(d9,3f,b3,c9,c2,4d,45,1a,97,ce,a6,15,ce,59,c0,0b)
|
||||||
#define SD_MESSAGE_JOURNAL_DROPPED SD_ID128_MAKE(a5,96,d6,fe,7b,fa,49,94,82,8e,72,30,9e,95,d6,1e)
|
#define SD_MESSAGE_JOURNAL_DROPPED SD_ID128_MAKE(a5,96,d6,fe,7b,fa,49,94,82,8e,72,30,9e,95,d6,1e)
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user