X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fpath-concat.c;h=86579b7369fd7cce6b446e6920db45dabf10140a;hb=93627d90a57bd8190dc5adc94685b7e2d96d9312;hp=c7f041bbda1f1a8fe6cfd589bc1e191c35c99ba8;hpb=0f1677ef046efa671e65fbb05a204dfd5f2ee820;p=gnulib.git diff --git a/lib/path-concat.c b/lib/path-concat.c index c7f041bbd..86579b736 100644 --- a/lib/path-concat.c +++ b/lib/path-concat.c @@ -1,5 +1,5 @@ /* path-concat.c -- concatenate two arbitrary pathnames - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998 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 @@ -17,7 +17,7 @@ /* Written by Jim Meyering. */ -#ifdef HAVE_CONFIG_H +#if HAVE_CONFIG_H # include #endif @@ -26,6 +26,9 @@ #endif #include +#if HAVE_STRING_H +# include +#endif #include char *malloc (); @@ -39,10 +42,7 @@ char *malloc (); BASE in the returned concatenation. */ char * -path_concat (dir, base, base_in_result) - const char *dir; - const char *base; - char **base_in_result; +path_concat (const char *dir, const char *base, char **base_in_result) { char *p; char *p_concat; @@ -63,7 +63,7 @@ path_concat (dir, base, base_in_result) if (base_in_result) *base_in_result = p; - mempcpy (p, base, base_len + 1); + memcpy (p, base, base_len + 1); return p_concat; }