- Respect $CC

- Fix build with clang
- Regenerate patchfiles after including the clang patches
This commit is contained in:
Johan van Selst 2011-07-25 18:54:26 +00:00
parent 3bd5e9159f
commit 40a3b0ef5f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=278313
14 changed files with 211 additions and 168 deletions

View file

@ -1,6 +1,6 @@
--- Makefile.in.orig 1996-06-04 19:54:32.000000000 +0800 --- Makefile.in.orig 1996-06-04 13:54:32.000000000 +0200
+++ Makefile.in 2008-08-24 21:42:48.000000000 +0800 +++ Makefile.in 2011-07-25 20:21:13.000000000 +0200
@@ -41,9 +41,10 @@ @@ -41,9 +41,10 @@ exec_prefix = @exec_prefix@
#manprefix = #manprefix =
bindir = @bindir@ bindir = @bindir@
@ -12,7 +12,7 @@
MAINCF = $(libdir)/emil.cf MAINCF = $(libdir)/emil.cf
CHARFILE = $(libdir)/charsets.cpl CHARFILE = $(libdir)/charsets.cpl
@@ -262,6 +263,12 @@ @@ -262,6 +263,12 @@ install: installdirs
$(INSTALL_DATA) emil.cf.$(manext) $(mandir)/man$(manext); \ $(INSTALL_DATA) emil.cf.$(manext) $(mandir)/man$(manext); \
fi ; fi ;
@echo " " ; @echo " " ;

View file

@ -0,0 +1,11 @@
--- charset/chset.c.orig 2011-07-25 20:25:55.000000000 +0200
+++ charset/chset.c 2011-07-25 20:25:56.000000000 +0200
@@ -42,7 +42,7 @@ int i;
return s;
}
-void
+int
main (argc, argv)
int argc;
char **argv;

View file

