svn commit: r229823 - in stable/9: include lib/libc/gen
Eitan Adler
eadler at FreeBSD.org
Sun Jan 8 21:00:38 UTC 2012
Author: eadler (ports committer)
Date: Sun Jan 8 21:00:37 2012
New Revision: 229823
URL: http://svn.freebsd.org/changeset/base/229823
Log:
MFC r228754:
- Add restrict keyword to glob(3)
PR: kern/161958
Approved by: jilles
Modified:
stable/9/include/glob.h
stable/9/lib/libc/gen/glob.3
stable/9/lib/libc/gen/glob.c
Directory Properties:
stable/9/include/ (props changed)
stable/9/lib/libc/ (props changed)
Modified: stable/9/include/glob.h
==============================================================================
--- stable/9/include/glob.h Sun Jan 8 20:25:29 2012 (r229822)
+++ stable/9/include/glob.h Sun Jan 8 21:00:37 2012 (r229823)
@@ -98,7 +98,8 @@ typedef struct {
#endif /* __BSD_VISIBLE */
__BEGIN_DECLS
-int glob(const char *, int, int (*)(const char *, int), glob_t *);
+int glob(const char * __restrict, int,
+ int (*)(const char *, int), glob_t * __restrict);
void globfree(glob_t *);
__END_DECLS
Modified: stable/9/lib/libc/gen/glob.3
==============================================================================
--- stable/9/lib/libc/gen/glob.3 Sun Jan 8 20:25:29 2012 (r229822)
+++ stable/9/lib/libc/gen/glob.3 Sun Jan 8 21:00:37 2012 (r229823)
@@ -30,7 +30,7 @@
.\" @(#)glob.3 8.3 (Berkeley) 4/16/94
.\" $FreeBSD$
.\"
-.Dd February 15, 2011
+.Dd December 20, 2011
.Dt GLOB 3
.Os
.Sh NAME
@@ -42,7 +42,7 @@
.Sh SYNOPSIS
.In glob.h
.Ft int
-.Fn glob "const char *pattern" "int flags" "int (*errfunc)(const char *, int)" "glob_t *pglob"
+.Fn glob "const char * restrict pattern" "int flags" "int (*errfunc)(const char *, int)" "glob_t * restrict pglob"
.Ft void
.Fn globfree "glob_t *pglob"
.Sh DESCRIPTION
Modified: stable/9/lib/libc/gen/glob.c
==============================================================================
--- stable/9/lib/libc/gen/glob.c Sun Jan 8 20:25:29 2012 (r229822)
+++ stable/9/lib/libc/gen/glob.c Sun Jan 8 21:00:37 2012 (r229823)
@@ -163,7 +163,8 @@ static void qprintf(const char *, Char
#endif
int
-glob(const char *pattern, int flags, int (*errfunc)(const char *, int), glob_t *pglob)
+glob(const char * __restrict pattern, int flags,
+ int (*errfunc)(const char *, int), glob_t * __restrict pglob)
{
const char *patnext;
size_t limit;
More information about the svn-src-stable-9
mailing list