Skip to content

Commit

Permalink
Merge branch 'master' into mbhangui-smtputf8
Browse files Browse the repository at this point in the history
  • Loading branch information
mbhangui committed Jan 25, 2021
2 parents 44a00c9 + 7d4a9d5 commit 4295ceb
Show file tree
Hide file tree
Showing 78 changed files with 595 additions and 391 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.cirrus.yml export-ignore
.git* export-ignore
.travis.yml export-ignore
autobuilds export-ignore
39 changes: 34 additions & 5 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,49 @@ jobs:
name: gcc-default,
cc: gcc,
nroff: nroff,
cflags: ""
utmp: false,
cflags: "",
makeflags: ""
}
- {
name: gcc-no_obsolete,
cc: gcc,
nroff: nroff,
cflags: "-DDEPRECATED_FUNCTIONS_REMOVED"
utmp: false,
cflags: "-DDEPRECATED_FUNCTIONS_REMOVED",
makeflags: ""
}
- {
name: gcc-utmp,
cc: gcc,
nroff: true,
utmp: true,
cflags: "-DDEPRECATED_FUNCTIONS_REMOVED",
makeflags: "-o qtmp.h"
}
- {
name: clang-default,
cc: clang,
nroff: nroff,
cflags: ""
utmp: false,
cflags: "",
makeflags: ""
}
- {
name: clang-no_obsolete,
cc: clang,
nroff: true,
cflags: "-DDEPRECATED_FUNCTIONS_REMOVED"
utmp: false,
cflags: "-DDEPRECATED_FUNCTIONS_REMOVED",
makeflags: ""
}
- {
name: clang-utmp,
cc: clang,
nroff: true,
utmp: true,
cflags: "-DDEPRECATED_FUNCTIONS_REMOVED",
makeflags: "-o qtmp.h"
}

steps:
Expand All @@ -56,10 +80,15 @@ jobs:
CC: ${{ matrix.config.cc }}
CFLAGS: ${{ matrix.config.cflags }}

- name: copy utmp
if: matrix.config.utmp
run: cp qtmp.h1 qtmp.h

- name: make
run: make it man NROFF=${NROFF}
run: make -j 2 ${MAKEFLAGS} it man NROFF=${NROFF}
env:
NROFF: ${{ matrix.config.nroff }}
MAKEFLAGS: ${{ matrix.config.makeflags }}

- name: unittests
run: make test
47 changes: 47 additions & 0 deletions .github/workflows/solaris.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: C CI on Solaris

on:
push:
branches:
- '*'
pull_request:
branches: [ master ]

jobs:
build:
name: Solaris-${{ matrix.config.name }}
runs-on: macos-latest
env:
CFLAGS: ${{ matrix.config.cflags }}
NROFF: ${{ matrix.config.nroff }}
strategy:
fail-fast: false
matrix:
config:
- {
name: default,
nroff: nroff,
cflags: ""
}
- {
name: no_obsolete,
nroff: true,
cflags: "-DDEPRECATED_FUNCTIONS_REMOVED"
}

steps:
- name: checkout
uses: actions/checkout@v2

- name: Test in solaris
id: test
uses: vmactions/[email protected]
with:
envs: 'CFLAGS NROFF'
prepare: pkgutil -y -i libcheck_dev gcc4core pkgconfig
run: |
echo "gcc -O2 -pipe ${CFLAGS}" > conf-cc
echo "gcc -s" > conf-ld
make it man NROFF=${NROFF}
cd tests
make test
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
- 20210122 code: remove register storage class declaration from codebase.
- 20201224 bug: in qmail-remote, handle DNS packets up to max EDNS
response size.
- 20201206 code: extend qmail-queue(8) interface so a custom rejection
message can be communicated to the caller.
- 20201120 code: add instqueue for packagers, extracted from instpackage.
- 20200803 avoid sending CRCRLF in qmail-remote if input contains CRLF
- 20200614 remove maildirwatch
- 20200614 stop rewriting RCPT TO: domains when they are a CNAME (RFC 5321 5.1)
Expand Down
48 changes: 31 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -115,63 +115,63 @@ compile auto_usera.c

