[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU M4 source repository branch, branch-1.6, updated. v1.5.89a-60-
From: |
Eric Blake |
Subject: |
[SCM] GNU M4 source repository branch, branch-1.6, updated. v1.5.89a-60-g75f4447 |
Date: |
Tue, 23 Sep 2008 12:56:05 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU M4 source repository".
http://git.sv.gnu.org/gitweb/?p=m4.git;a=commitdiff;h=75f444724834fafe495fe10bb73a261150623726
The branch, branch-1.6 has been updated
via 75f444724834fafe495fe10bb73a261150623726 (commit)
from ab54efc2668f2ba28d1921ff65afe2352d485a6c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 75f444724834fafe495fe10bb73a261150623726
Author: Eric Blake <address@hidden>
Date: Mon Sep 22 21:17:43 2008 -0600
Support alternate path separator.
* m4/gnulib-cache.m4: Import dirname and filenamecat modules.
* src/m4.h (includes): Add headers.
* src/path.c (m4_path_search): Avoid literal use of '/' as path
separator and when detecting absolute paths.
Signed-off-by: Eric Blake <address@hidden>
(cherry picked from commit 389962e4de8a76bf4c32a0a1febb71f3289e1660)
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 8 ++++++++
m4/gnulib-cache.m4 | 4 +++-
src/m4.h | 2 ++
src/path.c | 10 +++-------
4 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index c4e9052..da4838e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-09-22 Eric Blake <address@hidden>
+
+ Support alternate path separator.
+ * m4/gnulib-cache.m4: Import dirname and filenamecat modules.
+ * src/m4.h (includes): Add headers.
+ * src/path.c (m4_path_search): Avoid literal use of '/' as path
+ separator and when detecting absolute paths.
+
2008-09-16 Eric Blake <address@hidden>
Fix bootstrap for Solaris /bin/sh.
diff --git a/m4/gnulib-cache.m4 b/m4/gnulib-cache.m4
index a512830..1f78e71 100644
--- a/m4/gnulib-cache.m4
+++ b/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=libm4
--source-base=lib --m4-base=m4 --doc-base=doc --aux-dir=build-aux --with-tests
--no-libtool --macro-prefix=M4 announce-gen assert autobuild avltree-oset
binary-io clean-temp cloexec close-stream closein config-h error fdl fflush
flexmember fopen-safer fseeko gendocs getopt git-version-gen gnumakefile
gnupload gpl-3.0 hash intprops memmem mkstemp obstack obstack-printf-posix
progname quote regex stdbool stdint stdlib-safer strtod strtol unlocked-io
vasnprintf-posix verror version-etc version-etc-fsf xalloc xmemdup0 xprintf
xvasprintf-posix
+# gnulib-tool --import --dir=. --local-dir=local --lib=libm4
--source-base=lib --m4-base=m4 --doc-base=doc --aux-dir=build-aux --with-tests
--no-libtool --macro-prefix=M4 announce-gen assert autobuild avltree-oset
binary-io clean-temp cloexec close-stream closein config-h dirname error fdl
fflush filenamecat flexmember fopen-safer fseeko gendocs getopt git-version-gen
gnumakefile gnupload gpl-3.0 hash intprops memmem mkstemp obstack
obstack-printf-posix progname quote regex stdbool stdint stdlib-safer strtod
strtol unlocked-io vasnprintf-posix verror version-etc version-etc-fsf xalloc
xmemdup0 xprintf xvasprintf-posix
# Specification in the form of a few gnulib-tool.m4 macro invocations:
gl_LOCAL_DIR([local])
@@ -30,9 +30,11 @@ gl_MODULES([
close-stream
closein
config-h
+ dirname
error
fdl
fflush
+ filenamecat
flexmember
fopen-safer
fseeko
diff --git a/src/m4.h b/src/m4.h
index 27c0fa7..f643e49 100644
--- a/src/m4.h
+++ b/src/m4.h
@@ -39,8 +39,10 @@
#include "cloexec.h"
#include "close-stream.h"
#include "closein.h"
+#include "dirname.h"
#include "error.h"
#include "exitfail.h"
+#include "filenamecat.h"
#include "intprops.h"
#include "obstack.h"
#include "quotearg.h"
diff --git a/src/path.c b/src/path.c
index 998c0ed..c0d7df7 100644
--- a/src/path.c
+++ b/src/path.c
@@ -140,17 +140,13 @@ m4_path_search (const char *file, char **result)
}
/* If file not found, and filename absolute, fail. */
- if (*file == '/' || no_gnu_extensions)
+ if (IS_ABSOLUTE_FILE_NAME (file) || no_gnu_extensions)
return NULL;
e = errno;
- name = (char *) xmalloc (dir_max_length + 1 + strlen (file) + 1);
-
for (incl = dir_list; incl != NULL; incl = incl->next)
{
- strncpy (name, incl->dir, incl->len);
- name[incl->len] = '/';
- strcpy (name + incl->len + 1, file);
+ name = file_name_concat (incl->dir, file, NULL);
#ifdef DEBUG_INCL
xfprintf (stderr, "m4_path_search (%s) -- trying %s\n", file, name);
@@ -170,8 +166,8 @@ m4_path_search (const char *file, char **result)
errno = e;
return fp;
}
+ free (name);
}
- free (name);
errno = e;
return fp;
}
hooks/post-receive
--
GNU M4 source repository
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU M4 source repository branch, branch-1.6, updated. v1.5.89a-60-g75f4447,
Eric Blake <=