… | |
… | |
816 | |
816 | |
817 | return res; |
817 | return res; |
818 | } |
818 | } |
819 | #endif |
819 | #endif |
820 | |
820 | |
821 | #ifndef HAVE_FUTIMES |
821 | #ifndef HAVE_UTIMES |
822 | |
822 | |
823 | # undef utimes |
823 | # undef utimes |
824 | # undef futimes |
|
|
825 | # define utimes(path,times) eio__utimes (path, times) |
824 | # define utimes(path,times) eio__utimes (path, times) |
826 | # define futimes(fd,times) eio__futimes (fd, times) |
|
|
827 | |
825 | |
828 | static int |
826 | static int |
829 | eio__utimes (const char *filename, const struct timeval times[2]) |
827 | eio__utimes (const char *filename, const struct timeval times[2]) |
830 | { |
828 | { |
831 | if (times) |
829 | if (times) |
… | |
… | |
838 | return utime (filename, &buf); |
836 | return utime (filename, &buf); |
839 | } |
837 | } |
840 | else |
838 | else |
841 | return utime (filename, 0); |
839 | return utime (filename, 0); |
842 | } |
840 | } |
|
|
841 | |
|
|
842 | #endif |
|
|
843 | |
|
|
844 | #ifndef HAVE_FUTIMES |
|
|
845 | |
|
|
846 | # undef futimes |
|
|
847 | # define futimes(fd,times) eio__futimes (fd, times) |
843 | |
848 | |
844 | static int eio__futimes (int fd, const struct timeval tv[2]) |
849 | static int eio__futimes (int fd, const struct timeval tv[2]) |
845 | { |
850 | { |
846 | errno = ENOSYS; |
851 | errno = ENOSYS; |
847 | return -1; |
852 | return -1; |