Hash :
657fb89d
Author :
Date :
2009-09-23T20:33:40
fchdir: another mingw fix
canonicalize_file_name does not understand drive letters or
backslash. The only reason openat required it was to make
fchdir get the canonical name of a directory. But we can do
the same trick with chdir and getcwd. With this fix,
fchdir(open("..",O_RDONLY)) finally does the right thing on mingw.
* modules/fchdir (Depends-on): Drop canonicalize-lgpl.
* lib/fchdir.c (get_name): New helper method; skips canonicalize
on mingw (where it has not yet been ported), and make it optional
elsewhere.
(_gl_register_fd): Use it.
Signed-off-by: Eric Blake <ebb9@byu.net>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
Description:
fchdir() function: change current directory, given an open file descriptor.
Files:
lib/fchdir.c
m4/fchdir.m4
Depends-on:
close
dirent
dirfd
dup2
fcntl-h
include_next
malloc-posix
open
realloc-posix
stat
stdbool
strdup-posix
sys_stat
unistd
configure.ac:
gl_FUNC_FCHDIR
gl_UNISTD_MODULE_INDICATOR([fchdir])
Makefile.am:
Include:
<unistd.h>
License:
LGPL
Maintainer:
Bruno Haible