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=389962e4de8a76bf4c32a0a1febb71f3289e1660 The branch, branch-1.4 has been updated via 389962e4de8a76bf4c32a0a1febb71f3289e1660 (commit) from ce29ff7a556f2ddd44263caa1123346f7af2d80a (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 389962e4de8a76bf4c32a0a1febb71f3289e1660 Author: Eric Blake <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> ----------------------------------------------------------------------- Summary of changes: ChangeLog | 8 ++++++++ m4/gnulib-cache.m4 | 4 +++- src/m4.h | 2 ++ src/path.c | 14 +++++--------- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 258bb77..69969b0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-09-22 Eric Blake <[EMAIL PROTECTED]> + + 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 <[EMAIL PROTECTED]> Fix bootstrap for Solaris /bin/sh. diff --git a/m4/gnulib-cache.m4 b/m4/gnulib-cache.m4 index c2d5e1e..49f7c18 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 c-stack clean-temp cloexec close-stream closein config-h error fdl fflush fopen-safer fseeko gendocs getopt git-version-gen gnumakefile gnupload gpl-3.0 intprops mkstemp obstack progname regex sigaction stdbool stdint stdlib-safer strsignal strstr strtod strtol unlocked-io verror version-etc version-etc-fsf xalloc 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 c-stack clean-temp cloexec close-stream closein config-h dirname error fdl fflush filenamecat fopen-safer fseeko gendocs getopt git-version-gen gnumakefile gnupload gpl-3.0 intprops mkstemp obstack progname regex sigaction stdbool stdint stdlib-safer strsignal strstr strtod strtol unlocked-io verror version-etc version-etc-fsf xalloc xprintf xvasprintf-posix # Specification in the form of a few gnulib-tool.m4 macro invocations: gl_LOCAL_DIR([local]) @@ -31,9 +31,11 @@ gl_MODULES([ close-stream closein config-h + dirname error fdl fflush + filenamecat fopen-safer fseeko gendocs diff --git a/src/m4.h b/src/m4.h index 3bdbdca..947a89e 100644 --- a/src/m4.h +++ b/src/m4.h @@ -38,8 +38,10 @@ #include "cloexec.h" #include "close-stream.h" #include "closein.h" +#include "dirname.h" #include "error.h" #include "exitfail.h" +#include "filenamecat.h" #include "obstack.h" #include "stdio--.h" #include "stdlib--.h" diff --git a/src/path.c b/src/path.c index 27ac4cc..4b904fc 100644 --- a/src/path.c +++ b/src/path.c @@ -1,7 +1,7 @@ /* GNU m4 -- A simple macro processor - Copyright (C) 1989, 1990, 1991, 1992, 1993, 2004, 2006, 2007 Free - Software Foundation, Inc. + Copyright (C) 1989, 1990, 1991, 1992, 1993, 2004, 2006, 2007, 2008 + Free Software Foundation, Inc. This file is part of GNU M4. @@ -141,17 +141,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); @@ -172,8 +168,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
