gettimeofday: port recent C++ fix to Emacs
[gnulib.git] / doc / posix-functions / rmdir.texi
1 @node rmdir
2 @section @code{rmdir}
3 @findex rmdir
4
5 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/rmdir.html}
6
7 Gnulib module: rmdir
8
9 Portability problems fixed by Gnulib:
10 @itemize
11 @item
12 This function is declared in different header files (namely, @code{<io.h>} or
13 @code{<direct.h>}) on some platforms:
14 mingw, MSVC 9.
15 @item
16 This function mistakenly removes a directory with
17 @code{rmdir("dir/./")} on some platforms:
18 Cygwin 1.5.x.
19 @item
20 This function fails with @code{EINVAL} instead of the expected
21 @code{ENOTDIR} for @code{rmdir("file/")} on some platforms:
22 mingw, MSVC 9.
23 @end itemize
24
25 Portability problems not fixed by Gnulib:
26 @itemize
27 @item
28 When @code{rmdir} fails because the specified directory is not empty, the
29 @code{errno} value is system dependent.
30 @item
31 POSIX requires that @code{rmdir("link-to-empty/")} remove @file{empty}
32 and leave @file{link-to-empty} as a dangling symlink.  This is
33 counter-intuitive, so some systems fail with @code{ENOTDIR} instead:
34 glibc
35 @end itemize