Before anyone even _considers_ polluting the API [which would raise an instant veto from me] we have to finally address the create time issue on non-Unix. Then we can get such a patch committed to fit this resolution of this issue..
Unix has ctime, mtime and atime. How often will we change all three at once, or do we want to change a single requested time-at-a-time? In this way, non-unixes that don't support ctime could return the APR_ENOTSUPP error when the user calls to change ctime, but would succeed on changing mtime or atime.
On that note, nearly all real platforms [that is _very_ tounge in cheek, folks] track the file creation time. It's being abused as ctime, but Unix ctime is certainly not file creation time.
Shall we add crtime to track the file creation timestamp, and mark ctime as not present on all the non-unix platforms, while marking crtime as invalid on win32? That means we grow apr_stat_t by one time value [8 bytes or so] but I don't see that as a 'bad thing.' APR_FTYPE_CRTIME would be added to the possible .valid flags.
Bill
At 12:53 PM 3/14/2002, you wrote:
"Robert Simonson" <[EMAIL PROTECTED]> writes:
> This patch adds apr_utime() to the APR. I did this against the unix > directories.
A missing piece for unix is detecting the presence of utime.h and setting the utimeh variable. I think you just need to add utime.h to the APR_FLAG_HEADERS invocation in configure.in, then add an AC_SUBST(utimeh) invocation with the rest of them.
> I don't know how this affects (if at all) other platforms.
If somebody cares they will implement; if not, then it will be missing until somebody starts caring. I wonder if a feature test macro is needed. Initially we'd need to set APR_HAVE_UTIME_H to 0 in apr.hw (Win32) and apr.hnw (Netware).
As far as the name apr_utime():
no freakin' way :) I'd suggest something like apr_file_time_set().
As far as which times to set (atime, ctime, mtime):
I don't care about ctime either. I wonder if anybody else cares.
As far as how to specify those times:
I'd vote for separate parameters instead of stuffing them in a structure. I don't see the benefit to the structure.
-- Jeff Trawick | [EMAIL PROTECTED] Born in Roswell... married an alien...