Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src POSIX-2001: Change readlink(2)'s return type from int to ssi...
details: https://anonhg.NetBSD.org/src/rev/490d69c702e5
branches: trunk
changeset: 566495:490d69c702e5
user: kleink <kleink%NetBSD.org@localhost>
date: Mon May 10 22:28:23 2004 +0000
description:
POSIX-2001: Change readlink(2)'s return type from int to ssize_t.
diffstat:
include/unistd.h | 4 ++--
lib/libc/sys/readlink.2 | 19 +++++++++++++++----
sys/kern/syscalls.master | 4 ++--
3 files changed, 19 insertions(+), 8 deletions(-)
diffs (84 lines):
diff -r 8e2a2ba84c21 -r 490d69c702e5 include/unistd.h
--- a/include/unistd.h Mon May 10 22:16:42 2004 +0000
+++ b/include/unistd.h Mon May 10 22:28:23 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: unistd.h,v 1.95 2003/11/18 00:56:56 thorpej Exp $ */
+/* $NetBSD: unistd.h,v 1.96 2004/05/10 22:28:23 kleink Exp $ */
/*-
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -258,7 +258,7 @@
int lchown __P((const char *, uid_t, gid_t));
#endif
int lockf __P((int, int, off_t));
-int readlink __P((const char *, char *, size_t));
+ssize_t readlink __P((const char *, char *, size_t));
void *sbrk __P((intptr_t));
/* XXX prototype wrong! */
int setpgrp __P((pid_t, pid_t)); /* obsoleted by setpgid() */
diff -r 8e2a2ba84c21 -r 490d69c702e5 lib/libc/sys/readlink.2
--- a/lib/libc/sys/readlink.2 Mon May 10 22:16:42 2004 +0000
+++ b/lib/libc/sys/readlink.2 Mon May 10 22:28:23 2004 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: readlink.2,v 1.18 2003/08/07 16:44:04 agc Exp $
+.\" $NetBSD: readlink.2,v 1.19 2004/05/10 22:28:24 kleink Exp $
.\"
.\" Copyright (c) 1983, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -29,7 +29,7 @@
.\"
.\" @(#)readlink.2 8.1 (Berkeley) 6/4/93
.\"
-.Dd June 4, 1993
+.Dd May 10, 2004
.Dt READLINK 2
.Os
.Sh NAME
@@ -39,7 +39,7 @@
.Lb libc
.Sh SYNOPSIS
.In unistd.h
-.Ft int
+.Ft ssize_t
.Fn readlink "const char *path" "char *buf" "size_t bufsiz"
.Sh DESCRIPTION
.Fn readlink
@@ -90,8 +90,19 @@
.Xr stat 2 ,
.Xr symlink 2 ,
.Xr symlink 7
+.Sh STANDARDS
+The
+.Fn readlink
+function conforms to
+.St -p1003.1-2001 .
.Sh HISTORY
The
.Fn readlink
-function call appeared in
+function appeared in
.Bx 4.2 .
+The type returned was changed from
+.Ft int
+to
+.Ft ssize_t
+in
+.Nx 2.1
diff -r 8e2a2ba84c21 -r 490d69c702e5 sys/kern/syscalls.master
--- a/sys/kern/syscalls.master Mon May 10 22:16:42 2004 +0000
+++ b/sys/kern/syscalls.master Mon May 10 22:28:23 2004 +0000
@@ -1,4 +1,4 @@
- $NetBSD: syscalls.master,v 1.141 2004/04/27 01:12:44 kleink Exp $
+ $NetBSD: syscalls.master,v 1.142 2004/05/10 22:28:24 kleink Exp $
; @(#)syscalls.master 8.2 (Berkeley) 1/13/94
@@ -164,7 +164,7 @@
56 STD { int sys_revoke(const char *path); }
57 STD { int sys_symlink(const char *path, \
const char *link); }
-58 STD { int sys_readlink(const char *path, char *buf, \
+58 STD { ssize_t sys_readlink(const char *path, char *buf, \
size_t count); }
59 STD { int sys_execve(const char *path, \
char * const *argp, char * const *envp); }
Home |
Main Index |
Thread Index |
Old Index