Commit 923c4329 authored by Deomid Ryabkov's avatar Deomid Ryabkov Committed by rojer

Add C++ externs to common headers

Closes cesanta/mongoose#649

PUBLISHED_FROM=7d331576ba8f75a7a4ebf833e056dc22f6eda811
parent e433ba8d
...@@ -531,6 +531,8 @@ typedef int cs_dirent_dummy; ...@@ -531,6 +531,8 @@ typedef int cs_dirent_dummy;
* All rights reserved * All rights reserved
*/ */
/* Amalgamated: #include "common/cs_time.h" */
#ifndef _WIN32 #ifndef _WIN32
#include <stddef.h> #include <stddef.h>
#if !defined(CS_PLATFORM) || \ #if !defined(CS_PLATFORM) || \
......
...@@ -735,6 +735,14 @@ int sl_fs_init(); ...@@ -735,6 +735,14 @@ int sl_fs_init();
#ifndef CS_COMMON_CS_DBG_H_ #ifndef CS_COMMON_CS_DBG_H_
#define CS_COMMON_CS_DBG_H_ #define CS_COMMON_CS_DBG_H_
#ifndef CS_DISABLE_STDIO
#include <stdio.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
enum cs_log_level { enum cs_log_level {
LL_NONE = -1, LL_NONE = -1,
LL_ERROR = 0, LL_ERROR = 0,
...@@ -751,8 +759,6 @@ void cs_log_set_level(enum cs_log_level level); ...@@ -751,8 +759,6 @@ void cs_log_set_level(enum cs_log_level level);
#ifndef CS_DISABLE_STDIO #ifndef CS_DISABLE_STDIO
#include <stdio.h>
void cs_log_set_file(FILE *file); void cs_log_set_file(FILE *file);
extern enum cs_log_level cs_log_level; extern enum cs_log_level cs_log_level;
...@@ -786,6 +792,10 @@ void cs_log_printf(const char *fmt, ...); ...@@ -786,6 +792,10 @@ void cs_log_printf(const char *fmt, ...);
#endif #endif
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* CS_COMMON_CS_DBG_H_ */ #endif /* CS_COMMON_CS_DBG_H_ */
/* /*
* Copyright (c) 2014-2016 Cesanta Software Limited * Copyright (c) 2014-2016 Cesanta Software Limited
...@@ -795,9 +805,17 @@ void cs_log_printf(const char *fmt, ...); ...@@ -795,9 +805,17 @@ void cs_log_printf(const char *fmt, ...);
#ifndef CS_COMMON_CS_TIME_H_ #ifndef CS_COMMON_CS_TIME_H_
#define CS_COMMON_CS_TIME_H_ #define CS_COMMON_CS_TIME_H_
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* Sub-second granularity time(). */ /* Sub-second granularity time(). */
double cs_time(); double cs_time();
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* CS_COMMON_CS_TIME_H_ */ #endif /* CS_COMMON_CS_TIME_H_ */
/* /*
* Copyright (c) 2015 Cesanta Software Limited * Copyright (c) 2015 Cesanta Software Limited
...@@ -1102,6 +1120,10 @@ int json_emit_va(char *buf, int buf_len, const char *fmt, va_list); ...@@ -1102,6 +1120,10 @@ int json_emit_va(char *buf, int buf_len, const char *fmt, va_list);
#ifndef CS_COMMON_CS_DIRENT_H_ #ifndef CS_COMMON_CS_DIRENT_H_
#define CS_COMMON_CS_DIRENT_H_ #define CS_COMMON_CS_DIRENT_H_
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#ifdef CS_ENABLE_SPIFFS #ifdef CS_ENABLE_SPIFFS
#include <spiffs.h> #include <spiffs.h>
...@@ -1125,6 +1147,10 @@ int closedir(DIR *dir); ...@@ -1125,6 +1147,10 @@ int closedir(DIR *dir);
struct dirent *readdir(DIR *dir); struct dirent *readdir(DIR *dir);
#endif #endif
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* CS_COMMON_CS_DIRENT_H_ */ #endif /* CS_COMMON_CS_DIRENT_H_ */
/* /*
* Copyright (c) 2014 Cesanta Software Limited * Copyright (c) 2014 Cesanta Software Limited
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment