X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Ffilenamecat.c;h=bccffb25d84c8d30e8830ad11ad05e75091e4880;hb=39bc7a80b6719b1c7d0f8fb1b01380649cb8e358;hp=f56697a6d2d84f3b27e6caf084b3d6ebcdce6657;hpb=359c0a71713e606f440d40f55a43c77349df2aaa;p=gnulib.git diff --git a/lib/filenamecat.c b/lib/filenamecat.c index f56697a6d..bccffb25d 100644 --- a/lib/filenamecat.c +++ b/lib/filenamecat.c @@ -1,7 +1,7 @@ /* Concatenate two arbitrary file names. - Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free - Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, + 2005, 2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,9 +19,7 @@ /* Written by Jim Meyering. */ -#if HAVE_CONFIG_H -# include -#endif +#include /* Specification. */ #include "filenamecat.h" @@ -64,7 +62,7 @@ longest_relative_suffix (char const *f) char * file_name_concat (char const *dir, char const *abase, char **base_in_result) { - char const *dirbase = base_name (dir); + char const *dirbase = last_component (dir); size_t dirbaselen = base_len (dirbase); size_t dirlen = dirbase - dir + dirbaselen; size_t needs_separator = (dirbaselen && ! ISSLASH (dirbase[dirbaselen - 1]));