[newlib-cygwin] libgloss: fix read and write prototype
Jeff Johnston
jjohnstn@sourceware.org
Mon May 6 23:17:21 GMT 2024
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=4becae7bd833e183c789821a477f25898ed0db1f
commit 4becae7bd833e183c789821a477f25898ed0db1f
Author: Marc <dkm+newlib@kataplop.net>
Date: Sun May 5 21:16:01 2024 +0200
libgloss: fix read and write prototype
Use _READ_WRITE_RETURN_TYPE for read/write in libgloss/{read,write}.c to
avoid mismatching types.
Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
Diff:
---
libgloss/read.c | 2 +-
libgloss/write.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libgloss/read.c b/libgloss/read.c
index 83a3b549b..867648278 100644
--- a/libgloss/read.c
+++ b/libgloss/read.c
@@ -20,7 +20,7 @@ extern char inbyte (void);
* read -- read bytes from the serial port. Ignore fd, since
* we only have stdin.
*/
-int
+_READ_WRITE_RETURN_TYPE
read (int fd,
void *buf_,
size_t nbytes)
diff --git a/libgloss/write.c b/libgloss/write.c
index 80bcd4a77..757141291 100644
--- a/libgloss/write.c
+++ b/libgloss/write.c
@@ -21,7 +21,7 @@ extern int outbyte (char x);
* stdout and stderr are the same. Since we have no filesystem,
* open will only return an error.
*/
-int
+_READ_WRITE_RETURN_TYPE
write (int fd,
const void *buf_,
size_t nbytes)
More information about the Newlib-cvs
mailing list