Eric Blake wrote: > Tested on cygwin 1.7.0, where futimens and utimensat exist, and on cygwin > 1.5.25, where those and futimesat are all missing. OK to apply? This > means that coreutils can now support nanosecond resolution on new enough > kernels for things like touch and cp -p.
Two nits (I'm really only nitpicking): - You introduce two #ifs that have to be the same condition: #if HAVE_FUTIMESAT || HAVE_WORKING_UTIMES ... #if HAVE_FUTIMESAT || HAVE_WORKING_UTIMES It is preferrable, for maintenance (I speak from experience with vasnprintf.c...) to have this #if only at one place. In this case, I would simply add a brace group to the contents and reindent: #if HAVE_FUTIMESAT || HAVE_WORKING_UTIMES { struct timeval timeval[2]; ... } #endif - Is it conceivable that a platform has HAVE_FUTIMENS && (HAVE_FUTIMESAT || HAVE_WORKING_UTIMES) ? In this case, gcc will warn about dead/unreached code. I would change the #if HAVE_FUTIMENS return futimens (fd, timespec); #endif to #if HAVE_FUTIMENS return futimens (fd, timespec); #else ... rest of the function ... #endif Bruno