Path: utzoo!attcan!uunet!decwrl!ucbvax!usenix!std-unix From: Don_Lewine%dgc.ceo.dg.com@RELAY.CS.NET Newsgroups: comp.std.unix Subject: Reply to utime() question Message-ID: <412@usenix.ORG> Date: 31 Jul 90 21:56:44 GMT References: <405@usenix.ORG> Sender: std-unix@usenix.ORG Reply-To: std-unix@uunet.uu.net Lines: 41 Approved: jsq@usenix (Moderator, John Quarterman) From: Don_Lewine%dgc.ceo.dg.com@RELAY.CS.NET CEO document contents: In article <405@usenix.ORG> writes: >From: arnold@audiofax.com (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? >From POSIX 5.6.6.1: #include #include Int utime(path,times) char *path; struct utimebuf *times; >From 5.6.6.2: The utimbuf structure is defined by the header , 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 uunet!dg!lewine Volume-Number: Volume 20, Number 153