提交 e108dfe4 编写于 作者: B Bernard Xiong

[libc] Fix the _EXFUN issue in newlib

上级 b69baa96
......@@ -41,13 +41,15 @@ int closedir(DIR* d);
/* file api*/
int open(const char *file, int flags, ...);
int close(int d);
#ifdef RT_USING_NEWLIB
#if defined(RT_USING_NEWLIB) && defined(_EXFUN)
_READ_WRITE_RETURN_TYPE _EXFUN(read, (int __fd, void *__buf, size_t __nbyte));
_READ_WRITE_RETURN_TYPE _EXFUN(write, (int __fd, const void *__buf, size_t __nbyte));
#else
int read(int fd, void *buf, size_t len);
int write(int fd, const void *buf, size_t len);
#endif
off_t lseek(int fd, off_t offset, int whence);
int rename(const char *from, const char *to);
int unlink(const char *pathname);
......
......@@ -110,7 +110,7 @@ RTM_EXPORT(close);
* @return the actual read data buffer length. If the returned value is 0, it
* may be reach the end of file, please check errno.
*/
#ifdef RT_USING_NEWLIB
#if defined(RT_USING_NEWLIB) && defined(_EXFUN)
_READ_WRITE_RETURN_TYPE _EXFUN(read, (int fd, void *buf, size_t len))
#else
int read(int fd, void *buf, size_t len)
......@@ -154,7 +154,7 @@ RTM_EXPORT(read);
*
* @return the actual written data buffer length.
*/
#ifdef RT_USING_NEWLIB
#if defined(RT_USING_NEWLIB) && defined(_EXFUN)
_READ_WRITE_RETURN_TYPE _EXFUN(write, (int fd, const void *buf, size_t len))
#else
int write(int fd, const void *buf, size_t len)
......
......@@ -76,20 +76,20 @@ typedef struct siginfo siginfo_t;
typedef unsigned long sigset_t;
#define SIGHUP 1
// #define SIGINT 2
/* #define SIGINT 2 */
#define SIGQUIT 3
// #define SIGILL 4
/* #define SIGILL 4 */
#define SIGTRAP 5
// #define SIGABRT 6
/* #define SIGABRT 6 */
#define SIGEMT 7
// #define SIGFPE 8
/* #define SIGFPE 8 */
#define SIGKILL 9
#define SIGBUS 10
// #define SIGSEGV 11
/* #define SIGSEGV 11 */
#define SIGSYS 12
#define SIGPIPE 13
#define SIGALRM 14
// #define SIGTERM 15
/* #define SIGTERM 15 */
#define SIGURG 16
#define SIGSTOP 17
#define SIGTSTP 18
......@@ -99,8 +99,8 @@ typedef unsigned long sigset_t;
#define SIGTTOU 22
#define SIGPOLL 23
#define SIGWINCH 24
// #define SIGUSR1 25
// #define SIGUSR2 26
/* #define SIGUSR1 25 */
/* #define SIGUSR2 26 */
#define SIGRTMIN 27
#define SIGRTMAX 31
#define NSIG 32
......@@ -136,7 +136,7 @@ typedef unsigned long sigset_t;
#define SIGQUIT 3
#define SIGILL 4
#define SIGTRAP 5
// #define SIGABRT 6
/* #define SIGABRT 6 */
#define SIGEMT 7
#define SIGFPE 8
#define SIGKILL 9
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册