/* 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
/* Written by Jim Meyering. */
-#ifdef HAVE_CONFIG_H
+#if HAVE_CONFIG_H
# include <config.h>
#endif
#endif
#include <stdio.h>
+#if HAVE_STRING_H
+# include <string.h>
+#endif
#include <sys/types.h>
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;
if (base_in_result)
*base_in_result = p;
- mempcpy (p, base, base_len + 1);
+ memcpy (p, base, base_len + 1);
return p_concat;
}