unistd et al.: Don't assume <unistd.h> exists.
authorBruno Haible <bruno@clisp.org>
Sun, 11 Sep 2011 19:44:32 +0000 (21:44 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 11 Sep 2011 19:44:32 +0000 (21:44 +0200)
commit912da04e8be8f7b78ea66c0fba08b2ceb292b8b0
treed419d259a7fac387556d297dd6e00047b0a8f7cf
parentcd06f44c35f1e2a49c806686c8f9f6fcf1902a45
unistd et al.: Don't assume <unistd.h> exists.

* m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Don't include <unistd.h> if it
does not exist.
* m4/environ.m4 (gl_ENVIRON): Don't include <unistd.h> if it does not
exist. But include <stdlib.h>.
* m4/fcntl-o.m4 (gl_FCNTL_O_FLAGS): If <unistd.h> does not exist,
include <io.h> and <stdlib.h> instead. Don't test symbolink links if
symlink() does not exist.
* m4/fflush.m4 (gl_FUNC_FFLUSH_STDIN): If <unistd.h> does not exist,
include <io.h> instead.
* m4/free.m4 (gl_FUNC_FREE): Assume free(NULL) works on native Windows.
* m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): If <unistd.h> does not exist,
include <direct.h> instead.
* m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Likewise.
* m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
* m4/lseek.m4 (gl_FUNC_LSEEK): If <unistd.h> does not exist, include
<io.h> instead.
* m4/rename.m4 (gl_FUNC_RENAME): Assume rename() manages hard links
correctly if the system does not have hard links.
* m4/rmdir.m4 (gl_FUNC_RMDIR): If <unistd.h> does not exist, include
<direct.h> instead.
* m4/unistd_h.m4 (gl_UNISTD_H): If <unistd.h> does not exist, bypass
it when looking for function declarations.
* m4/unlink.m4 (gl_FUNC_UNLINK): If <unistd.h> does not exist, include
<direct.h> and <io.h> instead.
* doc/posix-headers/unistd.texi: More details about MSVC problem.
15 files changed:
ChangeLog
doc/posix-headers/unistd.texi
m4/chdir-long.m4
m4/environ.m4
m4/fcntl-o.m4
m4/fflush.m4
m4/free.m4
m4/getcwd-abort-bug.m4
m4/getcwd-path-max.m4
m4/getcwd.m4
m4/lseek.m4
m4/rename.m4
m4/rmdir.m4
m4/unistd_h.m4
m4/unlink.m4