home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 January
/
usenetsourcesnewsgroupsinfomagicjanuary1994.iso
/
sources
/
std_unix
/
v21
/
020
< prev
next >
Wrap
Internet Message Format
|
1990-12-05
|
2KB
From uucp@tic.com Tue Aug 7 20:13:25 1990
Received: from cs.utexas.edu by uunet.uu.net (5.61/1.14) with SMTP
id AA14891; Tue, 7 Aug 90 20:13:25 -0400
Posted-Date: 7 Aug 90 17:37:01 GMT
Received: by cs.utexas.edu (5.64/1.68)
id AA22134; Tue, 7 Aug 90 17:58:40 -0500
Received: by longway.tic.com (4.22/tic.1.2)
id AA03996; Tue, 7 Aug 90 16:52:12 cdt
From: Guy Harris <auspex!guy@cs.utexas.edu>
Newsgroups: comp.std.unix
Subject: Re: is struct utimbuf in the standard sys/types.h?
Message-Id: <10980@cs.utexas.edu>
References: <423@usenix.ORG> <10937@cs.utexas.edu>
Sender: fletcher@cs.utexas.edu
Reply-To: std-unix@uunet.uu.net
Organization: Auspex Systems, Santa Clara
Date: 7 Aug 90 17:37:01 GMT
Apparently-To: std-unix-archive@uunet.uu.net
From: guy@auspex.uucp (Guy Harris)
>I am having some difficulty following the above. How can a portable
>application do anything to vendor-defined fields?
That's precisely the problem.
>Isn't the application non-portable as soon as it does anything (read or write)
>to a vendor-defined field?
Yup. Unfortunately, the application is non-functional (at least not
*correctly* functional) if it *doesn't* initialize the vendor-defined
fields of a structure that's handed to the system, unless the system can
somehow always figure out that they haven't been initialized - e.g., if
there's some flag field in the structure that *is* specified by the
standard, and you have to set some flag in that field *not* specified by
the standard in order to get the system to look at the other fields not
in the standard.
Unfortunately, in the case of "utime()", there's no such flag, so a
portable application can, at best, only avoid setting the microseconds
values of a file's accessed or modified times to some random value by
"memset"ting the entire "utimbuf" structure to zero before filling it in
and using it (or otherwise ensuring that the structure is zero before
using it, e.g. using a static structure).
Volume-Number: Volume 21, Number 20