Add __cplusplus macros to headers.

This commit is contained in:
Geenz 2015-04-01 07:25:10 -04:00
parent 6b7f79f733
commit 3a904cdde3
5 changed files with 38 additions and 1 deletions

View File

@ -17,6 +17,10 @@
#ifndef __H_HTTP_H
#define __H_HTTP_H
#if defined(__cplusplus)
extern "C" {
#endif
#define HTTP_KEEPALIVE_TIME 20
#define HTTP_HSTS_ENABLE 31536000
#define HTTP_HEADER_MAX_LEN 4096
@ -283,5 +287,7 @@ enum http_status_code {
HTTP_STATUS_GATEWAY_TIMEOUT = 504,
HTTP_STATUS_BAD_VERSION = 505
};
#if defined(__cplusplus)
}
#endif
#endif /* !__H_HTTP_H */

View File

@ -37,6 +37,10 @@
#include <unistd.h>
#include <zlib.h>
#if defined(__cplusplus)
extern "C" {
#endif
#if defined(__APPLE__)
#undef daemon
extern int daemon(int, int);
@ -547,4 +551,8 @@ void spdy_stream_close(struct connection *,
struct spdy_header_block *spdy_header_block_create(int);
#if defined(__cplusplus)
}
#endif
#endif /* !__H_KORE_H */

View File

@ -22,6 +22,10 @@
#define KORE_PGSQL_FORMAT_TEXT 0
#define KORE_PGSQL_FORMAT_BINARY 1
#if defined(__cplusplus)
extern "C" {
#endif
struct pgsql_conn {
u_int8_t type;
u_int8_t flags;
@ -58,6 +62,10 @@ void kore_pgsql_queue_remove(struct http_request *);
char *kore_pgsql_getvalue(struct kore_pgsql *, int, int);
int kore_pgsql_getlength(struct kore_pgsql *, int, int);
#if defined(__cplusplus)
}
#endif
#define KORE_PGSQL_STATE_INIT 1
#define KORE_PGSQL_STATE_WAIT 2
#define KORE_PGSQL_STATE_RESULT 3

View File

@ -20,6 +20,9 @@
#include <sys/types.h>
#include <sys/queue.h>
#if defined(__cplusplus)
extern "C" {
#endif
struct spdy_ctrl_frame {
u_int16_t version;
u_int16_t type;
@ -65,6 +68,10 @@ struct spdy_stream {
};
extern const unsigned char SPDY_dictionary_txt[];
#if defined(__cplusplus)
}
#endif
#define KORE_SSL_PROTO_STRING "\x08spdy/3.1\x08http/1.1"
#define SPDY_CONTROL_FRAME(x) ((x & (1 << 31)))

View File

@ -24,6 +24,10 @@
#define KORE_TASK_STATE_FINISHED 3
#define KORE_TASK_STATE_ABORT 4
#if defined(__cplusplus)
extern "C" {
#endif
struct http_request;
struct kore_task {
@ -72,5 +76,9 @@ void kore_task_set_result(struct kore_task *, int);
int kore_task_state(struct kore_task *);
int kore_task_result(struct kore_task *);
#if defined(__cplusplus)
}
#endif
#endif