Author: eadler (ports committer)
Date: Tue Dec 20 22:56:13 2011
New Revision: 228754
URL: http://svn.freebsd.org/changeset/base/228754

Log:
  - Add restrict keyword to glob(3)
  
  PR:           kern/161958
  Submitted by: Henning Petersen <henning.peter...@t-online.de>
  Approved by:  jilles
  MFC after:    3 days

Modified:
  head/include/glob.h
  head/lib/libc/gen/glob.3
  head/lib/libc/gen/glob.c

Modified: head/include/glob.h
==============================================================================
--- head/include/glob.h Tue Dec 20 22:47:56 2011        (r228753)
+++ head/include/glob.h Tue Dec 20 22:56:13 2011        (r228754)
@@ -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: head/lib/libc/gen/glob.3
==============================================================================
--- head/lib/libc/gen/glob.3    Tue Dec 20 22:47:56 2011        (r228753)
+++ head/lib/libc/gen/glob.3    Tue Dec 20 22:56:13 2011        (r228754)
@@ -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: head/lib/libc/gen/glob.c
==============================================================================
--- head/lib/libc/gen/glob.c    Tue Dec 20 22:47:56 2011        (r228753)
+++ head/lib/libc/gen/glob.c    Tue Dec 20 22:56:13 2011        (r228754)
@@ -168,7 +168,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;
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to