• Bug report -- utimes()

    From [via djgpp@delorie.com]" @21:1/5 to All on Fri Jul 24 13:41:52 2020
    Hi,

    Jörg Schilling asked me to file this bug report: "Could you send a bug
    report to DJGPP that utimes() officially has a const struct timestruct
    * parameter?". By officially, I assume he means a standard like
    POSIX.

    Regards,
    Albert.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [via djgpp@delorie.com]" @21:1/5 to All on Sat Jul 25 18:42:59 2020
    Am 24.07.2020 15:41, schrieb A. Wik (awik32@gmail.com) [via djgpp@delorie.com]:
    Hi,

    Jörg Schilling asked me to file this bug report: "Could you send a bug report to DJGPP that utimes() officially has a const struct timestruct
    * parameter?". By officially, I assume he means a standard like
    POSIX.

    Regards,
    Albert.



    Sorry, but I do not fully understannd this.
    DJGPP provides utime() and utimes() that fully conform to 4.3BSD, POSIX.1-2001 with regards to their arguments. There is nothing like a const struct timestruct
    as argument. Both functions may be regarded as obsolete now a days but MSDOS is it too.
    The only function providing a const struct timestruct as argument, that I am aware of, are futimens() and utimensat() and they are specified in POSIX.1-2008.
    utimensat() and futimens() update the timestamps of a file with nanosecond precision. This contrasts with the historical utime() and utimes(), which permit only second and microsecond precision, respectively, when setting file timestamps. Of course, on plain DOS and may be on Win95 and Win98, nanosecond and microsecond update of file timesamps are an illusion and have never been provided by the OSs AFAIK. The timestamp granularity is 2 seconds.
    The bottom line of all this is that nothing is wrong; in the best case we are missing a new POSIX function that Jörg Schilling would like to use in his cdrtools.
    It may be likely that fake functions could be provided that in the end will call utime() that will do the job with the MSDOS typical 2 second granularity. If a DJGPP port of cdrtools, using those fake functions, will really work
    as expected on plain DOS will have to be investigated by trial-and-error.


    Regards,
    Juan M. Guerrero

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)