summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Blake <ebb9@byu.net>2008-09-25 07:17:25 -0600
committerEric Blake <ebb9@byu.net>2008-09-25 14:32:03 -0600
commitd46d4cdd7e8c0edef237818f7f254130d346cc97 (patch)
tree7aea238c2f85095ab0423777ecca9569fce6b6d5
parent1948a3f2b75f967d540b37bea3485282e407c922 (diff)
downloadm4-d46d4cdd7e8c0edef237818f7f254130d346cc97.tar.gz
Avoid bugs on platforms that mishandle trailing /.
* ltdl/m4/gnulib-cache.m4: Import fopen module. * tests/others.at (directory): New test. Signed-off-by: Eric Blake <ebb9@byu.net> (cherry picked from commit ce1f8f6861b928b7b587d69eee2000a0101e3381)
-rw-r--r--ChangeLog6
-rw-r--r--ltdl/m4/gnulib-cache.m43
-rw-r--r--tests/others.at32
3 files changed, 40 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 1acc1676..8b0f04a8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-09-25 Eric Blake <ebb9@byu.net>
+
+ Avoid bugs on platforms that mishandle trailing /.
+ * ltdl/m4/gnulib-cache.m4: Import fopen module.
+ * tests/others.at (directory): New test.
+
2008-09-16 Eric Blake <ebb9@byu.net>
Fix bootstrap for Solaris /bin/sh.
diff --git a/ltdl/m4/gnulib-cache.m4 b/ltdl/m4/gnulib-cache.m4
index f61b8d7d..64ef86b9 100644
--- a/ltdl/m4/gnulib-cache.m4
+++ b/ltdl/m4/gnulib-cache.m4
@@ -15,7 +15,7 @@
# Specification in the form of a command-line invocation:
-# gnulib-tool --import --dir=. --local-dir=local --lib=libgnu --source-base=gnu --m4-base=ltdl/m4 --doc-base=doc --aux-dir=build-aux --with-tests --libtool --macro-prefix=M4 assert autobuild avltree-oset binary-io clean-temp cloexec close-stream closein config-h configmake dirname error exit fdl fflush filenamecat flexmember fopen-safer fseeko gendocs gettext git-version-gen gnumakefile gnupload gpl-3.0 intprops memmem mkstemp obstack obstack-printf-posix progname propername quote regex regexprops-generic sprintf-posix stdbool stdlib-safer strnlen strtod strtol tempname unlocked-io vasnprintf-posix verify verror xalloc xalloc-die xmemdup0 xprintf-posix xstrndup xvasprintf-posix
+# gnulib-tool --import --dir=. --local-dir=local --lib=libgnu --source-base=gnu --m4-base=ltdl/m4 --doc-base=doc --tests-base=tests/gnu --aux-dir=build-aux --with-tests --libtool --macro-prefix=M4 assert autobuild avltree-oset binary-io clean-temp cloexec close-stream closein config-h configmake dirname error exit fdl fflush filenamecat flexmember fopen fopen-safer fseeko gendocs gettext git-version-gen gnumakefile gnupload gpl-3.0 intprops memmem mkstemp obstack obstack-printf-posix progname propername quote regex regexprops-generic sprintf-posix stdbool stdlib-safer strnlen strtod strtol tempname unlocked-io vasnprintf-posix verify verror xalloc xalloc-die xmemdup0 xprintf-posix xstrndup xvasprintf-posix
# Specification in the form of a few gnulib-tool.m4 macro invocations:
gl_LOCAL_DIR([local])
@@ -37,6 +37,7 @@ gl_MODULES([
fflush
filenamecat
flexmember
+ fopen
fopen-safer
fseeko
gendocs
diff --git a/tests/others.at b/tests/others.at
index a1111c69..666409ee 100644
--- a/tests/others.at
+++ b/tests/others.at
@@ -124,6 +124,38 @@ Done
AT_CLEANUP
+## --------- ##
+## directory ##
+## --------- ##
+
+AT_SETUP([directory])
+
+AT_DATA([in1.m4],
+[[include(`in2.m4/')
+]])
+AT_DATA([in2.m4],
+[[sinclude(`in2.m4/')
+]])
+
+AT_CHECK_M4([in1.m4/], [1], [], [stderr])
+dnl mingw fails with EINVAL rather than the expected ENOTDIR
+AT_CHECK([sed 's/Invalid argument/Not a directory/' stderr], [0],
+[[m4: cannot open file `in1.m4/': Not a directory
+]])
+
+AT_CHECK_M4([in1.m4], [1], [[
+]], [stderr])
+dnl mingw fails with EINVAL rather than the expected ENOTDIR
+AT_CHECK([sed 's/Invalid argument/Not a directory/' stderr], [0],
+[[m4:in1.m4:1: include: cannot open `in2.m4/': Not a directory
+]])
+
+AT_CHECK_M4([in2.m4], [0], [[
+]])
+
+AT_CLEANUP
+
+
## ------- ##
## foreach ##
## ------- ##