From: Ralph Corderoy Date: Tue, 16 May 2017 09:41:35 +0000 (+0100) Subject: sbr/makedir.c: Move prototype from h/prototypes.h to new header. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/b02e66544edc7947731a7758ab4da8e6d81779c3?ds=inline;hp=--cc sbr/makedir.c: Move prototype from h/prototypes.h to new header. --- b02e66544edc7947731a7758ab4da8e6d81779c3 diff --git a/Makefile.am b/Makefile.am index 32bcb6e1..c89b13e0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -363,6 +363,7 @@ noinst_HEADERS = \ sbr/m_mktemp.h \ sbr/m_popen.h \ sbr/m_rand.h \ + sbr/makedir.h \ thirdparty/jsmn/jsmn.h \ uip/mhfree.h \ uip/mhoutsbr.h \ diff --git a/h/prototypes.h b/h/prototypes.h index 452e6a16..5859d54d 100644 --- a/h/prototypes.h +++ b/h/prototypes.h @@ -233,7 +233,6 @@ int m_gmprot (void); char *m_name (int); void m_unknown(m_getfld_state_t *, FILE *); -int makedir (const char *); char *message_id (time_t, int); /* diff --git a/sbr/context_read.c b/sbr/context_read.c index 589c6463..a4c9820a 100644 --- a/sbr/context_read.c +++ b/sbr/context_read.c @@ -24,6 +24,7 @@ #include /* mh internals */ #include "lock_file.h" #include "m_maildir.h" +#include "makedir.h" #include /* structure for getpwuid() results */ void diff --git a/sbr/makedir.c b/sbr/makedir.c index 165fc4f0..ad481099 100644 --- a/sbr/makedir.c +++ b/sbr/makedir.c @@ -10,6 +10,7 @@ */ #include +#include "makedir.h" #include int diff --git a/sbr/makedir.h b/sbr/makedir.h new file mode 100644 index 00000000..bc569788 --- /dev/null +++ b/sbr/makedir.h @@ -0,0 +1,8 @@ +/* makedir.h -- make a directory. + * + * This code is Copyright (c) 2017, by the authors of nmh. See the + * COPYRIGHT file in the root directory of the nmh distribution for + * complete copyright information. + */ + +int makedir(const char *dir); diff --git a/sbr/utils.c b/sbr/utils.c index a4cdc4fc..8bd84c39 100644 --- a/sbr/utils.c +++ b/sbr/utils.c @@ -9,6 +9,7 @@ #include #include #include "m_mktemp.h" +#include "makedir.h" #include extern char *mhdocdir; diff --git a/uip/install-mh.c b/uip/install-mh.c index 48bde250..9155b0a9 100644 --- a/uip/install-mh.c +++ b/uip/install-mh.c @@ -8,6 +8,7 @@ #include /* mh internals */ #include #include "../sbr/m_maildir.h" +#include "../sbr/makedir.h" #include /* structure for getpwuid() results */ #define INSTALLMH_SWITCHES \ diff --git a/uip/mhmisc.c b/uip/mhmisc.c index ad50264e..7e278082 100644 --- a/uip/mhmisc.c +++ b/uip/mhmisc.c @@ -9,6 +9,7 @@ #include #include #include +#include "../sbr/makedir.h" extern int debugsw; diff --git a/uip/rcvstore.c b/uip/rcvstore.c index 61702c48..e9654b48 100644 --- a/uip/rcvstore.c +++ b/uip/rcvstore.c @@ -12,6 +12,7 @@ #include #include "../sbr/m_maildir.h" #include "../sbr/m_mktemp.h" +#include "../sbr/makedir.h" #define RCVSTORE_SWITCHES \ X("create", 0, CRETSW) \