auto_userd.c: \
auto-str conf-users
./auto-str auto_userd `head -n 2 conf-users | tail -n -1` > auto_userd.c
./auto-str auto_userd `head -n 2 conf-users | tail -1` > auto_userd.c

auto_userd.o: \
compile auto_userd.c
./compile auto_userd.c

auto_userl.c: \
auto-str conf-users
./auto-str auto_userl `head -n 3 conf-users | tail -n -1` > auto_userl.c
./auto-str auto_userl `head -n 3 conf-users | tail -1` > auto_userl.c

auto_userl.o: \
compile auto_userl.c
./compile auto_userl.c

auto_usero.c: \
auto-str conf-users
./auto-str auto_usero `head -n 4 conf-users | tail -n -1` > auto_usero.c
./auto-str auto_usero `head -n 4 conf-users | tail -1` > auto_usero.c

auto_usero.o: \
compile auto_usero.c
./compile auto_usero.c

auto_userp.c: \
auto-str conf-users
./auto-str auto_userp `head -n 5 conf-users | tail -n -1` > auto_userp.c
./auto-str auto_userp `head -n 5 conf-users | tail -1` > auto_userp.c

auto_userp.o: \
compile auto_userp.c
./compile auto_userp.c

auto_userq.c: \
auto-str conf-users
./auto-str auto_userq `head -n 6 conf-users | tail -n -1` > auto_userq.c
./auto-str auto_userq `head -n 6 conf-users | tail -1` > auto_userq.c

auto_userq.o: \
compile auto_userq.c
./compile auto_userq.c

auto_userr.c: \
auto-str conf-users
./auto-str auto_userr `head -n 7 conf-users | tail -n -1` > auto_userr.c
./auto-str auto_userr `head -n 7 conf-users | tail -1` > auto_userr.c

auto_userr.o: \
compile auto_userr.c
./compile auto_userr.c

auto_users.c: \
auto-str conf-users
./auto-str auto_users `head -n 8 conf-users | tail -n -1` > auto_users.c
./auto-str auto_users `head -n 8 conf-users | tail -1` > auto_users.c

auto_users.o: \
compile auto_users.c
./compile auto_users.c

auto_groupn.c: \
auto-str conf-groups
./auto-str auto_groupn `head -n 2 conf-groups | tail -n -1` > auto_groupn.c
./auto-str auto_groupn `head -n 2 conf-groups | tail -1` > auto_groupn.c

auto_groupn.o: \
compile auto_groupn.c
Expand Down Expand Up @@ -352,8 +352,7 @@ case.h

compile: \
make-compile warn-auto.sh
( cat warn-auto.sh; ./make-compile ) > \
compile
( cat warn-auto.sh; ./make-compile ) > compile
chmod 755 compile

condredirect: \
Expand Down Expand Up @@ -701,8 +700,9 @@ hostname.o: \
compile hostname.c substdio.h subfd.h substdio.h readwrite.h
./compile hostname.c

install:
echo './instpackage && ./instchown' > install
install: \
instpackage instchown warn-auto.sh
( cat warn-auto.sh; echo './instpackage && ./instchown' ) > install
chmod 755 install

instcheck: \
Expand All @@ -725,17 +725,31 @@ instchown.o: \
compile instchown.c strerr.h error.h exit.h hier.h
./compile instchown.c

instfiles.o: \
compile instfiles.c substdio.h strerr.h env.h error.h fifo.h open.h \
str.h stralloc.h
./compile instfiles.c

instpackage: \
load instpackage.o fifo.o hier.o auto_qmail.o auto_split.o strerr.a \
load instpackage.o instfiles.o fifo.o hier.o auto_qmail.o auto_split.o strerr.a \
substdio.a open.a error.a env.a str.a fs.a stralloc.a
./load instpackage fifo.o hier.o auto_qmail.o auto_split.o \
./load instpackage instfiles.o fifo.o hier.o auto_qmail.o auto_split.o \
strerr.a substdio.a open.a error.a env.a str.a fs.a stralloc.a

instpackage.o: \
compile instpackage.c substdio.h strerr.h env.h error.h fifo.h open.h \
readwrite.h exit.h alloc.h str.h stralloc.h hier.h
compile instpackage.c open.h strerr.h hier.h
./compile instpackage.c

