nightmaremail

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

commit 791761de18fa04c02c9008a51120bbbfdb4943fe
parent 3df0f4ee4d36b546459d39435299d64135320eba
Author: Ellenor Bjornsdottir <Ellenor@Umbrellix.NET>
Date:   Wed, 17 Dec 2025 08:44:16 +0000

relink old makefile, add pending prototypes (internal file; run make maint to generate it) to gitignore

Diffstat:
M.gitignore | 1+
AMakefile | 2++
MMakefile.legacy | 8++++++--
MTARGETS | 1+
Mconf-cc | 2+-
Mconf-ld | 2+-
Minclude/fd.h | 4++--
Msrc/fd_copy.c | 4+---
Msrc/fd_move.c | 4+---
9 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -388,3 +388,4 @@ nmail-smtpd test.c test.o teste +pending-prototypes diff --git a/Makefile b/Makefile @@ -0,0 +1 @@ +Makefile.legacy +\ No newline at end of file diff --git a/Makefile.legacy b/Makefile.legacy @@ -3,9 +3,13 @@ SHELL=/bin/sh NROFF?=nroff -default: it +.PHONY: check clean default it man test pending-prototypes + +maint: pending-prototypes +pending-prototypes: + grep '()' include/*.h >$@ -.PHONY: check clean default it man test +default: it .SUFFIXES: .0 .1 .5 .7 .8 diff --git a/TARGETS b/TARGETS @@ -379,3 +379,4 @@ qmail-send.service src/netstrings.o src/nmail-smtpd.o nmail-smtpd +pending-prototypes diff --git a/conf-cc b/conf-cc @@ -1,3 +1,3 @@ -cc -g -ggdb3 -O0 -Iinclude/ -Iinclude/fmxs -DUSING_SKALIBS -I/package/prog/skalibs/include +cc -g -ggdb3 -O0 -Iinclude/ -Iinclude/fmxs This will be used to compile .c files. diff --git a/conf-ld b/conf-ld @@ -1,3 +1,3 @@ -cc /package/prog/skalibs/library/libskarnet.a +cc This will be used to link .o files into an executable. diff --git a/include/fd.h b/include/fd.h @@ -1,7 +1,7 @@ #ifndef FD_H #define FD_H -extern int fd_copy(); -extern int fd_move(); +extern int fd_copy(int to, int from); +extern int fd_move(int to, int from); #endif diff --git a/src/fd_copy.c b/src/fd_copy.c @@ -2,9 +2,7 @@ #include <unistd.h> #include "fd.h" -int fd_copy(to,from) -int to; -int from; +int fd_copy(int to, int from) { if (to == from) return 0; if (fcntl(from,F_GETFL,0) == -1) return -1; diff --git a/src/fd_move.c b/src/fd_move.c @@ -1,9 +1,7 @@ #include <unistd.h> #include "fd.h" -int fd_move(to,from) -int to; -int from; +int fd_move(int to, int from) { if (to == from) return 0; if (fd_copy(to,from) == -1) return -1;