Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2019-08-20 01:01:45 +0300
committerJeff Johnston <jjohnstn@redhat.com>2019-08-20 01:01:45 +0300
commitb99887c4283f7b21428d21f98ae9f6fcf573c756 (patch)
tree17afedc32cda727728d62d1ae25c4fb837b244bc /libgloss/cris
parentf75aa67851513d546b840bc43a961785a090be5f (diff)
Revert previous change to sys/stat.h and fix cris libgloss
- revert previous fix which altered sys/stat.h - fix libgloss/cris/gensyscalls to undef st_atime, st_mtime, and st_ctime macros which cannot be used with new_stat structure
Diffstat (limited to 'libgloss/cris')
-rw-r--r--libgloss/cris/gensyscalls18
1 files changed, 12 insertions, 6 deletions
diff --git a/libgloss/cris/gensyscalls b/libgloss/cris/gensyscalls
index 3e2f9af8c..c36f28488 100644
--- a/libgloss/cris/gensyscalls
+++ b/libgloss/cris/gensyscalls
@@ -60,6 +60,9 @@ EOF
cat > fstat.c <<EOF
$lu#include <string.h>
#include <sys/stat.h>
+#undef st_atime
+#undef st_mtime
+#undef st_ctime
int
_fstat (int fd, struct stat *buf)
{
@@ -81,9 +84,9 @@ _fstat (int fd, struct stat *buf)
buf->st_size = ks.st_size;
buf->st_blksize = ks.st_blksize;
buf->st_blocks = ks.st_blocks;
- buf->st_atime = ks.st_atime;
- buf->st_mtime = ks.st_mtime;
- buf->st_ctime = ks.st_ctime;
+ buf->st_atim.tv_sec = ks.st_atime;
+ buf->st_mtim.tv_sec = ks.st_mtime;
+ buf->st_ctim.tv_sec = ks.st_ctime;
R (retval)
EOF
cat > getpid.c <<EOF
@@ -216,6 +219,9 @@ EOF
cat > stat.c <<EOF
$lu#include <string.h>
#include <sys/stat.h>
+#undef st_atime
+#undef st_mtime
+#undef st_ctime
int
_stat (const char *path, struct stat *buf)
{
@@ -237,9 +243,9 @@ _stat (const char *path, struct stat *buf)
buf->st_size = ks.st_size;
buf->st_blksize = ks.st_blksize;
buf->st_blocks = ks.st_blocks;
- buf->st_atime = ks.st_atime;
- buf->st_mtime = ks.st_mtime;
- buf->st_ctime = ks.st_ctime;
+ buf->st_atim.tv_sec = ks.st_atime;
+ buf->st_mtim.tv_sec = ks.st_mtime;
+ buf->st_ctim.tv_sec = ks.st_ctime;
R (retval)
EOF
cat > times.c <<EOF