@ -0,0 +1,15 @@
--- charset/conv.c.orig 2011-07-25 20:26:26.000000000 +0200
+++ charset/conv.c 2011-07-25 20:25:30.000000000 +0200
@@ -65,10 +65,10 @@ Char *b, *bm;
}
-void
+int
main (argc, argv)
int argc;
- Char **argv;
+ char **argv;
{
Char s ARRAY(SLEN), r ARRAY(SLEN), *opt=NULL, *o=r, c;
char dk ARRAY(3), us ARRAY(3);

View file

@ -1,5 +1,5 @@
--- charset/dfopen.c~ Tue Nov 29 07:10:29 1994 --- charset/dfopen.c.orig 1994-11-29 16:10:29.000000000 +0100
+++ charset/dfopen.c Tue Apr 21 02:35:35 1998 +++ charset/dfopen.c 2011-07-25 20:21:13.000000000 +0200
@@ -1,7 +1,6 @@ @@ -1,7 +1,6 @@
#include "iso646.h" #include "iso646.h"
#include <stdio.h> #include <stdio.h>

View file

@ -0,0 +1,11 @@
--- charset/gc.c.orig 2011-07-25 20:24:02.000000000 +0200
+++ charset/gc.c 2011-07-25 20:24:04.000000000 +0200
@@ -256,7 +256,7 @@ char *file, *mode;
}
-void
+int
main (argc, argv)
int argc; char **argv; {

View file

@ -0,0 +1,10 @@
--- configure.orig 1996-04-19 12:22:41.000000000 +0200
+++ configure 2011-07-25 20:21:58.000000000 +0200
@@ -513,7 +513,6 @@ fi
-CC=gcc
for ac_prog in 'bison -y' byacc
do
# Extract the first word of "$ac_prog", so it can be a program name with args.

View file

@ -1,5 +1,5 @@
--- emil.cf.man~ Sat Feb 10 05:16:17 1996 --- emil.cf.man.orig 1996-02-10 14:16:17.000000000 +0100
+++ emil.cf.man Tue Apr 21 04:10:45 1998 +++ emil.cf.man 2011-07-25 20:21:13.000000000 +0200
@@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
-.TH EMIL.CF 8 "19 December 1994" -.TH EMIL.CF 8 "19 December 1994"
+.TH EMIL.CF 1 "19 December 1994" +.TH EMIL.CF 1 "19 December 1994"
@ -9,7 +9,7 @@
.SH SYNOPSIS .SH SYNOPSIS
.B group .B group
.IR "Group_Name" ":" .IR "Group_Name" ":"
@@ -45,7 +45,7 @@ @@ -45,7 +45,7 @@ emil.cf \- configuration file for emil(8
.SH DESCRIPTION .SH DESCRIPTION
The file The file
MAINCF MAINCF
@ -18,7 +18,7 @@
Internet Internet
message. Conversion is controlled by the combination of message. Conversion is controlled by the combination of
.IR Sender, .IR Sender,
@@ -127,7 +127,7 @@ @@ -127,7 +127,7 @@ european languages.
Pick one of Base64, Quoted-printable, 8bit or Se, 7bit. Pick one of Base64, Quoted-printable, 8bit or Se, 7bit.
7bit is default. If BAse64 or Quoted-Printable is selected 7bit is default. If BAse64 or Quoted-Printable is selected
headers are converted according to RFC1522 (MIME-II). headers are converted according to RFC1522 (MIME-II).
@ -27,7 +27,7 @@
.TP .TP
.B "match" .B "match"
@@ -205,7 +205,7 @@ @@ -205,7 +205,7 @@ sender, recipient and mail relay. These
Martin Wendel (Martin.Wendel@its.uu.se) and Martin Wendel (Martin.Wendel@its.uu.se) and
Torbjorn Wictorin (Torbjorn.Wictorin@its.uu.se) Torbjorn Wictorin (Torbjorn.Wictorin@its.uu.se)
.SH "SEE ALSO" .SH "SEE ALSO"

View file

@ -1,12 +1,12 @@
--- emil.man~ Tue Jun 4 04:42:42 1996 --- emil.man.orig 1996-06-04 13:42:42.000000000 +0200
+++ emil.man Tue Apr 21 04:08:04 1998 +++ emil.man 2011-07-25 20:21:13.000000000 +0200
@@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
-.TH EMIL 8 "19 December 1994" -.TH EMIL 8 "19 December 1994"
+.TH EMIL 1 "19 December 1994" +.TH EMIL 1 "19 December 1994"
.SH NAME .SH NAME
@@ -63,7 +63,7 @@ @@ -63,7 +63,7 @@ the changes in encoding and formatting i
.BR no .BR no
spooling. spooling.
@ -15,7 +15,7 @@
invoke sendmail or other programs for it's output. invoke sendmail or other programs for it's output.
When used like this, emil does not close the connection with the calling When used like this, emil does not close the connection with the calling
sendmail until it returns an EX_OK from the called program, sendmail until it returns an EX_OK from the called program,
@@ -151,17 +151,17 @@ @@ -151,17 +151,17 @@ RFC822.
.TP .TP
.BI "\-H " Recipient_header_encoding .BI "\-H " Recipient_header_encoding
Recipient header encoding. One of Se, 7bit, 8bit, BAse64 or Quoted-printable. Recipient header encoding. One of Se, 7bit, 8bit, BAse64 or Quoted-printable.
@ -36,7 +36,7 @@
.RE .RE
Beware, when applying the Sender_charset option, there is no Beware, when applying the Sender_charset option, there is no
@@ -243,7 +243,7 @@ @@ -243,7 +243,7 @@ Torbjorn Wictorin (Torbjorn.Wictorin@its
.SH "SEE ALSO" .SH "SEE ALSO"

View file

@ -1,22 +1,56 @@
$FreeBSD$ --- main.c.orig 1996-06-04 15:36:58.000000000 +0200
+++ main.c 2011-07-25 20:32:45.000000000 +0200
--- main.c.orig Thu Mar 28 20:57:50 2002 @@ -69,7 +69,7 @@ int spawn_mailer = 0;
+++ main.c Thu Mar 28 20:58:31 2002
@@ -69,7 +69,7 @@
int pseudo_route = 0; int pseudo_route = 0;
int in_fd = 0; int in_fd = 0;
-FILE * out_fd = stdout; -FILE * out_fd = stdout;
+FILE * out_fd; +FILE * out_fd = NULL;
FILE * char_fd = NULL; FILE * char_fd = NULL;
FILE * conf_fd = NULL; FILE * conf_fd = NULL;
off_t pz; off_t pz;
@@ -83,7 +83,7 @@ @@ -84,6 +84,8 @@ int main(int argc, char *argv[])
int no_run = FALSE;
char *cmailer = NULL; char *cmailer = NULL;
char *member = NULL; char *member = NULL;
-
+ out_fd = stdout; + out_fd = stdout;
+
#ifdef HAVE_GETPAGESIZE #ifdef HAVE_GETPAGESIZE
pz = (off_t) getpagesize(); pz = (off_t) getpagesize();
#elif defined(hpux) || defined(_AUX_SOURCE) #elif defined(hpux) || defined(_AUX_SOURCE)
@@ -177,7 +179,7 @@ int main(int argc, char *argv[])
sprintf(ebuf,"Invalid parameter to -f: %s",optarg);
#ifdef DEBUG
if (edebug)
- fprintf(stderr, ebuf);
+ fprintf(stderr, "%s", ebuf);
#endif
logger(LOG_WARNING,ebuf);
}
@@ -303,7 +305,7 @@ int main(int argc, char *argv[])
sprintf(ebuf,"Invalid flag: -%c",c);
#ifdef DEBUG
if (edebug)
- fprintf(stderr, ebuf);
+ fprintf(stderr, "%s", ebuf);
#endif
logger(LOG_WARNING,ebuf);
}
@@ -359,7 +361,7 @@ int main(int argc, char *argv[])
sprintf(ebuf, "Invalid mailer specification %s", optarg);
#ifdef DEBUG
if (edebug)
- fprintf(stderr, ebuf);
+ fprintf(stderr, "%s", ebuf);
#endif
logger(LOG_ERR, ebuf);
fprintf(stderr, "Emil: %s\n", ebuf);
@@ -448,7 +450,7 @@ int main(int argc, char *argv[])
);
#ifdef DEBUG
if (edebug)
- fprintf(stderr, ebuf);
+ fprintf(stderr, "%s", ebuf);
#endif
logger(LOG_DEBUG,ebuf);
if (source == NULL)

