rmdir ¶POSIX specification:
https://pubs.opengroup.org/onlinepubs/9799919799/functions/rmdir.html
Portability problems fixed by Gnulib:
<io.h> or
<direct.h>) on some platforms:
mingw, MSVC 14.
rmdir("dir/./") on some platforms:
Cygwin 1.5.x.
EINVAL instead of the expected
ENOTDIR for rmdir("file/") on some platforms:
mingw, MSVC 14.
Portability problems not fixed by Gnulib:
rmdir fails because the specified directory is not empty, the
errno value is system dependent.
rmdir("link-to-empty/") remove empty
and leave link-to-empty as a dangling symlink. This is
counter-intuitive, so some systems fail with ENOTDIR instead:
glibc