add C++ guards
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
#ifndef UC_BACKTRACE_H_
|
||||
#define UC_BACKTRACE_H_
|
||||
|
||||
#define UC_BACTRACE_STDERR uc_backtrace_fd(2)
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define UC_BACTRACE_STDERR uc_backtrace_fd(2)
|
||||
/**
|
||||
* Print a stacktrace to the given file descriptor.
|
||||
*
|
||||
@@ -21,4 +24,8 @@ void uc_backtrace_fd(int fd);
|
||||
*/
|
||||
void uc_backtrace_buf(char *buf, size_t len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* An abstract clock.
|
||||
@@ -110,5 +113,9 @@ void uc_settable_clock_set_tv(struct UCoreSettableClock *uclock,
|
||||
void uc_settable_clock_set(struct UCoreSettableClock *uclock,
|
||||
time_t secs, suseconds_t usecs);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -3,6 +3,11 @@
|
||||
|
||||
#include "timers.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#define MUX_EV_READ (1U << 0x00)
|
||||
#define MUX_EV_WRITE (1U << 0x01)
|
||||
//#define MUX_EV_EXCEPT (1 << 0x02)
|
||||
@@ -100,5 +105,9 @@ int iomux_update_events(struct IOMux *mux, struct IOMuxFD *fd);
|
||||
*/
|
||||
struct UCTimers *iomux_get_timers(struct IOMux *mux);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#ifndef UCORE_MERSENNE_TWISTER_H
|
||||
#define UCORE_MERSENNE_TWISTER_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** Context used for the PRNG*/
|
||||
#define MT_RAND_N 624
|
||||
@@ -23,5 +26,9 @@ void mtsrand(int seed, MTRand *r);
|
||||
*/
|
||||
unsigned int mtrand(MTRand *r);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** Read the content of a file.
|
||||
* The returned char* is malloced memory and must be freed by the caller.
|
||||
* The content is terminated by a nul byte, regardless of whether the content
|
||||
@@ -17,4 +21,8 @@
|
||||
char *
|
||||
uc_read_file(const char *file_name, size_t *length, size_t max);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
#include <sys/time.h>
|
||||
#include "rbtree.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct UCTimer;
|
||||
struct UCTimers;
|
||||
@@ -140,4 +143,8 @@ int uc_timers_run(struct UCTimers *timers);
|
||||
|
||||
//uc_timers_destroy(struct UCTimers *timers) is currently missing..
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
* </pre>
|
||||
* @endhtmlonly
|
||||
*/
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Major version of the ucore library*/
|
||||
extern const int ucore_version_major;
|
||||
@@ -46,5 +49,10 @@ extern const char ucore_version_str[];
|
||||
/** Hostname where the library was built
|
||||
*/
|
||||
extern const char ucore_build_host[];
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user