summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2024-11-28 13:32:32 +0100
committermanuel <manuel@mausz.at>2024-11-28 13:32:32 +0100
commitec29722d8b6b90d1a0368542a5de991599e30adc (patch)
tree5b5919c30f822ef83d3ce6f34998baeaacd17d14
parenta8ea6ba381e79e4198338f5721bbaa3679da5cb9 (diff)
downloadqmail-ec29722d8b6b90d1a0368542a5de991599e30adc.tar.gz
qmail-ec29722d8b6b90d1a0368542a5de991599e30adc.tar.bz2
qmail-ec29722d8b6b90d1a0368542a5de991599e30adc.zip
Fix `implicit declaration of function` in install-big/hier
-rw-r--r--Makefile6
-rw-r--r--hier.c1
-rw-r--r--install-big.c1
-rw-r--r--install.c37
-rw-r--r--install.h12
5 files changed, 23 insertions, 34 deletions
diff --git a/Makefile b/Makefile
index 5bd3765..8a280fd 100644
--- a/Makefile
+++ b/Makefile
@@ -722,7 +722,7 @@ compile hfield.c hfield.h
722 ./compile hfield.c 722 ./compile hfield.c
723 723
724hier.o: \ 724hier.o: \
725compile hier.c auto_qmail.h auto_split.h auto_uids.h fmt.h fifo.h 725compile hier.c auto_qmail.h auto_split.h auto_uids.h fmt.h fifo.h install.h
726 ./compile hier.c 726 ./compile hier.c
727 727
728home: \ 728home: \
@@ -774,12 +774,12 @@ auto_uids.o strerr.a substdio.a open.a error.a str.a fs.a
774 774
775install-big.o: \ 775install-big.o: \
776compile install-big.c auto_qmail.h auto_split.h auto_uids.h fmt.h \ 776compile install-big.c auto_qmail.h auto_split.h auto_uids.h fmt.h \
777fifo.h 777fifo.h install.h
778 ./compile install-big.c 778 ./compile install-big.c
779 779
780install.o: \ 780install.o: \
781compile install.c substdio.h strerr.h error.h open.h readwrite.h \ 781compile install.c substdio.h strerr.h error.h open.h readwrite.h \
782exit.h 782exit.h install.h
783 ./compile install.c 783 ./compile install.c
784 784
785instcheck: \ 785instcheck: \
diff --git a/hier.c b/hier.c
index c586065..e1b4b25 100644
--- a/hier.c
+++ b/hier.c
@@ -3,6 +3,7 @@
3#include "auto_uids.h" 3#include "auto_uids.h"
4#include "fmt.h" 4#include "fmt.h"
5#include "fifo.h" 5#include "fifo.h"
6#include "install.h"
6 7
7char buf[100 + FMT_ULONG]; 8char buf[100 + FMT_ULONG];
8 9
diff --git a/install-big.c b/install-big.c
index a058ad2..d9c9f9b 100644
--- a/install-big.c
+++ b/install-big.c
@@ -3,6 +3,7 @@
3#include "auto_uids.h" 3#include "auto_uids.h"
4#include "fmt.h" 4#include "fmt.h"
5#include "fifo.h" 5#include "fifo.h"
6#include "install.h"
6 7
7char buf[100 + FMT_ULONG]; 8char buf[100 + FMT_ULONG];
8 9
diff --git a/install.c b/install.c
index 244072f..f551187 100644
--- a/install.c
+++ b/install.c
@@ -1,5 +1,6 @@
1#include <sys/stat.h> 1#include <sys/stat.h>
2#include <unistd.h> 2#include <unistd.h>
3#include "install.h"
3#include "substdio.h" 4#include "substdio.h"
4#include "strerr.h" 5#include "strerr.h"
5#include "error.h" 6#include "error.h"
@@ -13,11 +14,7 @@ extern void hier();
13 14
14int fdsourcedir = -1; 15int fdsourcedir = -1;
15 16
16void h(home,uid,gid,mode) 17void h(const char *home, uid_t uid, gid_t gid, mode_t mode)
17char *home;
18int uid;
19int gid;
20int mode;
21{ 18{
22 if (mkdir(home,0700) == -1) 19 if (mkdir(home,0700) == -1)
23 if (errno != error_exist) 20 if (errno != error_exist)
@@ -28,12 +25,7 @@ int mode;
28 strerr_die4sys(111,FATAL,"unable to chmod ",home,": "); 25 strerr_die4sys(111,FATAL,"unable to chmod ",home,": ");
29} 26}
30 27
31void d(home,subdir,uid,gid,mode) 28void d(const char *home, const char *subdir, uid_t uid, gid_t gid, mode_t mode)
32char *home;
33char *subdir;
34int uid;
35int gid;
36int mode;
37{ 29{
38 if (chdir(home) == -1) 30 if (chdir(home) == -1)
39 strerr_die4sys(111,FATAL,"unable to switch to ",home,": "); 31 strerr_die4sys(111,FATAL,"unable to switch to ",home,": ");
@@ -46,12 +38,7 @@ int mode;
46 strerr_die6sys(111,FATAL,"unable to chmod ",home,"/",subdir,": "); 38 strerr_die6sys(111,FATAL,"unable to chmod ",home,"/",subdir,": ");
47} 39}
48 40
49void p(home,fifo,uid,gid,mode) 41void p(const char *home, const char *fifo, uid_t uid, gid_t gid, mode_t mode)
50char *home;
51char *fifo;
52int uid;
53int gid;
54int mode;
55{ 42{
56 if (chdir(home) == -1) 43 if (chdir(home) == -1)
57 strerr_die4sys(111,FATAL,"unable to switch to ",home,": "); 44 strerr_die4sys(111,FATAL,"unable to switch to ",home,": ");
@@ -69,13 +56,7 @@ char outbuf[SUBSTDIO_OUTSIZE];
69substdio ssin; 56substdio ssin;
70substdio ssout; 57substdio ssout;
71 58
72void c(home,subdir,file,uid,gid,mode) 59void c(const char *home, const char *subdir, const char *file, uid_t uid, gid_t gid, mode_t mode)
73char *home;
74char *subdir;
75char *file;
76int uid;
77int gid;
78int mode;
79{ 60{
80 int fdin; 61 int fdin;
81 int fdout; 62 int fdout;
@@ -119,13 +100,7 @@ int mode;
119 strerr_die6sys(111,FATAL,"unable to chmod .../",subdir,"/",file,": "); 100 strerr_die6sys(111,FATAL,"unable to chmod .../",subdir,"/",file,": ");
120} 101}
121 102
122void z(home,file,len,uid,gid,mode) 103void z(const char *home, const char *file, size_t len, uid_t uid, gid_t gid, mode_t mode)
123char *home;
124char *file;
125int len;
126int uid;
127int gid;
128int mode;
129{ 104{
130 int fdout; 105 int fdout;
131 106
diff --git a/install.h b/install.h
new file mode 100644
index 0000000..861be9b
--- /dev/null
+++ b/install.h
@@ -0,0 +1,12 @@
1#ifndef install_h
2#define install_h
3
4#include <sys/types.h>
5
6void h(const char *home, uid_t uid, gid_t gid, mode_t mode);
7void d(const char *home, const char *subdir, uid_t uid, gid_t gid, mode_t mode);
8void p(const char *home, const char *fifo, uid_t uid, gid_t gid, mode_t mode);
9void c(const char *home, const char *subdir, const char *file, uid_t uid, gid_t gid, mode_t mode);
10void z(const char *home, const char *file, size_t len, uid_t uid, gid_t gid, mode_t mode);
11
12#endif