From: Arun Thomas Date: Fri, 10 Aug 2012 20:09:43 +0000 (+0200) Subject: Fix prototypes for getdents, read, readlink X-Git-Tag: v3.2.1~389 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=65a87d5bcbdc997f9170210dec90abf07862ef60;p=minix.git Fix prototypes for getdents, read, readlink --- diff --git a/include/dirent.h b/include/dirent.h index f1c2ae325..0fb44e73e 100644 --- a/include/dirent.h +++ b/include/dirent.h @@ -107,7 +107,7 @@ DIR *__opendir2(const char *, int) __RENAME(__opendir230); int scandir(const char *, struct dirent ***, int (*)(const struct dirent *), int (*)(const void *, const void *)) __RENAME(__scandir30); -int getdents(int, char *, size_t) __RENAME(__getdents30); +ssize_t getdents(int, char *, size_t) __RENAME(__getdents30); int alphasort(const void *, const void *) __RENAME(__alphasort30); #endif #endif /* defined(_NETBSD_SOURCE) */ diff --git a/lib/libc/sys-minix/getdents.c b/lib/libc/sys-minix/getdents.c index 649d86bc6..6e258e9f5 100644 --- a/lib/libc/sys-minix/getdents.c +++ b/lib/libc/sys-minix/getdents.c @@ -4,10 +4,7 @@ #include -ssize_t getdents(fd, buffer, nbytes) -int fd; -char *buffer; -size_t nbytes; +ssize_t getdents(int fd, char *buffer, size_t nbytes) { message m; diff --git a/lib/libc/sys-minix/read.c b/lib/libc/sys-minix/read.c index 055c08b54..b14391203 100644 --- a/lib/libc/sys-minix/read.c +++ b/lib/libc/sys-minix/read.c @@ -8,10 +8,7 @@ __weak_alias(read, _read) #endif -ssize_t read(fd, buffer, nbytes) -int fd; -void *buffer; -size_t nbytes; +ssize_t read(int fd, void *buffer, size_t nbytes) { message m; diff --git a/lib/libc/sys-minix/readlink.c b/lib/libc/sys-minix/readlink.c index 9d5e7bcb5..b141941f7 100644 --- a/lib/libc/sys-minix/readlink.c +++ b/lib/libc/sys-minix/readlink.c @@ -9,7 +9,7 @@ __weak_alias(readlink, _readlink) #endif -int readlink(const char *name, char *buffer, size_t bufsiz) +ssize_t readlink(const char *name, char *buffer, size_t bufsiz) { message m; diff --git a/lib/libedit/editline.c b/lib/libedit/editline.c index ac756ca2a..feda30b34 100644 --- a/lib/libedit/editline.c +++ b/lib/libedit/editline.c @@ -97,8 +97,6 @@ int rl_meta_chars = 0; ** Declarations. */ STATIC CHAR *editinput(); -extern int read(); -extern int write(); #if defined(USE_TERMCAP) extern char *tgetstr(); extern int tgetent();