View file

@ -0,0 +1,46 @@
--- mime.c.orig 1996-06-04 15:36:59.000000000 +0200
+++ mime.c 2011-07-25 20:21:13.000000000 +0200
@@ -56,18 +56,18 @@ encode_mime(struct message *m)
if (match(m->sd->type, "TEXT"))
{
if (m->td->charset != NULL)
- sprintf(buf, "%s; charset=\"%s\"", ct, m->td->charset);
+ snprintf(buf, sizeof(buf), "%s; charset=\"%s\"", ct, m->td->charset);
else
- sprintf(buf, "%s", ct);
+ snprintf(buf, sizeof(buf), "%s", ct);
}
else
if (match(m->sd->type, "MULTIPART"))
{
bb = (char *)getmimebound();
if (m->sd->applefile == AMDOUBLE)
- sprintf(buf, "Multipart/AppleDouble; boundary=\"%s\"", bb);
+ snprintf(buf, sizeof(buf), "Multipart/AppleDouble; boundary=\"%s\"", bb);
else
- sprintf(buf,"%s; boundary=\"%s\"", ct, bb);
+ snprintf(buf, sizeof(buf), "%s; boundary=\"%s\"", ct, bb);
m->td->startbound = (char *)Yalloc(MIMEBOUNDLEN + 5);
m->td->endbound = (char *)Yalloc(MIMEBOUNDLEN + 7);
sprintf(m->td->startbound, "--%s", bb);
@@ -75,7 +75,7 @@ encode_mime(struct message *m)
}
else
{
- sprintf(buf, "%s", ct);
+ snprintf(buf, sizeof(buf), "%s", ct);
}
}
else
@@ -87,7 +87,10 @@ encode_mime(struct message *m)
if (m->sd->name != NULL)
{
- sprintf(buf, "%s; name=\"%s\"", buf, m->sd->name);
+ char *buf2;
+ buf2 = strdup(buf);
+ snprintf(buf, sizeof(buf), "%s; name=\"%s\"", buf2, m->sd->name);
+ free(buf2);
}
add_header(m, "Content-Type", buf, MIME);
if (bb != NULL)