instqueue: \
load instqueue.o instfiles.o fifo.o hier.o auto_qmail.o auto_split.o strerr.a \
substdio.a open.a error.a env.a str.a fs.a stralloc.a
./load instqueue instfiles.o fifo.o hier.o auto_qmail.o auto_split.o \
strerr.a substdio.a open.a error.a env.a str.a fs.a stralloc.a

instqueue.o: \
compile instqueue.c open.h strerr.h hier.h
./compile instqueue.c

instuidgid.o: \
compile instuidgid.c uidgid.h auto_uids.h auto_users.h
./compile instuidgid.c
Expand Down Expand Up @@ -774,7 +788,7 @@ qmail-pop3d qmail-popup qmail-qmqpc qmail-qmqpd qmail-qmtpd \
qmail-smtpd sendmail tcp-env qmail-newmrh config config-fast \
dnsptr dnsip dnsfq hostname ipmeprint qreceipt qbiff \
forward preline condredirect bouncesaying except maildirmake \
maildir2mbox install instpackage instchown \
maildir2mbox install instpackage instqueue instchown \
instcheck home home+df proc proc+df binm1 binm1+df binm2 binm2+df \
binm3 binm3+df

Expand Down
3 changes: 3 additions & 0 deletions TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,11 @@ instcheck.o
instcheck
instchown.o
instchown
instfiles.o
instpackage.o
instpackage
instqueue.o
instqueue
instuidgid.o
home
home+df
Expand Down
3 changes: 2 additions & 1 deletion alloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@

#include <stdlib.h>

#include "deprecated.h"

#define alloc(x) malloc(x)
#define alloc_free(x) free(x)

#include "deprecated.h"
#ifdef DEPRECATED_FUNCTIONS_AVAILABLE
static inline int _deprecated_ alloc_re(void **x, unsigned int m, unsigned int n)
{
Expand Down
2 changes: 1 addition & 1 deletion auto-str.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ int main(int argc, char **argv)

while ((ch = *value++)) {
if (is_legible(ch)) {
if (substdio_put(&ss1, &ch, 1) == -1)
if (substdio_put(&ss1, (char *)&ch, 1) == -1)
_exit(111);
} else {
puts("\\");
Expand Down
9 changes: 3 additions & 6 deletions byte_chr.c
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
#include "byte.h"

unsigned int byte_chr(s,n,c)
char *s;
register unsigned int n;
int c;
unsigned int byte_chr(char *s, unsigned int n, int c)
{
register char ch;
register char *t;
char ch;
char *t;

ch = c;
t = s;
Expand Down
5 changes: 1 addition & 4 deletions byte_copy.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#include "byte.h"

void byte_copy(to,n,from)
register char *to;
register unsigned int n;
register char *from;
void byte_copy(char *to, unsigned int n, char *from)
{
for (;;) {
if (!n) return; *to++ = *from++; --n;
Expand Down
5 changes: 1 addition & 4 deletions byte_cr.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#include "byte.h"

void byte_copyr(to,n,from)
register char *to;
register unsigned int n;
register char *from;
void byte_copyr(char *to, unsigned int n, char *from)
{
to += n;
from += n;
Expand Down
11 changes: 4 additions & 7 deletions byte_rchr.c
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
#include "byte.h"

unsigned int byte_rchr(s,n,c)
char *s;
register unsigned int n;
int c;
unsigned int byte_rchr(char *s, unsigned int n, int c)
{
register char ch;
register char *t;
register char *u;
char ch;
char *t;
char *u;

ch = c;
t = s;
Expand Down
4 changes: 1 addition & 3 deletions byte_zero.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#include "byte.h"

void byte_zero(s,n)
char *s;
register unsigned int n;
void byte_zero(char *s, unsigned int n)
{
for (;;) {
if (!n) break; *s++ = 0; --n;
Expand Down
9 changes: 3 additions & 6 deletions case_diffb.c
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
#include "case.h"

int case_diffb(s,len,t)
register char *s;
unsigned int len;
register char *t;
int case_diffb(char *s, unsigned int len, char *t)
{
register unsigned char x;
register unsigned char y;
unsigned char x;
unsigned char y;

while (len > 0) {
--len;
Expand Down
Loading

0 comments on commit 4295ceb

Please sign in to comment.