From 32e2cbeeab281a2da4a9957c831f13cfe7bdec69 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 21 Nov 2013 16:35:47 +0000 Subject: 2013-11-21 Daniel Ramirez * libc/include/sys/stat.h, libc/sys/linux/sys/stat.h, libc/sys/m88kbug/syscalls.c, libc/sys/rdos/stat.c, libc/sys/sparc64/sys/stat.h: Add restrict keyword. --- newlib/libc/sys/linux/sys/stat.h | 8 ++++---- newlib/libc/sys/m88kbug/syscalls.c | 2 +- newlib/libc/sys/rdos/stat.c | 2 +- newlib/libc/sys/sparc64/sys/stat.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'newlib/libc/sys') diff --git a/newlib/libc/sys/linux/sys/stat.h b/newlib/libc/sys/linux/sys/stat.h index 99da598ba..c04142c45 100644 --- a/newlib/libc/sys/linux/sys/stat.h +++ b/newlib/libc/sys/linux/sys/stat.h @@ -20,14 +20,14 @@ int _EXFUN(fstat,( int __fd, struct stat *__sbuf )); int _EXFUN(mkdir,( const char *_path, mode_t __mode )); int _EXFUN(mkfifo,( const char *__path, mode_t __mode )); -int _EXFUN(stat,( const char *__path, struct stat *__sbuf )); +int _EXFUN(stat,( const char *__restrict __path, struct stat *__restrict __sbuf )); mode_t _EXFUN(umask,( mode_t __mask )); #ifndef _POSIX_SOURCE int _EXFUN(fstat64,( int __fd, struct stat64 *__sbuf )); -int _EXFUN(lstat,( const char *file_name, struct stat64 *buf)); -int _EXFUN(lstat64,( const char *file_name, struct stat64 *buf)); -int _EXFUN(stat64,( const char *__path, struct stat64 *__sbuf )); +int _EXFUN(lstat,( const char *__restrict file_name, struct stat64 *__restrict buf)); +int _EXFUN(lstat64,( const char *__restrict file_name, struct stat64 *__restrict buf)); +int _EXFUN(stat64,( const char *__restrict __path, struct stat64 *__restrict __sbuf )); #endif /* _POSIX_SOURCE */ #endif /* _SYS_STAT_H */ diff --git a/newlib/libc/sys/m88kbug/syscalls.c b/newlib/libc/sys/m88kbug/syscalls.c index 32f42a925..954dcf6b1 100644 --- a/newlib/libc/sys/m88kbug/syscalls.c +++ b/newlib/libc/sys/m88kbug/syscalls.c @@ -76,7 +76,7 @@ int fstat(int file, struct stat *st) { return(0); } -int stat(char *filename, struct stat *st) { +int stat(char *__restrict filename, struct stat *__restrict st) { st->st_mode = S_IFCHR; return(0); } diff --git a/newlib/libc/sys/rdos/stat.c b/newlib/libc/sys/rdos/stat.c index f1683b63a..542a3cc1b 100755 --- a/newlib/libc/sys/rdos/stat.c +++ b/newlib/libc/sys/rdos/stat.c @@ -5,7 +5,7 @@ #include #include -int stat(const char *file, struct stat *st) ++int stat(const char *__restrict file, struct stat *__restrict st) { errno = ENOSYS; return -1; diff --git a/newlib/libc/sys/sparc64/sys/stat.h b/newlib/libc/sys/sparc64/sys/stat.h index 256c1b41b..26ed53f59 100644 --- a/newlib/libc/sys/sparc64/sys/stat.h +++ b/newlib/libc/sys/sparc64/sys/stat.h @@ -122,7 +122,7 @@ int _EXFUN(chmod,( const char *_path, mode_t _mode )); int _EXFUN(fstat,( int _fd, struct stat *_sbuf )); int _EXFUN(mkdir,( char *_path, mode_t _mode )); int _EXFUN(mkfifo,( char *_path, mode_t _mode )); -int _EXFUN(stat,( const char *_path, struct stat *_sbuf )); +int _EXFUN(stat,( const char *__restrict _path, struct stat *__restrict _sbuf )); mode_t _EXFUN(umask,( mode_t _mask )); #ifdef __cplusplus -- cgit v1.2.3