Be more consistent with the C++ protection

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
This commit is contained in:
Angus Salkeld 2011-03-30 19:53:41 +11:00
parent 6bf863abeb
commit 1a9c549eb5
10 changed files with 79 additions and 35 deletions

View File

@ -25,6 +25,12 @@
#ifndef QB_ATOMIC_DEFINED
#define QB_ATOMIC_DEFINED
/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */
#include <stdint.h>
#include <qb/qbdefs.h>
@ -61,12 +67,6 @@
* qb_atomic_pointer_compare_and_exchange() respectively.
*/
/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */
void qb_atomic_init(void);
/**

View File

@ -20,6 +20,12 @@
#ifndef QB_DEFS_H_DEFINED
#define QB_DEFS_H_DEFINED
/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */
/**
* @file qbdefs.h
* @author Angus Salkeld <asalkeld@redhat.com>
@ -27,12 +33,6 @@
* These are some convience macros and defines.
*/
/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */
/*
* simple math macros
*/

View File

@ -25,6 +25,12 @@
#define _GNU_SOURCE
#endif
/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */
#include <stdlib.h>
#include <stdint.h>
#include <inttypes.h>
@ -164,4 +170,9 @@ int32_t qb_hdb_iterator_next(struct qb_hdb *hdb, void **instance,
uint32_t qb_hdb_base_convert(qb_handle_t handle);
uint64_t qb_hdb_nocheck_convert(uint32_t handle);
/* *INDENT-OFF* */
#ifdef __cplusplus
}
#endif
/* *INDENT-ON* */
#endif /* QB_HDB_H_DEFINED */

View File

@ -23,6 +23,12 @@
#ifndef QB_IPC_COMMON_H_DEFINED
#define QB_IPC_COMMON_H_DEFINED
/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */
struct qb_ipc_request_header {
int32_t id __attribute__ ((aligned(8)));
int32_t size __attribute__ ((aligned(8)));
@ -48,5 +54,10 @@ enum qb_ipc_type {
#define QB_IPC_MSG_NEW_EVENT_SOCK -2
#define QB_IPC_MSG_DISCONNECT -3
/* *INDENT-OFF* */
#ifdef __cplusplus
}
#endif
/* *INDENT-ON* */
#endif /* QB_IPC_COMMON_H_DEFINED */

View File

@ -21,18 +21,18 @@
#ifndef QB_IPCC_H_DEFINED
#define QB_IPCC_H_DEFINED
#include <pthread.h>
#include <sys/poll.h>
#include <sys/socket.h>
#include <qb/qbhdb.h>
#include <qb/qbipc_common.h>
/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */
#include <pthread.h>
#include <sys/poll.h>
#include <sys/socket.h>
#include <qb/qbhdb.h>
#include <qb/qbipc_common.h>
/**
* @file qbipcc.h
*

View File

@ -23,17 +23,17 @@
#ifndef QB_IPCS_H_DEFINED
#define QB_IPCS_H_DEFINED
#include <stdlib.h>
#include <qb/qbipc_common.h>
#include <qb/qbhdb.h>
#include <qb/qbloop.h>
/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */
#include <stdlib.h>
#include <qb/qbipc_common.h>
#include <qb/qbhdb.h>
#include <qb/qbloop.h>
enum qb_ipcs_rate_limit {
QB_IPCS_RATE_FAST,
QB_IPCS_RATE_NORMAL,

View File

@ -22,6 +22,12 @@
#ifndef QB_LOG_H_DEFINED
#define QB_LOG_H_DEFINED
/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */
#include <stdint.h>
#include <stdlib.h>
#include <errno.h>
@ -178,4 +184,9 @@ ssize_t qb_log_blackbox_write_to_file(const char *filename);
*/
void qb_log_blackbox_print_from_file(const char* filename);
/* *INDENT-OFF* */
#ifdef __cplusplus
}
#endif /* __cplusplus */
/* *INDENT-ON* */
#endif /* QB_LOG_H_DEFINED */

View File

@ -21,6 +21,12 @@
#ifndef QB_LOOP_DEFINED
#define QB_LOOP_DEFINED
/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */
#include <signal.h>
/**
@ -239,5 +245,10 @@ int32_t qb_loop_signal_mod(qb_loop_t *l,
int32_t qb_loop_signal_del(qb_loop_t *l,
qb_loop_signal_handle handle);
/* *INDENT-OFF* */
#ifdef __cplusplus
}
#endif /* __cplusplus */
/* *INDENT-ON* */
#endif /* QB_LOOP_DEFINED */

View File

@ -21,6 +21,12 @@
#ifndef QB_RB_DEFINED
#define QB_RB_DEFINED
/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */
#include <sys/types.h>
#include <stdint.h>
@ -68,12 +74,6 @@
* @author Angus Salkeld <asalkeld@redhat.com>
*/
/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */
/**
* create a ring buffer (rather than open and existing one)
* @see qb_rb_open()

View File

@ -20,6 +20,12 @@
#ifndef QB_UTIL_H_DEFINED
#define QB_UTIL_H_DEFINED
/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */
#include <stdint.h>
#ifndef S_SPLINT_S
#include <unistd.h>
@ -32,12 +38,6 @@
* These are some convience functions used throughout libqb.
*/
/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */
/**
* @typedef qb_thread_lock_type_t
* QB_THREAD_LOCK_SHORT is a short term lock (spinlock if available on your system)