delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/11/14/15:35:10

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <20011114203038.54936.qmail@web13903.mail.yahoo.com>
Date: Wed, 14 Nov 2001 12:30:38 -0800 (PST)
From: chad fowler <chadfowler AT yahoo DOT com>
Subject: Re: utime Bug?
To: egor duda <cygwin AT cygwin DOT com>
In-Reply-To: <17831213001.20011114231400@logos-m.ru>
MIME-Version: 1.0

> cf> When you use utime to set the actime to 0 (the
> epoch),
> cf> stat will show actime as being whatever modtime
> is set
> cf> to for that file.  If you set it to anything
> else (1,
> cf> for example), actime is reflected accurately by
> stat.
> 
> cf> Am I off base?  The same code on my Debian box
> returns
> cf> the epoc for atime (instead of the modtime
> value).
> 
> you should provide some details. a small testcase
> demonstrating a
> problem is highly desirable. see
> http://cygwin.com/cygwin/bugs.html
> for bug-reporting buidelines.
> 

Hi, thanks for the response.  I apologize for not
supplying a test case.  Here's a modification of your
example program that demonstrates what I mean:


#include <utime.h>
#include <sys/stat.h>
#include <sys/types.h>
int main()
{
  struct utimbuf s;
  struct utimbuf s2;
  struct stat info;
  s.actime = 0;
  s.modtime = 1;
  utime ("./x", &s);
  stat("./x",&info);
  printf("  utime.file access time is %ld\n",
info.st_atime);  // prints "1".  I would expect "0".
  s.actime = 3;
  s.modtime = 1;
  utime ("./x", &s);
  stat("./x",&info);
  printf("  utime.file access time is %ld\n",
info.st_atime); // prints "3", which is both expected
and inconsistent with the one above.
}

I'm on cygwin-1.3.5 and Windows2000

Thanks,
Chad

__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019