From 9977fcbc4254b8c1002d47ad269e7942d4ee6d20 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 21 Nov 2013 17:04:57 +0000 Subject: [PATCH] 2013-11-21 Julio Gutierrez * libc/include/glob.h (glob): Add restrict keyword. * libc/posix/glob.c (glob): Ditto. --- newlib/ChangeLog | 5 +++++ newlib/libc/include/glob.h | 3 ++- newlib/libc/posix/glob.c | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/newlib/ChangeLog b/newlib/ChangeLog index f509eb2ba..3a11e3e11 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,8 @@ +2013-11-21 Julio Gutierrez + + * libc/include/glob.h (glob): Add restrict keyword. + * libc/posix/glob.c (glob): Ditto. + 2013-11-21 Joel Sherrill * libc/posix/readdir_r.c: Add restrict keyword. diff --git a/newlib/libc/include/glob.h b/newlib/libc/include/glob.h index a7351350d..7a300e69d 100644 --- a/newlib/libc/include/glob.h +++ b/newlib/libc/include/glob.h @@ -82,7 +82,8 @@ typedef struct { #define GLOB_ABEND (-2) /* Unignored error. */ __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 diff --git a/newlib/libc/posix/glob.c b/newlib/libc/posix/glob.c index 977a5a4f8..5e6c2fcba 100644 --- a/newlib/libc/posix/glob.c +++ b/newlib/libc/posix/glob.c @@ -158,9 +158,9 @@ static void qprintf(const char *, Char *); int glob(pattern, flags, errfunc, pglob) - const char *pattern; + const char *__restrict pattern; int flags, (*errfunc)(const char *, int); - glob_t *pglob; + glob_t *__restrict pglob; { const u_char *patnext; int c, limit;