summaryrefslogtreecommitdiff
path: root/components/libc/compilers/newlib
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2019-09-16 08:47:49 +0800
committerGitHub <[email protected]>2019-09-16 08:47:49 +0800
commit1b2a1263df2b560e36d78ab2577b708bfa8c8b05 (patch)
tree16f3753ac6f0627213024e070a8e219d011e2412 /components/libc/compilers/newlib
parent91e1918250ea81d9424e6312b2b917f17b3e77c3 (diff)
parent408bb22af68264182aea70be9a7db9140dc438a1 (diff)
Merge pull request #3075 from liruncong/libc
[components/libc/compilers]c++文件引用libc.h支持
Diffstat (limited to 'components/libc/compilers/newlib')
-rw-r--r--components/libc/compilers/newlib/libc.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/components/libc/compilers/newlib/libc.h b/components/libc/compilers/newlib/libc.h
index ab9334fe26..fdf2ab4f60 100644
--- a/components/libc/compilers/newlib/libc.h
+++ b/components/libc/compilers/newlib/libc.h
@@ -27,13 +27,19 @@
#define MICROSECOND_PER_TICK (MICROSECOND_PER_SECOND / RT_TICK_PER_SECOND)
#define NANOSECOND_PER_TICK (NANOSECOND_PER_SECOND / RT_TICK_PER_SECOND)
+#ifdef __cplusplus
+extern "C" {
+#endif
int libc_system_init(void);
int libc_stdio_set_console(const char* device_name, int mode);
int libc_stdio_get_console(void);
/* some time related function */
-int libc_set_time(const struct timespec *time);
-int libc_get_time(struct timespec *time);
-int libc_time_to_tick(const struct timespec *time);
+int libc_set_time(const struct timespec* time);
+int libc_get_time(struct timespec* time);
+int libc_time_to_tick(const struct timespec* time);
+#ifdef __cplusplus
+}
+#endif
#endif