Reply to utime() question at RELAY.CS.NET at RELAY.CS.NET
Wed Aug 1 07:56:44 AEST 1990


CEO document contents:

In article <405 at usenix.ORG> <uunet!!audfax!arnold> writes:
>From:  arnold at (Arnold Robbins)
>Can someone with access to the 1003.1 standard tell me if the utime(2)
>system call is standardized, and if so if the definition of struct utimbuf
>is supposed to be in a particular header file?

       #include <sys/types.h>
       #include <utime.h>

       Int utime(path,times)
       char *path;
       struct utimebuf *times;

The utimbuf structure is defined by the header <utime.h>, and included the
following members:
       TYPE    NAME            Description
       time_t  actime          Access time
       time_t  modtime         Modification time

The 1990 revision of 1003.1 changes the definition to use an ANSI prototype:
       int utime(char *path, struct utimebuf *times);
and add the restriction the the utimebuf structure may not contain any members
other than the ones listed in the standard.

Note that utime() is the only function [I believe] where a structure is passed
into the system without having been obtained by a prior library call.  This 
makes it "special".  I would guess that this is why AT&T never put it into a
header file.

                       --Donald Lewine

Volume-Number: Volume 20, Number 153

More information about the Comp.std.unix mailing list