4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-02 04:20:28 +08:00

Align *utime*() with POSIX/glibc

Change the prototypes to be in line with POSIX/glibc.  This may fix
issues with new warnings produced by GCC 11.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
This commit is contained in:
Sebastian Huber 2021-01-26 15:16:31 +01:00 committed by Ken Brown
parent 7edc74562d
commit 851e303442
3 changed files with 6 additions and 6 deletions

View File

@ -221,7 +221,7 @@ extern int flock (int, int);
#endif #endif
#if __GNU_VISIBLE #if __GNU_VISIBLE
#include <sys/time.h> #include <sys/time.h>
extern int futimesat (int, const char *, const struct timeval *); extern int futimesat (int, const char *, const struct timeval [2]);
#endif #endif
/* Provide _<systemcall> prototypes for functions provided by some versions /* Provide _<systemcall> prototypes for functions provided by some versions

View File

@ -153,10 +153,10 @@ int fstatat (int, const char *__restrict , struct stat *__restrict, int);
int mkdirat (int, const char *, mode_t); int mkdirat (int, const char *, mode_t);
int mkfifoat (int, const char *, mode_t); int mkfifoat (int, const char *, mode_t);
int mknodat (int, const char *, mode_t, dev_t); int mknodat (int, const char *, mode_t, dev_t);
int utimensat (int, const char *, const struct timespec *, int); int utimensat (int, const char *, const struct timespec [2], int);
#endif #endif
#if __POSIX_VISIBLE >= 200809 && !defined(__INSIDE_CYGWIN__) #if __POSIX_VISIBLE >= 200809 && !defined(__INSIDE_CYGWIN__)
int futimens (int, const struct timespec *); int futimens (int, const struct timespec [2]);
#endif #endif
/* Provide prototypes for most of the _<systemcall> names that are /* Provide prototypes for most of the _<systemcall> names that are

View File

@ -414,12 +414,12 @@ struct itimerval {
#include <time.h> #include <time.h>
__BEGIN_DECLS __BEGIN_DECLS
int utimes (const char *__path, const struct timeval *__tvp); int utimes (const char *, const struct timeval [2]);
#if __BSD_VISIBLE #if __BSD_VISIBLE
int adjtime (const struct timeval *, struct timeval *); int adjtime (const struct timeval *, struct timeval *);
int futimes (int, const struct timeval *); int futimes (int, const struct timeval [2]);
int lutimes (const char *, const struct timeval *); int lutimes (const char *, const struct timeval [2]);
int settimeofday (const struct timeval *, const struct timezone *); int settimeofday (const struct timeval *, const struct timezone *);
#endif #endif