#define WX_USR (S_IWUSR | S_IXUSR)
+#if HAVE_LOCALE_H
+# include <locale.h>
+#endif
+
+#if ENABLE_NLS
+# include <libintl.h>
+# define _(Text) gettext (Text)
+#else
+# define _(Text) Text
+#endif
+
#ifdef __MSDOS__
typedef int uid_t;
typedef int gid_t;
if (stat (dir, &stats))
{
- error (0, errno, "cannot create directory `%s'", dirpath);
+ error (0, errno, _("cannot create directory `%s'"), dirpath);
fail = 1;
}
else if (!S_ISDIR (stats.st_mode))
{
- error (0, 0, "`%s' exists but is not a directory", dirpath);
+ error (0, 0, _("`%s' exists but is not a directory"), dirpath);
fail = 1;
}
else
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", dirpath);
+ error (0, errno, _("cannot chdir to directory, %s"), dirpath);
CLEANUP;
return 1;
}
#endif
)
{
- error (0, errno, "cannot chown %s", dirpath);
+ error (0, errno, _("cannot chown %s"), dirpath);
retval = 1;
}
/* chown may have turned off some permission bits we wanted. */
if ((mode & 07000) != 0 && chmod (basename_dir, mode))
{
- error (0, errno, "cannot chmod %s", dirpath);
+ error (0, errno, _("cannot chmod %s"), dirpath);
retval = 1;
}
}
if (!S_ISDIR (stats.st_mode))
{
- error (0, 0, "`%s' exists but is not a directory", dirpath);
+ error (0, 0, _("`%s' exists but is not a directory"), dirpath);
return 1;
}