nightmaremail

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit ade7b953a30ece73625e97a4bd0ad76e5ca3ed3a
parent 4d9143831d8100617b8423a1deb342229f0bffbe
Author: Rolf Eike Beer <eike@sf-mail.de>
Date:   Wed, 17 Jun 2020 18:08:00 +0200

move extern declarations out of spawn.c into a dedicated header

Diffstat:
MMakefile | 6+++---
Mqmail-lspawn.c | 1+
Mqmail-rspawn.c | 1+
Mspawn.c | 6+-----
Aspawn.h | 11+++++++++++
5 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/Makefile b/Makefile @@ -1146,7 +1146,7 @@ qmail-lspawn.o: \ compile qmail-lspawn.c fd.h wait.h prot.h substdio.h stralloc.h \ gen_alloc.h scan.h exit.h fork.h error.h cdb.h uint32.h case.h \ slurpclose.h uidgid.h auto_qmail.h auto_uids.h auto_users.h qlx.h byte.h \ -open.h +open.h spawn.h ./compile qmail-lspawn.c qmail-newmrh: \ @@ -1397,7 +1397,7 @@ qmail-rspawn.8 qmail-rspawn.o: \ compile qmail-rspawn.c fd.h wait.h substdio.h exit.h fork.h error.h env.h \ -tcpto.h +tcpto.h spawn.h ./compile qmail-rspawn.c qmail-send: \ @@ -1711,7 +1711,7 @@ trylsock.c compile load spawn.o: \ compile chkspawn spawn.c sig.h wait.h substdio.h byte.h str.h \ stralloc.h gen_alloc.h select.h exit.h alloc.h coe.h open.h error.h \ -auto_qmail.h auto_uids.h auto_spawn.h +auto_qmail.h auto_uids.h auto_spawn.h spawn.h ./chkspawn ./compile spawn.c diff --git a/qmail-lspawn.c b/qmail-lspawn.c @@ -1,4 +1,5 @@ #include "fd.h" +#include "spawn.h" #include "wait.h" #include "prot.h" #include "substdio.h" diff --git a/qmail-rspawn.c b/qmail-rspawn.c @@ -1,4 +1,5 @@ #include "fd.h" +#include "spawn.h" #include "wait.h" #include "substdio.h" #include "exit.h" diff --git a/spawn.c b/spawn.c @@ -1,5 +1,6 @@ #include <sys/types.h> #include <sys/stat.h> +#include "spawn.h" #include "sig.h" #include "wait.h" #include "substdio.h" @@ -16,11 +17,6 @@ #include "auto_uids.h" #include "auto_spawn.h" -extern int truncreport; -extern int spawn(); -extern void report(); -extern void initialize(); - struct delivery { int used; diff --git a/spawn.h b/spawn.h @@ -0,0 +1,11 @@ +#ifndef SPAWN_H +#define SPAWN_H + +#include "substdio.h" + +extern int truncreport; +extern int spawn(int fdmess, int fdout, char *s, char *r, int at); +extern void report(substdio *ss, int wstat, char *s, int len); +extern void initialize(int argc, char **argv); + +#endif