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
This commit is contained in:
parent
b1f61c03ec
commit
6d7e9786b9
|
@ -60,6 +60,9 @@ EOF
|
||||||
cat > fstat.c <<EOF
|
cat > fstat.c <<EOF
|
||||||
$lu#include <string.h>
|
$lu#include <string.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
#undef st_atime
|
||||||
|
#undef st_mtime
|
||||||
|
#undef st_ctime
|
||||||
int
|
int
|
||||||
_fstat (int fd, struct stat *buf)
|
_fstat (int fd, struct stat *buf)
|
||||||
{
|
{
|
||||||
|
@ -81,9 +84,9 @@ _fstat (int fd, struct stat *buf)
|
||||||
buf->st_size = ks.st_size;
|
buf->st_size = ks.st_size;
|
||||||
buf->st_blksize = ks.st_blksize;
|
buf->st_blksize = ks.st_blksize;
|
||||||
buf->st_blocks = ks.st_blocks;
|
buf->st_blocks = ks.st_blocks;
|
||||||
buf->st_atime = ks.st_atime;
|
buf->st_atim.tv_sec = ks.st_atime;
|
||||||
buf->st_mtime = ks.st_mtime;
|
buf->st_mtim.tv_sec = ks.st_mtime;
|
||||||
buf->st_ctime = ks.st_ctime;
|
buf->st_ctim.tv_sec = ks.st_ctime;
|
||||||
R (retval)
|
R (retval)
|
||||||
EOF
|
EOF
|
||||||
cat > getpid.c <<EOF
|
cat > getpid.c <<EOF
|
||||||
|
@ -216,6 +219,9 @@ EOF
|
||||||
cat > stat.c <<EOF
|
cat > stat.c <<EOF
|
||||||
$lu#include <string.h>
|
$lu#include <string.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
#undef st_atime
|
||||||
|
#undef st_mtime
|
||||||
|
#undef st_ctime
|
||||||
int
|
int
|
||||||
_stat (const char *path, struct stat *buf)
|
_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_size = ks.st_size;
|
||||||
buf->st_blksize = ks.st_blksize;
|
buf->st_blksize = ks.st_blksize;
|
||||||
buf->st_blocks = ks.st_blocks;
|
buf->st_blocks = ks.st_blocks;
|
||||||
buf->st_atime = ks.st_atime;
|
buf->st_atim.tv_sec = ks.st_atime;
|
||||||
buf->st_mtime = ks.st_mtime;
|
buf->st_mtim.tv_sec = ks.st_mtime;
|
||||||
buf->st_ctime = ks.st_ctime;
|
buf->st_ctim.tv_sec = ks.st_ctime;
|
||||||
R (retval)
|
R (retval)
|
||||||
EOF
|
EOF
|
||||||
cat > times.c <<EOF
|
cat > times.c <<EOF
|
||||||
|
|
|
@ -38,15 +38,6 @@ struct stat
|
||||||
time_t st_atime;
|
time_t st_atime;
|
||||||
time_t st_mtime;
|
time_t st_mtime;
|
||||||
time_t st_ctime;
|
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
|
#else
|
||||||
struct timespec st_atim;
|
struct timespec st_atim;
|
||||||
struct timespec st_mtim;
|
struct timespec st_mtim;
|
||||||
|
|
Loading…
Reference in New Issue