View file

@ -1,6 +1,6 @@
--- mimeparse.c~ Tue Jun 4 06:36:59 1996 --- mimeparse.c.orig 1996-06-04 15:36:59.000000000 +0200
+++ mimeparse.c Tue Apr 21 05:02:15 1998 +++ mimeparse.c 2011-07-25 20:21:13.000000000 +0200
@@ -219,8 +219,39 @@ @@ -219,8 +219,39 @@ parse_mime_siblings(struct message *m)
inbuf->bodystart, inbuf->bodystart,
inbuf->bodyend); inbuf->bodyend);
#endif #endif

View file

@ -1,104 +0,0 @@
--- mime.c.old 1996-06-04 15:36:59.000000000 +0200
+++ mime.c 2004-02-26 16:57:42.000000000 +0100
@@ -56,18 +56,18 @@
if (match(m->sd->type, "TEXT"))
{
if (m->td->charset != NULL)
- sprintf(buf, "%s; charset=\"%s\"", ct, m->td->charset);
+ snprintf(buf, sizeof(buf), "%s; charset=\"%s\"", ct, m->td->charset);
else
- sprintf(buf, "%s", ct);
+ snprintf(buf, sizeof(buf), "%s", ct);
}
else
if (match(m->sd->type, "MULTIPART"))
{
bb = (char *)getmimebound();
if (m->sd->applefile == AMDOUBLE)
- sprintf(buf, "Multipart/AppleDouble; boundary=\"%s\"", bb);
+ snprintf(buf, sizeof(buf), "Multipart/AppleDouble; boundary=\"%s\"", bb);
else
- sprintf(buf,"%s; boundary=\"%s\"", ct, bb);
+ snprintf(buf, sizeof(buf), "%s; boundary=\"%s\"", ct, bb);
m->td->startbound = (char *)Yalloc(MIMEBOUNDLEN + 5);
m->td->endbound = (char *)Yalloc(MIMEBOUNDLEN + 7);
sprintf(m->td->startbound, "--%s", bb);
@@ -75,7 +75,7 @@
}
else
{
- sprintf(buf, "%s", ct);
+ snprintf(buf, sizeof(buf), "%s", ct);
}
}
else
@@ -87,7 +87,10 @@
if (m->sd->name != NULL)
{
- sprintf(buf, "%s; name=\"%s\"", buf, m->sd->name);
+ char *buf2;
+ buf2 = strdup(buf);
+ snprintf(buf, sizeof(buf), "%s; name=\"%s\"", buf2, m->sd->name);
+ free(buf2);
}
add_header(m, "Content-Type", buf, MIME);
if (bb != NULL)
--- uuencode.c.old 1996-06-04 15:37:02.000000000 +0200
+++ uuencode.c 2004-02-26 17:01:09.000000000 +0100
@@ -116,7 +116,7 @@
/* Start with uuencode preamble */
fix_filename(m);
- sprintf(outb,"begin 644 %s\n", m->sd->name);
+ snprintf(outb, sizeof(outb), "begin 644 %s\n", m->sd->name);
append_data(outbuf, outb, strlen(outb), pz);
outbuf->lineend += 1;
i = 0;
@@ -242,7 +242,7 @@
inb++;
inbuf->offset += 1;
}
- if ((i = sscanf(inb, "begin%*1[ ]%*3[0-7]%*1[ ]%s", filename)) != 1)
+ if ((i = sscanf(inb, "begin%*1[ ]%*3[0-7]%*1[ ]%511s", filename)) != 1)
{
#ifdef DEBUG
if (edebug)
--- main.c.old 1996-06-04 15:36:58.000000000 +0200
+++ main.c 2004-02-26 17:02:18.000000000 +0100
@@ -177,7 +177,7 @@
sprintf(ebuf,"Invalid parameter to -f: %s",optarg);
#ifdef DEBUG
if (edebug)
- fprintf(stderr, ebuf);
+ fprintf(stderr, "%s", ebuf);
#endif
logger(LOG_WARNING,ebuf);
}
@@ -303,7 +303,7 @@
sprintf(ebuf,"Invalid flag: -%c",c);
#ifdef DEBUG
if (edebug)
- fprintf(stderr, ebuf);
+ fprintf(stderr, "%s", ebuf);
#endif
logger(LOG_WARNING,ebuf);
}
@@ -359,7 +359,7 @@
sprintf(ebuf, "Invalid mailer specification %s", optarg);
#ifdef DEBUG
if (edebug)
- fprintf(stderr, ebuf);
+ fprintf(stderr, "%s", ebuf);
#endif
logger(LOG_ERR, ebuf);
fprintf(stderr, "Emil: %s\n", ebuf);
@@ -448,7 +448,7 @@
);
#ifdef DEBUG
if (edebug)
- fprintf(stderr, ebuf);
+ fprintf(stderr, "%s", ebuf);
#endif
logger(LOG_DEBUG,ebuf);
if (source == NULL)

