mg

port of mg editor (openbsd to linux)
Log | Files | Refs | README

commit b9f4849a14c2801929ea9ea72df14c0ab2f038ca
parent e78e8fa4fe7355a0df632eb69ecf6ef7152b0f29
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Mon, 24 Nov 2014 20:54:26 +0100

don't use timespec (yet)

Diffstat:
fileio.c | 7+++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/fileio.c b/fileio.c @@ -64,7 +64,7 @@ ffstat(FILE *ffp, struct buffer *bp) bp->b_fi.fi_mode = sb.st_mode | 0x8000; bp->b_fi.fi_uid = sb.st_uid; bp->b_fi.fi_gid = sb.st_gid; - bp->b_fi.fi_mtime = sb.st_mtimespec; + bp->b_fi.fi_mtime = sb.st_mtim; /* Clear the ignore flag */ bp->b_flag &= ~(BFIGNDIRTY | BFDIRTY); } @@ -580,12 +580,11 @@ fchecktime(struct buffer *bp) if (stat(bp->b_fname, &sb) == -1) return (TRUE); - if (bp->b_fi.fi_mtime.tv_sec != sb.st_mtimespec.tv_sec || - bp->b_fi.fi_mtime.tv_nsec != sb.st_mtimespec.tv_nsec) + if (bp->b_fi.fi_mtime.tv_sec != sb.st_mtim.tv_sec || + bp->b_fi.fi_mtime.tv_nsec != sb.st_mtim.tv_nsec) return (FALSE); return (TRUE); - } /*