Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src While I'm at it: add restrict qualifiers to readlink(2).



details:   https://anonhg.NetBSD.org/src/rev/2a5a98c3cc41
branches:  trunk
changeset: 566497:2a5a98c3cc41
user:      kleink <kleink%NetBSD.org@localhost>
date:      Mon May 10 22:33:08 2004 +0000

description:
While I'm at it: add restrict qualifiers to readlink(2).

diffstat:

 include/unistd.h        |  4 ++--
 lib/libc/sys/readlink.2 |  4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 88a665d24970 -r 2a5a98c3cc41 include/unistd.h
--- a/include/unistd.h  Mon May 10 22:30:41 2004 +0000
+++ b/include/unistd.h  Mon May 10 22:33:08 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: unistd.h,v 1.96 2004/05/10 22:28:23 kleink Exp $       */
+/*     $NetBSD: unistd.h,v 1.97 2004/05/10 22:33:08 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));
-ssize_t         readlink __P((const char *, char *, size_t));
+ssize_t         readlink __P((const char * __restrict, char * __restrict, size_t));
 void   *sbrk __P((intptr_t));
 /* XXX prototype wrong! */
 int     setpgrp __P((pid_t, pid_t));           /* obsoleted by setpgid() */
diff -r 88a665d24970 -r 2a5a98c3cc41 lib/libc/sys/readlink.2
--- a/lib/libc/sys/readlink.2   Mon May 10 22:30:41 2004 +0000
+++ b/lib/libc/sys/readlink.2   Mon May 10 22:33:08 2004 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: readlink.2,v 1.19 2004/05/10 22:28:24 kleink Exp $
+.\"    $NetBSD: readlink.2,v 1.20 2004/05/10 22:33:08 kleink Exp $
 .\"
 .\" Copyright (c) 1983, 1991, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -40,7 +40,7 @@
 .Sh SYNOPSIS
 .In unistd.h
 .Ft ssize_t
-.Fn readlink "const char *path" "char *buf" "size_t bufsiz"
+.Fn readlink "const char * restrict path" "char * restrict buf" "size_t bufsiz"
 .Sh DESCRIPTION
 .Fn readlink
 places the contents of the symbolic link



Home | Main Index | Thread Index | Old Index