@@ -13,6 +13,10 @@
#include <rtthread.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
enum
{
RT_WORK_STATE_PENDING = 0x0001, /* Work item pending state */
@@ -70,7 +74,9 @@ rt_err_t rt_work_urgent(struct rt_work *work);
rt_err_t rt_work_cancel(struct rt_work *work);
#endif /* RT_USING_SYSTEM_WORKQUEUE */
-
+}
#endif /* RT_USING_HEAP */
@@ -43,6 +43,9 @@ struct part_flash_info
#elif defined (__GNUC__) /* GNU GCC Compiler */
#define SECTION(x) __attribute__((section(x)))
#define USED __attribute__((used))
+#elif defined (_MSC_VER)
+ #define SECTION(x)
+ #define USED
#else
#error not supported tool chain
#endif /* __CC_ARM */
@@ -875,7 +875,7 @@ static void fal(uint8_t argc, char **argv) {
result = fal_partition_read(part_dev, i, read_data, cur_op_size);
}
/* data check */
- for (int index = 0; index < cur_op_size; index ++)
+ for (size_t index = 0; index < cur_op_size; index ++)
if (write_data[index] != read_data[index])
#include "sys/types.h"
#define O_RDONLY 00
#define O_WRONLY 01
#define O_RDWR 02
@@ -68,4 +72,8 @@ int open(const char *file, int flags, ...);
int fcntl(int fildes, int cmd, ...);
int creat(const char *path, mode_t mode);
#endif
@@ -20,6 +20,10 @@
#include <winsock.h>
#ifndef FD_SETSIZE
#define FD_SETSIZE 32
@@ -55,4 +59,8 @@ typedef struct _types_fd_set {
int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout);
#endif /* _WIN32 */
#endif /* __SYS_SELECT_H__ */
@@ -14,6 +14,10 @@
#include <sys/types.h>
#include <sys/time.h>
#define S_IFMT 00170000
#define S_IFSOCK 0140000
#define S_IFLNK 0120000
@@ -80,4 +84,8 @@ int mknod(const char *, mode_t, dev_t);
int stat(const char *, struct stat *);
mode_t umask(mode_t);
@@ -16,6 +16,10 @@
#include <stddef.h>
#include <time.h>
typedef int32_t clockid_t;
typedef int32_t key_t; /* Used for interprocess communication. */
typedef int pid_t; /* Used for process IDs and process group IDs. */
@@ -39,4 +43,8 @@ typedef unsigned int u_int;
typedef unsigned char u_char;
typedef unsigned long u_long;
@@ -15,6 +15,10 @@
#include "types.h" /* <sys/types.h> */
#define STDIN_FILENO 0 /* standard input file descriptor */
#define STDOUT_FILENO 1 /* standard output file descriptor */
#define STDERR_FILENO 2 /* standard error file descriptor */
@@ -46,4 +50,8 @@ uid_t geteuid(void);
gid_t getgid(void);
gid_t getegid(void);
#endif /* _SYS_UNISTD_H */
struct winsize
unsigned short ws_row;
@@ -271,4 +275,8 @@ struct winsize
int ioctl(int fildes, int cmd, ...);
@@ -12,6 +12,10 @@
struct statfs
size_t f_bsize; /* block size */
@@ -22,4 +26,8 @@ struct statfs
int statfs(const char *path, struct statfs *buf);
int fstatfs(int fd, struct statfs *buf);
@@ -83,7 +83,7 @@ int var_export_init(void)
static char __vexp_strbuf1[1024];
static char __vexp_strbuf2[1024];
ve_exporter_t ve_exporter_temp;
- int index_i, index_j;
+ rt_size_t index_i, index_j;
/* past the three members in first ptr_begin */
ptr_begin += (sizeof(struct ve_exporter) / sizeof(unsigned int));