View file

@ -0,0 +1,20 @@
--- uuencode.c.orig 1996-06-04 15:37:02.000000000 +0200
+++ uuencode.c 2011-07-25 20:21:13.000000000 +0200
@@ -116,7 +116,7 @@ encode_uuencode(struct message *m)
/* Start with uuencode preamble */
fix_filename(m);
- sprintf(outb,"begin 644 %s\n", m->sd->name);
+ snprintf(outb, sizeof(outb), "begin 644 %s\n", m->sd->name);
append_data(outbuf, outb, strlen(outb), pz);
outbuf->lineend += 1;
i = 0;
@@ -242,7 +242,7 @@ decode_uuencode(struct message *m)
inb++;
inbuf->offset += 1;
}
- if ((i = sscanf(inb, "begin%*1[ ]%*3[0-7]%*1[ ]%s", filename)) != 1)
+ if ((i = sscanf(inb, "begin%*1[ ]%*3[0-7]%*1[ ]%511s", filename)) != 1)
{
#ifdef DEBUG
if (edebug)

View file

@ -1,38 +1,38 @@
bin/emil bin/emil
lib/charsets.cpl lib/charsets.cpl
lib/emil.cf lib/emil.cf
%%PORTDOCS%%share/doc/emil/analysis.html %%PORTDOCS%%%%DOCSDIR%%/analysis.html
%%PORTDOCS%%share/doc/emil/arguments.html %%PORTDOCS%%%%DOCSDIR%%/arguments.html
%%PORTDOCS%%share/doc/emil/arrow_left3.gif %%PORTDOCS%%%%DOCSDIR%%/arrow_left3.gif
%%PORTDOCS%%share/doc/emil/arrow_right3.gif %%PORTDOCS%%%%DOCSDIR%%/arrow_right3.gif
%%PORTDOCS%%share/doc/emil/arrow_up2.gif %%PORTDOCS%%%%DOCSDIR%%/arrow_up2.gif
%%PORTDOCS%%share/doc/emil/binpobox.gif %%PORTDOCS%%%%DOCSDIR%%/binpobox.gif
%%PORTDOCS%%share/doc/emil/comparison.html %%PORTDOCS%%%%DOCSDIR%%/comparison.html
%%PORTDOCS%%share/doc/emil/configuration.html %%PORTDOCS%%%%DOCSDIR%%/configuration.html
%%PORTDOCS%%share/doc/emil/control.html %%PORTDOCS%%%%DOCSDIR%%/control.html
%%PORTDOCS%%share/doc/emil/design-spec.html %%PORTDOCS%%%%DOCSDIR%%/design-spec.html
%%PORTDOCS%%share/doc/emil/design-top.html %%PORTDOCS%%%%DOCSDIR%%/design-top.html
%%PORTDOCS%%share/doc/emil/details.html %%PORTDOCS%%%%DOCSDIR%%/details.html
%%PORTDOCS%%share/doc/emil/emil.cf.html %%PORTDOCS%%%%DOCSDIR%%/emil.cf.html
%%PORTDOCS%%share/doc/emil/end.html %%PORTDOCS%%%%DOCSDIR%%/end.html
%%PORTDOCS%%share/doc/emil/figure1.gif %%PORTDOCS%%%%DOCSDIR%%/figure1.gif
%%PORTDOCS%%share/doc/emil/figure2.gif %%PORTDOCS%%%%DOCSDIR%%/figure2.gif
%%PORTDOCS%%share/doc/emil/figure3.gif %%PORTDOCS%%%%DOCSDIR%%/figure3.gif
%%PORTDOCS%%share/doc/emil/figure4.gif %%PORTDOCS%%%%DOCSDIR%%/figure4.gif
%%PORTDOCS%%share/doc/emil/figure5.gif %%PORTDOCS%%%%DOCSDIR%%/figure5.gif
%%PORTDOCS%%share/doc/emil/figure6.gif %%PORTDOCS%%%%DOCSDIR%%/figure6.gif
%%PORTDOCS%%share/doc/emil/figure7.gif %%PORTDOCS%%%%DOCSDIR%%/figure7.gif
%%PORTDOCS%%share/doc/emil/index.shtml %%PORTDOCS%%%%DOCSDIR%%/index.shtml
%%PORTDOCS%%share/doc/emil/input.html %%PORTDOCS%%%%DOCSDIR%%/input.html
%%PORTDOCS%%share/doc/emil/intro.html %%PORTDOCS%%%%DOCSDIR%%/intro.html
%%PORTDOCS%%share/doc/emil/main.html %%PORTDOCS%%%%DOCSDIR%%/main.html
%%PORTDOCS%%share/doc/emil/output.html %%PORTDOCS%%%%DOCSDIR%%/output.html
%%PORTDOCS%%share/doc/emil/problem-statement.html %%PORTDOCS%%%%DOCSDIR%%/problem-statement.html
%%PORTDOCS%%share/doc/emil/rfc1521.html %%PORTDOCS%%%%DOCSDIR%%/rfc1521.html
%%PORTDOCS%%share/doc/emil/rfc1522.html %%PORTDOCS%%%%DOCSDIR%%/rfc1522.html
%%PORTDOCS%%share/doc/emil/rfc822.html %%PORTDOCS%%%%DOCSDIR%%/rfc822.html
%%PORTDOCS%%share/doc/emil/setting.html %%PORTDOCS%%%%DOCSDIR%%/setting.html
%%PORTDOCS%%share/doc/emil/using.html %%PORTDOCS%%%%DOCSDIR%%/using.html
%%PORTDOCS%%share/doc/emil/way.html %%PORTDOCS%%%%DOCSDIR%%/way.html
%%PORTDOCS%%share/doc/emil/why.html %%PORTDOCS%%%%DOCSDIR%%/why.html
%%PORTDOCS%%@dirrm share/doc/emil %%PORTDOCS%%@dirrm %%DOCSDIR%%