* nt/gnulib-cfg.mk (OMIT_GNULIB_MODULE_fchmodat)
(OMIT_GNULIB_MODULE_lchmod): Set to true to omit building these
modules on MS-Windows.
* nt/mingw-cfg.site (ac_cv_func_fchmodat)
(gl_cv_func_fchmodat_works, ac_cv_func_lchmod): Disable tests on
MS-Windows.
* src/w32.c (chmod_worker, lchmod, fchmodat): New functions.
(sys_chmod): Move most of the code to chmod_worker.
* src/w32.h (fchmodat, lchmod): Add prototypes.