X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fmakepath.c;h=fbe3f6a65e1f25ac24197e471306afe9bc70d855;hb=c50728dcc26ea56e6e20937a97a26a70b0484703;hp=3729b1a43eddec1d44ea72fddff8c1f5e3eff693;hpb=a5c4d40f377632b88f3d6aebf023d238677eb2b7;p=gnulib.git diff --git a/lib/makepath.c b/lib/makepath.c index 3729b1a43..fbe3f6a65 100644 --- a/lib/makepath.c +++ b/lib/makepath.c @@ -1,5 +1,5 @@ /* makepath.c -- Ensure that a directory path exists. - Copyright (C) 1990, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1990, 1997, 1998, 1999, 2000, 2002 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 @@ -103,23 +103,14 @@ extern int errno; /* Include this before libintl.h so we get our definition of PARAMS. */ #include "makepath.h" -#if HAVE_LOCALE_H -# include -#endif - -#if ENABLE_NLS -# include -# define _(Text) gettext (Text) -#else -# define _(Text) Text -#endif +#include "gettext.h" +#define _(msgid) gettext (msgid) #include "save-cwd.h" +#include "dirname.h" #include "error.h" #include "quote.h" -void strip_trailing_slashes (); - #define CLEANUP_CWD \ do \ { \ @@ -196,7 +187,6 @@ make_dir (const char *dir, const char *dirpath, mode_t mode, int *created_dir_p) } /* Ensure that the directory ARGPATH exists. - Remove any trailing slashes from ARGPATH before calling this function. Create any leading directories that don't already exist, with permissions PARENT_MODE. @@ -340,7 +330,7 @@ make_path (const char *argpath, stat and mkdir process O(n^2) file name components. */ if (do_chdir && chdir (basename_dir) < 0) { - error (0, errno, _("cannot chdir to directory, %s"), + error (0, errno, _("cannot chdir to directory %s"), quote (dirpath)); CLEANUP; return 1;