Make it possible to #define gcd to an alias.
[gnulib.git] / lib / mkdir-p.c
index f097e67..29dcac1 100644 (file)
 
 #include <errno.h>
 #include <sys/stat.h>
 
 #include <errno.h>
 #include <sys/stat.h>
+#include <unistd.h>
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 
-#include "dirchownmod.c"
+#include "dirchownmod.h"
 #include "dirname.h"
 #include "error.h"
 #include "quote.h"
 #include "dirname.h"
 #include "error.h"
 #include "quote.h"
@@ -42,7 +43,7 @@
    WD is the working directory, as in savewd.c.
 
    If MAKE_ANCESTOR is not null, create any ancestor directories that
    WD is the working directory, as in savewd.c.
 
    If MAKE_ANCESTOR is not null, create any ancestor directories that
-   don't already exist, by invoking MAKE_ANCESTOR (ANCESTOR, OPTIONS).
+   don't already exist, by invoking MAKE_ANCESTOR (DIR, ANCESTOR, OPTIONS).
    This function should return zero if successful, -1 (setting errno)
    otherwise.  In this case, DIR may be modified by storing '\0' bytes
    into it, to access the ancestor directories, and this modification
    This function should return zero if successful, -1 (setting errno)
    otherwise.  In this case, DIR may be modified by storing '\0' bytes
    into it, to access the ancestor directories, and this modification
@@ -82,7 +83,7 @@
 bool
 make_dir_parents (char *dir,
                  struct savewd *wd,
 bool
 make_dir_parents (char *dir,
                  struct savewd *wd,
-                 int (*make_ancestor) (char const *, void *),
+                 int (*make_ancestor) (char const *, char const *, void *),
                  void *options,
                  mode_t mode,
                  void (*announce) (char const *, void *),
                  void *options,
                  mode_t mode,
                  void (*announce) (char const *, void *),