public inbox for newlib-cvs@sourceware.org help / color / mirror / Atom feed
From: Jeff Johnston <jjohnstn@sourceware.org> To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] Revert previous change to sys/stat.h and fix cris libgloss Date: Mon, 19 Aug 2019 22:04:00 -0000 [thread overview] Message-ID: <20190819220436.51609.qmail@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=b99887c4283f7b21428d21f98ae9f6fcf573c756 commit b99887c4283f7b21428d21f98ae9f6fcf573c756 Author: Jeff Johnston <jjohnstn@redhat.com> Date: Mon Aug 19 18:01:45 2019 -0400 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 Diff: --- libgloss/cris/gensyscalls | 18 ++++++++++++------ newlib/libc/include/sys/stat.h | 9 --------- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/libgloss/cris/gensyscalls b/libgloss/cris/gensyscalls index 3e2f9af..c36f284 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 diff --git a/newlib/libc/include/sys/stat.h b/newlib/libc/include/sys/stat.h index 4092998..8769112 100644 --- a/newlib/libc/include/sys/stat.h +++ b/newlib/libc/include/sys/stat.h @@ -38,15 +38,6 @@ struct stat time_t st_atime; time_t st_mtime; time_t st_ctime; -#elif defined(__cris__) - time_t st_atime; - long st_spare1; - time_t st_mtime; - long st_spare2; - time_t st_ctime; - long st_spare3; - blksize_t st_blksize; - blkcnt_t st_blocks; #else struct timespec st_atim; struct timespec st_mtim;
reply other threads:[~2019-08-19 22:04 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190819220436.51609.qmail@sourceware.org \ --to=jjohnstn@sourceware.org \ --cc=newlib-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).