summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2011-09-23 12:32:41 +0200
committerBruno Haible <bruno@clisp.org>2011-09-23 12:36:08 +0200
commit0d22381b8090eefaf8a5f0c5b9e196ea40b12231 (patch)
tree17445bbcadb5a8dc1bf3a2ccedca9a59a3031b81 /modules
parent07fb52f87fecb1e12eece031a9dec184cacdde12 (diff)
downloadgnulib-0d22381b8090eefaf8a5f0c5b9e196ea40b12231.tar.gz
New module 'chdir'.
* modules/chdir: New file. * lib/unistd.in.h: Include <io.h>, <direct.h> also for chdir. (chdir): New declaration. * m4/unistd_h.m4 (gl_UNISTD_H): Test whether chdir is declared. (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_CHDIR. * modules/unistd (Makefile.am): Substitute GNULIB_CHDIR. * tests/test-unistd-c++.cc: Check signature of chdir. * doc/posix-functions/chdir.texi: Mention problem on native Windows. * modules/chdir-long (Depends-on): Add chdir. * modules/fchdir (Depends-on): Likewise. * modules/rename (Depends-on): Likewise. * modules/savewd (Depends-on): Likewise.
Diffstat (limited to 'modules')
-rw-r--r--modules/chdir21
-rw-r--r--modules/chdir-long1
-rw-r--r--modules/fchdir1
-rw-r--r--modules/rename1
-rw-r--r--modules/savewd1
-rw-r--r--modules/unistd1
6 files changed, 26 insertions, 0 deletions
diff --git a/modules/chdir b/modules/chdir
new file mode 100644
index 0000000000..b827339ecf
--- /dev/null
+++ b/modules/chdir
@@ -0,0 +1,21 @@
+Description:
+chdir() function: switch to another current directory
+
+Files:
+
+Depends-on:
+unistd
+
+configure.ac:
+gl_UNISTD_MODULE_INDICATOR([chdir])
+
+Makefile.am:
+
+Include:
+<unistd.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+Bruno Haible
diff --git a/modules/chdir-long b/modules/chdir-long
index 7f54760ee4..74d9c33f70 100644
--- a/modules/chdir-long
+++ b/modules/chdir-long
@@ -10,6 +10,7 @@ m4/pathmax.m4
Depends-on:
unistd
pathmax
+chdir
atexit [test $gl_cv_have_arbitrary_file_name_length_limit = yes]
fchdir [test $gl_cv_have_arbitrary_file_name_length_limit = yes]
fcntl-h [test $gl_cv_have_arbitrary_file_name_length_limit = yes]
diff --git a/modules/fchdir b/modules/fchdir
index 7b7cb043b5..80b2bb826d 100644
--- a/modules/fchdir
+++ b/modules/fchdir
@@ -7,6 +7,7 @@ m4/fchdir.m4
Depends-on:
unistd
+chdir [test $HAVE_FCHDIR = 0]
close [test $HAVE_FCHDIR = 0]
dirent [test $HAVE_FCHDIR = 0]
dirfd [test $HAVE_FCHDIR = 0]
diff --git a/modules/rename b/modules/rename
index 52ca382d37..582d63083d 100644
--- a/modules/rename
+++ b/modules/rename
@@ -8,6 +8,7 @@ m4/rename.m4
Depends-on:
stdio
canonicalize-lgpl [test $REPLACE_RENAME = 1]
+chdir [test $REPLACE_RENAME = 1]
dirname-lgpl [test $REPLACE_RENAME = 1]
lstat [test $REPLACE_RENAME = 1]
rmdir [test $REPLACE_RENAME = 1]
diff --git a/modules/savewd b/modules/savewd
index 1e95b4127d..9a7b8c72cf 100644
--- a/modules/savewd
+++ b/modules/savewd
@@ -7,6 +7,7 @@ lib/savewd.c
m4/savewd.m4
Depends-on:
+chdir
dosname
errno
fchdir
diff --git a/modules/unistd b/modules/unistd
index 77ce7a8230..3d31734507 100644
--- a/modules/unistd
+++ b/modules/unistd
@@ -30,6 +30,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
+ -e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \
-e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \
-e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \
-e 's/@''GNULIB_DUP2''@/$(GNULIB_DUP2)/g' \