FreeBSD Bugzilla – Attachment 131026 Details for
Bug 175046
mail/pgpsendmail: Fix build with clang
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 26.92 KB, created by
tkato432
on 2013-01-05 18:10:12 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
tkato432
Created:
2013-01-05 18:10:12 UTC
Size:
26.92 KB
patch
obsolete
>diff -urN /usr/ports/mail/pgpsendmail/Makefile mail/pgpsendmail/Makefile >--- /usr/ports/mail/pgpsendmail/Makefile 2012-11-08 06:23:54.000000000 +0900 >+++ mail/pgpsendmail/Makefile 2013-01-02 02:51:10.000000000 +0900 >@@ -1,12 +1,9 @@ >-# New ports collection makefile for: pgpsendmail >-# Date created: 20 Jan 1995 >-# Whom: ache >-# >+# Created by: ache > # $FreeBSD: head/mail/pgpsendmail/Makefile 300896 2012-07-14 13:54:48Z beat $ >-# > > PORTNAME= pgpsendmail > PORTVERSION= 1.4 >+PORTREVISION= 1 > CATEGORIES= mail > MASTER_SITES= ftp://ftp.dhp.com/pub/crypto/pgp/PGPsendmail/ > DISTNAME= PGPsendmail-v${PORTVERSION} >@@ -14,13 +11,40 @@ > MAINTAINER= ports@FreeBSD.org > COMMENT= PGP sign/encrypt/decrypt messages automatically > >-BUILD_DEPENDS+= pgp:${PORTSDIR}/security/pgp >+LICENSE= GPLv2 LGPL21 >+LICENSE_COMB= multi >+ >+BUILD_DEPENDS= pgp:${PORTSDIR}/security/pgp >+ >+WRKSRC= ${WRKDIR}/${PORTNAME} >+ >+MAKE_JOBS_SAFE= yes > >-WRKSRC= ${WRKDIR}/pgpsendmail >-INSTALL_TARGET= all_install > MAN1= pgppipe.1 sendpgppass.1 > MAN8= pgpsendmail.8 pgpdaemon.8 >+PLIST_FILES= bin/pgpdaemon bin/pgppipe bin/sendpgppass libexec/pgpsendmail > > post-patch: >- @${REINPLACE_CMD} -e 's,PREFIX = /usr/local,PREFIX=${PREFIX},g' ${WRKSRC}/Makefile >+ @${REINPLACE_CMD} -e \ >+ 's|^CC =|CC ?=| ; \ >+ s|^CFLAGS =|CFLAGS +=| ; \ >+ /^all:/s|clean|| ; \ >+ /install /s|^|#| ; \ >+ s|-s -o|-o| ; \ >+ /pgpsendmail.h/s|^|#|' ${WRKSRC}/Makefile >+ >+do-install: >+.for i in pgpdaemon pgppipe sendpgppass >+ (cd ${WRKSRC} && ${INSTALL_PROGRAM} ${i} ${PREFIX}/bin) >+.endfor >+.for i in pgpsendmail >+ (cd ${WRKSRC} && ${INSTALL_PROGRAM} ${i} ${PREFIX}/libexec) >+.endfor >+.for i in ${MAN1} >+ (cd ${WRKSRC}/doc && ${INSTALL_MAN} ${i} ${MAN1PREFIX}/man/man1) >+.endfor >+.for i in ${MAN8} >+ (cd ${WRKSRC}/doc && ${INSTALL_MAN} ${i} ${MAN8PREFIX}/man/man8) >+.endfor >+ > .include <bsd.port.mk> >diff -urN /usr/ports/mail/pgpsendmail/files/patch-aa mail/pgpsendmail/files/patch-aa >--- /usr/ports/mail/pgpsendmail/files/patch-aa 2012-11-08 06:23:54.000000000 +0900 >+++ mail/pgpsendmail/files/patch-aa 1970-01-01 09:00:00.000000000 +0900 >@@ -1,124 +0,0 @@ >-*** Makefile.old Sat Oct 15 23:06:26 1994 >---- Makefile Tue Jun 4 14:11:52 2002 >-*************** >-*** 13,28 **** >- # >- #SENDMAIL = '-DSENDMAIL="/usr/lib/sendmail"' >- >- DEFINES = >- >-! CC = cc >-! CFLAGS = $(DEFINES) -I. "-DVERSION=\"`cat version`\"" >- >- LDFLAGS = >- >- TARGETS = blindness_assist pgpsendmail pgpdaemon sendpgppass pgppipe >- >-! all: $(TARGETS) clean >- >- BLINDNESS_ASSIST_OBJ = blindness_assist.o >- >---- 13,29 ---- >- # >- #SENDMAIL = '-DSENDMAIL="/usr/lib/sendmail"' >- >-+ PREFIX = /usr/local >-+ >- DEFINES = >- >-! CFLAGS += $(DEFINES) -I. "-DVERSION=\"`cat version`\"" >- >- LDFLAGS = >- >- TARGETS = blindness_assist pgpsendmail pgpdaemon sendpgppass pgppipe >- >-! all: $(TARGETS) >- >- BLINDNESS_ASSIST_OBJ = blindness_assist.o >- >-*************** >-*** 39,55 **** >- pgpsendmail.o: pgpsendmail.c >- $(CC) $(CFLAGS) $(SENDMAIL) -c pgpsendmail.c >- >- pgpsendmail: $(PGPSENDMAIL_OBJ) >- $(CC) -s -o pgpsendmail $(PGPSENDMAIL_OBJ) $(LDFLAGS) >- @-./blindness_assist >-- -./install pgpsendmail >- >- >- PGPDAEMON_OBJ = pgpdaemon.o spawn.o strings.o memory.o misc.o >- >- pgpdaemon: $(PGPDAEMON_OBJ) >- $(CC) -s -o pgpdaemon $(PGPDAEMON_OBJ) $(LDFLAGS) >-- -./install pgpdaemon >- >- >- SENDPGPPASS_OBJ = sendpgppass.o conn_to_pgpd.o strings.o spawn.o \ >---- 40,55 ---- >- pgpsendmail.o: pgpsendmail.c >- $(CC) $(CFLAGS) $(SENDMAIL) -c pgpsendmail.c >- >-+ >- pgpsendmail: $(PGPSENDMAIL_OBJ) >- $(CC) -s -o pgpsendmail $(PGPSENDMAIL_OBJ) $(LDFLAGS) >- @-./blindness_assist >- >- >- PGPDAEMON_OBJ = pgpdaemon.o spawn.o strings.o memory.o misc.o >- >- pgpdaemon: $(PGPDAEMON_OBJ) >- $(CC) -s -o pgpdaemon $(PGPDAEMON_OBJ) $(LDFLAGS) >- >- >- SENDPGPPASS_OBJ = sendpgppass.o conn_to_pgpd.o strings.o spawn.o \ >-*************** >-*** 57,72 **** >- >- sendpgppass: $(SENDPGPPASS_OBJ) >- $(CC) -s -o sendpgppass $(SENDPGPPASS_OBJ) $(LDFLAGS) >-- -./install sendpgppass >- >- >- PGPPIPE_OBJ = pgppipe.o conn_to_pgpd.o memory.o misc.o >- >- pgppipe: $(PGPPIPE_OBJ) >- $(CC) -s -o pgppipe $(PGPPIPE_OBJ) $(LDFLAGS) >-- -./install pgppipe >- >- >- clean: >- rm -f *.BAK *.log *.sed .#* *~ *.bak */*.bak */tmp* .*defaults */*~ >- -chmod u+rw,go-w * 2> /dev/null >---- 57,80 ---- >- >- sendpgppass: $(SENDPGPPASS_OBJ) >- $(CC) -s -o sendpgppass $(SENDPGPPASS_OBJ) $(LDFLAGS) >- >- >- PGPPIPE_OBJ = pgppipe.o conn_to_pgpd.o memory.o misc.o >- >- pgppipe: $(PGPPIPE_OBJ) >- $(CC) -s -o pgppipe $(PGPPIPE_OBJ) $(LDFLAGS) >- >- >-+ all_install: >-+ $(BSD_INSTALL_PROGRAM) pgpsendmail $(PREFIX)/lib >-+ $(BSD_INSTALL_MAN) doc/pgpsendmail.8 $(PREFIX)/man/man8 >-+ $(BSD_INSTALL_PROGRAM) pgpdaemon $(PREFIX)/bin >-+ $(BSD_INSTALL_MAN) doc/pgpdaemon.8 $(PREFIX)/man/man8 >-+ $(BSD_INSTALL_PROGRAM) pgppipe $(PREFIX)/bin >-+ $(BSD_INSTALL_MAN) doc/pgppipe.1 $(PREFIX)/man/man1 >-+ $(BSD_INSTALL_PROGRAM) sendpgppass $(PREFIX)/bin >-+ $(BSD_INSTALL_MAN) doc/sendpgppass.1 $(PREFIX)/man/man1 >-+ >- clean: >- rm -f *.BAK *.log *.sed .#* *~ *.bak */*.bak */tmp* .*defaults */*~ >- -chmod u+rw,go-w * 2> /dev/null >-*************** >-*** 88,90 **** >---- 96,99 ---- >- memory.o: pgpsendmail.h karma.h >- pgppipe.o: pgpsendmail.h karma.h version >- misc.o: pgpsendmail.h karma.h >-+ blindness_assist.o: pgpsendmail.h >diff -urN /usr/ports/mail/pgpsendmail/files/patch-ab mail/pgpsendmail/files/patch-ab >--- /usr/ports/mail/pgpsendmail/files/patch-ab 2012-11-08 06:23:54.000000000 +0900 >+++ mail/pgpsendmail/files/patch-ab 1970-01-01 09:00:00.000000000 +0900 >@@ -1,315 +0,0 @@ >-*** conn_to_pgpd.c.orig Sat Dec 3 06:51:16 1994 >---- conn_to_pgpd.c Sat Jan 21 03:12:05 1995 >-*************** >-*** 96,102 **** >---- 96,104 ---- >- char topipe_filename[STRING_LENGTH]; >- char frompipe_filename[STRING_LENGTH]; >- ERRNO_TYPE errno; >-+ #ifndef __FreeBSD__ >- extern char *sys_errlist[]; >-+ #endif >- >- if (gethostname (hostname, STRING_LENGTH - 1) != 0) >- { >-*** keylist.c.orig Sat Oct 15 20:31:05 1994 >---- keylist.c Sat Jan 21 03:12:05 1995 >-*************** >-*** 74,80 **** >---- 74,82 ---- >- char txt[STRING_LENGTH]; >- struct stat statbuf_list, statbuf_keyring; >- ERRNO_TYPE errno; >-+ #ifndef __FreeBSD__ >- extern char *sys_errlist[]; >-+ #endif >- static char *argv[] = {"pgp", "-kv", NULL}; >- >- (void) sprintf (listfile, "%s/.keylist", pgppath); >-*************** >-*** 268,274 **** >---- 270,278 ---- >- FILE *in_fp; >- char keyfile[STRING_LENGTH]; >- ERRNO_TYPE errno; >-+ #ifndef __FreeBSD__ >- extern char *sys_errlist[]; >-+ #endif >- >- (void) sprintf (keyfile, "%s/mypubkey.asc", pgppath); >- if ( ( in_fp = fopen (keyfile, "r") ) == NULL ) >-*** misc.c.orig Sat Dec 3 11:26:58 1994 >---- misc.c Sat Jan 21 03:12:05 1995 >-*************** >-*** 64,70 **** >---- 64,72 ---- >- int count = -1; >- char buffer[BUF_SIZE]; >- ERRNO_TYPE errno; >-+ #ifndef __FreeBSD__ >- extern char *sys_errlist[]; >-+ #endif >- >- while ( ( len = read (in_fd, buffer, BUF_SIZE) ) > 0 ) >- { >-*************** >-*** 195,201 **** >---- 197,205 ---- >- struct stat statbuf; >- char buf[BUF_SIZE]; >- ERRNO_TYPE errno; >-+ #ifndef __FreeBSD__ >- extern char *sys_errlist[]; >-+ #endif >- >- m_clear (buf, BUF_SIZE); >- if ( ( fd = open (filename, O_RDWR, 0) ) < 0 ) >-*** options.c.orig Sat Oct 29 11:09:46 1994 >---- options.c Sat Jan 21 03:12:05 1995 >-*************** >-*** 158,164 **** >---- 158,166 ---- >- char config_filename[STRING_LENGTH]; >- char txt[STRING_LENGTH]; >- ERRNO_TYPE errno; >-+ #ifndef __FreeBSD__ >- extern char *sys_errlist[]; >-+ #endif >- >- (void) sprintf (config_filename, "%s/PGPsendmail.config", pgppath); >- if ( ( fp = fopen (config_filename, "r") ) == NULL ) >-*** pgpdaemon.c.orig Wed Jan 4 08:15:01 1995 >---- pgpdaemon.c Sat Jan 21 03:19:13 1995 >-*************** >-*** 156,162 **** >- # if defined(sparc) || defined(linux) >- # define MAIL_SPOOL_DIR "/var/spool/mail" >- # else >-! # if defined(__bsdi__) || ( defined(sparc) && defined(__sysvr4__) ) >- # define MAIL_SPOOL_DIR "/var/mail" >- # else >- # define MAIL_SPOOL_DIR "/usr/spool/mail" >---- 156,162 ---- >- # if defined(sparc) || defined(linux) >- # define MAIL_SPOOL_DIR "/var/spool/mail" >- # else >-! # if defined(__bsdi__) || defined(__FreeBSD__) || ( defined(sparc) && defined(__sysvr4__) ) >- # define MAIL_SPOOL_DIR "/var/mail" >- # else >- # define MAIL_SPOOL_DIR "/usr/spool/mail" >-*************** >-*** 268,274 **** >---- 268,276 ---- >- ERRNO_TYPE errno; >- static char usage_string[] = >- "Usage:\tpgpdaemon [-mailwait] [-detach] [-pgppath <path>]"; >-+ #ifndef __FreeBSD__ >- extern char *sys_errlist[]; >-+ #endif >- >- /* Read arguments */ >- for (count = 1; count < argc; ++count) >-*************** >-*** 545,551 **** >---- 547,555 ---- >- extern char passphrase[STRING_LENGTH]; >- extern char *secring_buf; >- ERRNO_TYPE errno; >-+ #ifndef __FreeBSD__ >- extern char *sys_errlist[]; >-+ #endif >- >- /* Connect to output pipe */ >- for (count = 0; (count < 2) && (out_fd < 0); ++count) >-*************** >-*** 782,788 **** >---- 786,794 ---- >- extern char my_userid[STRING_LENGTH]; >- extern char passphrase[STRING_LENGTH]; >- ERRNO_TYPE errno; >-+ #ifndef __FreeBSD__ >- extern char *sys_errlist[]; >-+ #endif >- >- /* Setup arguments to PGP */ >- if (sign) >-*************** >-*** 879,885 **** >---- 885,893 ---- >- char lock_name[STRING_LENGTH]; >- char mlk_name[STRING_LENGTH]; >- ERRNO_TYPE errno; >-+ #ifndef __FreeBSD__ >- extern char *sys_errlist[]; >-+ #endif >- >- (void) strcpy (lock_name, filename); >- (void) strcat (lock_name, ".lock"); >-*************** >-*** 956,962 **** >---- 964,972 ---- >- struct flock fl; >- #endif >- ERRNO_TYPE errno; >-+ #ifndef __FreeBSD__ >- extern char *sys_errlist[]; >-+ #endif >- >- if (no_filelocking) return (TRUE); >- #undef LOCKING_WORKS >-*************** >-*** 1032,1038 **** >---- 1042,1050 ---- >- extern char outgoing_spool[STRING_LENGTH]; >- extern char passphrase[STRING_LENGTH]; >- ERRNO_TYPE errno; >-+ #ifndef __FreeBSD__ >- extern char *sys_errlist[]; >-+ #endif >- >- if (stat (incoming_spool, &statbuf) != 0) >- { >-*************** >-*** 1436,1442 **** >---- 1448,1456 ---- >- extern char incoming_spool[STRING_LENGTH]; >- extern char outgoing_spool[STRING_LENGTH]; >- ERRNO_TYPE errno; >-+ #ifndef __FreeBSD__ >- extern char *sys_errlist[]; >-+ #endif >- >- (void) sprintf (config_filename, "%s/PGPdaemon.config", pgppath); >- if ( ( fp = fopen (config_filename, "r") ) == NULL ) >-*************** >-*** 1587,1593 **** >---- 1601,1609 ---- >- extern char *secring_buf; >- extern char *pgppath; >- ERRNO_TYPE errno; >-+ #ifndef __FreeBSD__ >- extern char *sys_errlist[]; >-+ #endif >- >- (void) sprintf (filename, "%s/secring.pgp", pgppath); >- if ( ( fd = open (filename, O_WRONLY | O_CREAT | O_EXCL, >-*** pgppipe.c.orig Wed Dec 7 14:03:39 1994 >---- pgppipe.c Sat Jan 21 03:12:06 1995 >-*************** >-*** 67,73 **** >---- 67,75 ---- >- char *pgp_start_line = "-----BEGIN PGP MESSAGE-----\n"; >- char *pgp_end_line = "-----END PGP MESSAGE-----\n"; >- ERRNO_TYPE errno; >-+ #ifndef __FreeBSD__ >- extern char *sys_errlist[]; >-+ #endif >- >- if ( ( pgppath = getenv ("PGPPATH") ) == NULL ) >- { >-*** pgpsendmail.c.orig Tue Jan 17 03:55:45 1995 >---- pgpsendmail.c Sat Jan 21 03:12:06 1995 >-*************** >-*** 184,190 **** >---- 184,192 ---- >- extern char *username; >- extern char **recipients; >- ERRNO_TYPE errno; >-+ #ifndef __FreeBSD__ >- extern char *sys_errlist[]; >-+ #endif >- >- if (argv[0] == NULL) >- { >-*************** >-*** 940,946 **** >---- 942,950 ---- >- char *argv[6]; >- extern char *username; >- ERRNO_TYPE errno; >-+ #ifndef __FreeBSD__ >- extern char *sys_errlist[]; >-+ #endif >- >- /* Make stdout go to stderr */ >- (void) fflush (stdout); >-*************** >-*** 1250,1256 **** >---- 1254,1262 ---- >- extern char *buffer; >- extern char *pgppath; >- ERRNO_TYPE errno; >-+ #ifndef __FreeBSD__ >- extern char *sys_errlist[]; >-+ #endif >- >- if (!sign) >- { >-*** pgpsendmail.h.orig Sat Dec 3 06:23:34 1994 >---- pgpsendmail.h Sat Jan 21 03:12:06 1995 >-*************** >-*** 34,40 **** >---- 34,44 ---- >- #define LINE_LENGTH 1024 >- #define BUF_LEN 4096 >- #ifndef SENDMAIL >-+ #ifdef __FreeBSD__ >-+ # define SENDMAIL "/usr/sbin/sendmail" >-+ #else >- # define SENDMAIL "/usr/lib/sendmail.real" >-+ #endif >- #endif >- #define SECRING_SIZE_TYPE int >- >-*** sendpgppass.c.orig Sat Dec 3 07:10:21 1994 >---- sendpgppass.c Sat Jan 21 03:12:06 1995 >-*************** >-*** 118,124 **** >---- 118,126 ---- >- char txt[STRING_LENGTH]; >- char *pgp_argv[7]; >- ERRNO_TYPE errno; >-+ #ifndef __FreeBSD__ >- extern char *sys_errlist[]; >-+ #endif >- >- if ( ( pgppath = getenv ("PGPPATH") ) == NULL ) >- { >-*************** >-*** 323,329 **** >---- 325,333 ---- >- int count; >- int fd; >- ERRNO_TYPE errno; >-+ #ifndef __FreeBSD__ >- extern char *sys_errlist[]; >-+ #endif >- static char buffer[STRING_LENGTH]; >- >- if ( ( fd = open (TTY, O_RDWR, 0) ) < 0 ) >-*************** >-*** 395,401 **** >---- 399,407 ---- >- char config_filename[STRING_LENGTH]; >- char txt[STRING_LENGTH]; >- ERRNO_TYPE errno; >-+ #ifndef __FreeBSD__ >- extern char *sys_errlist[]; >-+ #endif >- >- (void) sprintf (config_filename, "%s/PGPdaemon.config", pgppath); >- if ( ( fp = fopen (config_filename, "r") ) == NULL ) >-*** spawn.c.orig Sat Dec 3 09:02:30 1994 >---- spawn.c Sat Jan 21 03:12:06 1995 >-*************** >-*** 79,85 **** >---- 79,87 ---- >- int child_pid; >- int in_fds[2], out_fds[2], err_fds[2]; >- ERRNO_TYPE errno; >-+ #ifndef __FreeBSD__ >- extern char *sys_errlist[]; >-+ #endif >- >- if (*in_fd < 0) >- { >diff -urN /usr/ports/mail/pgpsendmail/files/patch-conn_to_pgpd.c mail/pgpsendmail/files/patch-conn_to_pgpd.c >--- /usr/ports/mail/pgpsendmail/files/patch-conn_to_pgpd.c 1970-01-01 09:00:00.000000000 +0900 >+++ mail/pgpsendmail/files/patch-conn_to_pgpd.c 2012-10-24 16:03:13.000000000 +0900 >@@ -0,0 +1,21 @@ >+--- conn_to_pgpd.c.orig 1994-12-03 12:51:16.000000000 +0900 >++++ conn_to_pgpd.c 2012-10-24 16:02:51.000000000 +0900 >+@@ -55,6 +55,8 @@ >+ #include <signal.h> >+ #include <sys/types.h> >+ #include <sys/stat.h> >++#include <sys/uio.h> >++#include <unistd.h> >+ #include <fcntl.h> >+ #include "pgpsendmail.h" >+ >+@@ -96,7 +98,9 @@ >+ char topipe_filename[STRING_LENGTH]; >+ char frompipe_filename[STRING_LENGTH]; >+ ERRNO_TYPE errno; >++#if 0 >+ extern char *sys_errlist[]; >++#endif >+ >+ if (gethostname (hostname, STRING_LENGTH - 1) != 0) >+ { >diff -urN /usr/ports/mail/pgpsendmail/files/patch-keylist.c mail/pgpsendmail/files/patch-keylist.c >--- /usr/ports/mail/pgpsendmail/files/patch-keylist.c 1970-01-01 09:00:00.000000000 +0900 >+++ mail/pgpsendmail/files/patch-keylist.c 2012-10-24 16:23:46.000000000 +0900 >@@ -0,0 +1,32 @@ >+--- keylist.c.orig 1994-10-16 02:31:05.000000000 +0900 >++++ keylist.c 2012-10-24 16:23:33.000000000 +0900 >+@@ -49,6 +49,9 @@ >+ #include <errno.h> >+ #include <sys/types.h> >+ #include <sys/stat.h> >++#include <sys/wait.h> >++#include <ctype.h> >++#include <unistd.h> >+ #include <fcntl.h> >+ #include "pgpsendmail.h" >+ >+@@ -74,7 +77,9 @@ >+ char txt[STRING_LENGTH]; >+ struct stat statbuf_list, statbuf_keyring; >+ ERRNO_TYPE errno; >++#if 0 >+ extern char *sys_errlist[]; >++#endif >+ static char *argv[] = {"pgp", "-kv", NULL}; >+ >+ (void) sprintf (listfile, "%s/.keylist", pgppath); >+@@ -268,7 +273,9 @@ >+ FILE *in_fp; >+ char keyfile[STRING_LENGTH]; >+ ERRNO_TYPE errno; >++#if 0 >+ extern char *sys_errlist[]; >++#endif >+ >+ (void) sprintf (keyfile, "%s/mypubkey.asc", pgppath); >+ if ( ( in_fp = fopen (keyfile, "r") ) == NULL ) >diff -urN /usr/ports/mail/pgpsendmail/files/patch-misc.c mail/pgpsendmail/files/patch-misc.c >--- /usr/ports/mail/pgpsendmail/files/patch-misc.c 1970-01-01 09:00:00.000000000 +0900 >+++ mail/pgpsendmail/files/patch-misc.c 2012-10-24 16:05:05.000000000 +0900 >@@ -0,0 +1,34 @@ >+--- misc.c.orig 1994-12-03 17:26:58.000000000 +0900 >++++ misc.c 2012-10-24 16:04:53.000000000 +0900 >+@@ -39,8 +39,11 @@ >+ >+ */ >+ #include <stdio.h> >++#include <string.h> >+ #include <sys/types.h> >+ #include <sys/stat.h> >++#include <sys/uio.h> >++#include <unistd.h> >+ #include <fcntl.h> >+ #include "pgpsendmail.h" >+ >+@@ -64,7 +67,9 @@ >+ int count = -1; >+ char buffer[BUF_SIZE]; >+ ERRNO_TYPE errno; >++#if 0 >+ extern char *sys_errlist[]; >++#endif >+ >+ while ( ( len = read (in_fd, buffer, BUF_SIZE) ) > 0 ) >+ { >+@@ -195,7 +200,9 @@ >+ struct stat statbuf; >+ char buf[BUF_SIZE]; >+ ERRNO_TYPE errno; >++#if 0 >+ extern char *sys_errlist[]; >++#endif >+ >+ m_clear (buf, BUF_SIZE); >+ if ( ( fd = open (filename, O_RDWR, 0) ) < 0 ) >diff -urN /usr/ports/mail/pgpsendmail/files/patch-options.c mail/pgpsendmail/files/patch-options.c >--- /usr/ports/mail/pgpsendmail/files/patch-options.c 1970-01-01 09:00:00.000000000 +0900 >+++ mail/pgpsendmail/files/patch-options.c 2012-10-24 16:09:32.000000000 +0900 >@@ -0,0 +1,12 @@ >+--- options.c.orig 1994-10-29 17:09:46.000000000 +0900 >++++ options.c 2012-10-24 16:09:09.000000000 +0900 >+@@ -158,7 +158,9 @@ >+ char config_filename[STRING_LENGTH]; >+ char txt[STRING_LENGTH]; >+ ERRNO_TYPE errno; >++#if 0 >+ extern char *sys_errlist[]; >++#endif >+ >+ (void) sprintf (config_filename, "%s/PGPsendmail.config", pgppath); >+ if ( ( fp = fopen (config_filename, "r") ) == NULL ) >diff -urN /usr/ports/mail/pgpsendmail/files/patch-pgpdaemon.c mail/pgpsendmail/files/patch-pgpdaemon.c >--- /usr/ports/mail/pgpsendmail/files/patch-pgpdaemon.c 1970-01-01 09:00:00.000000000 +0900 >+++ mail/pgpsendmail/files/patch-pgpdaemon.c 2012-10-24 16:19:39.000000000 +0900 >@@ -0,0 +1,100 @@ >+--- pgpdaemon.c.orig 1995-01-04 14:15:01.000000000 +0900 >++++ pgpdaemon.c 2012-10-24 16:19:34.000000000 +0900 >+@@ -156,7 +156,7 @@ >+ # if defined(sparc) || defined(linux) >+ # define MAIL_SPOOL_DIR "/var/spool/mail" >+ # else >+-# if defined(__bsdi__) || ( defined(sparc) && defined(__sysvr4__) ) >++# if defined(__bsdi__) || defined(__FreeBSD__) || ( defined(sparc) && defined(__sysvr4__) ) >+ # define MAIL_SPOOL_DIR "/var/mail" >+ # else >+ # define MAIL_SPOOL_DIR "/usr/spool/mail" >+@@ -229,7 +229,7 @@ >+ >+ /* Now everything else may follow. */ >+ >+-void main (argc, argv, envp) >++int main (argc, argv, envp) >+ int argc; >+ char *argv[]; >+ char *envp[]; >+@@ -268,7 +268,9 @@ >+ ERRNO_TYPE errno; >+ static char usage_string[] = >+ "Usage:\tpgpdaemon [-mailwait] [-detach] [-pgppath <path>]"; >++#if 0 >+ extern char *sys_errlist[]; >++#endif >+ >+ /* Read arguments */ >+ for (count = 1; count < argc; ++count) >+@@ -545,7 +547,9 @@ >+ extern char passphrase[STRING_LENGTH]; >+ extern char *secring_buf; >+ ERRNO_TYPE errno; >++#if 0 >+ extern char *sys_errlist[]; >++#endif >+ >+ /* Connect to output pipe */ >+ for (count = 0; (count < 2) && (out_fd < 0); ++count) >+@@ -782,7 +786,9 @@ >+ extern char my_userid[STRING_LENGTH]; >+ extern char passphrase[STRING_LENGTH]; >+ ERRNO_TYPE errno; >++#if 0 >+ extern char *sys_errlist[]; >++#endif >+ >+ /* Setup arguments to PGP */ >+ if (sign) >+@@ -879,7 +885,9 @@ >+ char lock_name[STRING_LENGTH]; >+ char mlk_name[STRING_LENGTH]; >+ ERRNO_TYPE errno; >++#if 0 >+ extern char *sys_errlist[]; >++#endif >+ >+ (void) strcpy (lock_name, filename); >+ (void) strcat (lock_name, ".lock"); >+@@ -956,7 +964,9 @@ >+ struct flock fl; >+ #endif >+ ERRNO_TYPE errno; >++#if 0 >+ extern char *sys_errlist[]; >++#endif >+ >+ if (no_filelocking) return (TRUE); >+ #undef LOCKING_WORKS >+@@ -1032,7 +1042,9 @@ >+ extern char outgoing_spool[STRING_LENGTH]; >+ extern char passphrase[STRING_LENGTH]; >+ ERRNO_TYPE errno; >++#if 0 >+ extern char *sys_errlist[]; >++#endif >+ >+ if (stat (incoming_spool, &statbuf) != 0) >+ { >+@@ -1436,7 +1448,9 @@ >+ extern char incoming_spool[STRING_LENGTH]; >+ extern char outgoing_spool[STRING_LENGTH]; >+ ERRNO_TYPE errno; >++#if 0 >+ extern char *sys_errlist[]; >++#endif >+ >+ (void) sprintf (config_filename, "%s/PGPdaemon.config", pgppath); >+ if ( ( fp = fopen (config_filename, "r") ) == NULL ) >+@@ -1587,7 +1601,9 @@ >+ extern char *secring_buf; >+ extern char *pgppath; >+ ERRNO_TYPE errno; >++#if 0 >+ extern char *sys_errlist[]; >++#endif >+ >+ (void) sprintf (filename, "%s/secring.pgp", pgppath); >+ if ( ( fd = open (filename, O_WRONLY | O_CREAT | O_EXCL, >diff -urN /usr/ports/mail/pgpsendmail/files/patch-pgppipe.c mail/pgpsendmail/files/patch-pgppipe.c >--- /usr/ports/mail/pgpsendmail/files/patch-pgppipe.c 1970-01-01 09:00:00.000000000 +0900 >+++ mail/pgpsendmail/files/patch-pgppipe.c 2012-10-24 16:20:42.000000000 +0900 >@@ -0,0 +1,21 @@ >+--- pgppipe.c.orig 1994-12-07 20:03:39.000000000 +0900 >++++ pgppipe.c 2012-10-24 16:20:24.000000000 +0900 >+@@ -52,7 +52,7 @@ >+ #include "pgpsendmail.h" >+ >+ >+-void main (argc, argv, envp) >++int main (argc, argv, envp) >+ int argc; >+ char *argv[]; >+ char *envp[]; >+@@ -67,7 +67,9 @@ >+ char *pgp_start_line = "-----BEGIN PGP MESSAGE-----\n"; >+ char *pgp_end_line = "-----END PGP MESSAGE-----\n"; >+ ERRNO_TYPE errno; >++#if 0 >+ extern char *sys_errlist[]; >++#endif >+ >+ if ( ( pgppath = getenv ("PGPPATH") ) == NULL ) >+ { >diff -urN /usr/ports/mail/pgpsendmail/files/patch-pgpsendmail.c mail/pgpsendmail/files/patch-pgpsendmail.c >--- /usr/ports/mail/pgpsendmail/files/patch-pgpsendmail.c 1970-01-01 09:00:00.000000000 +0900 >+++ mail/pgpsendmail/files/patch-pgpsendmail.c 2012-10-24 16:21:16.000000000 +0900 >@@ -0,0 +1,41 @@ >+--- pgpsendmail.c.orig 1995-01-17 09:55:45.000000000 +0900 >++++ pgpsendmail.c 2012-10-24 16:20:57.000000000 +0900 >+@@ -152,7 +152,7 @@ >+ flag no_advertising, flag add_key) ); >+ >+ >+-void main (argc, argv, envp) >++int main (argc, argv, envp) >+ int argc; >+ char *argv[]; >+ char *envp[]; >+@@ -184,7 +184,9 @@ >+ extern char *username; >+ extern char **recipients; >+ ERRNO_TYPE errno; >++#if 0 >+ extern char *sys_errlist[]; >++#endif >+ >+ if (argv[0] == NULL) >+ { >+@@ -940,7 +942,9 @@ >+ char *argv[6]; >+ extern char *username; >+ ERRNO_TYPE errno; >++#if 0 >+ extern char *sys_errlist[]; >++#endif >+ >+ /* Make stdout go to stderr */ >+ (void) fflush (stdout); >+@@ -1250,7 +1254,9 @@ >+ extern char *buffer; >+ extern char *pgppath; >+ ERRNO_TYPE errno; >++#if 0 >+ extern char *sys_errlist[]; >++#endif >+ >+ if (!sign) >+ { >diff -urN /usr/ports/mail/pgpsendmail/files/patch-pgpsendmail.h mail/pgpsendmail/files/patch-pgpsendmail.h >--- /usr/ports/mail/pgpsendmail/files/patch-pgpsendmail.h 1970-01-01 09:00:00.000000000 +0900 >+++ mail/pgpsendmail/files/patch-pgpsendmail.h 2012-10-24 15:39:09.000000000 +0900 >@@ -0,0 +1,15 @@ >+--- pgpsendmail.h.orig 1994-12-03 12:23:34.000000000 +0900 >++++ pgpsendmail.h 2012-10-24 15:35:51.000000000 +0900 >+@@ -34,8 +34,12 @@ >+ #define LINE_LENGTH 1024 >+ #define BUF_LEN 4096 >+ #ifndef SENDMAIL >++#ifdef __FreeBSD__ >++# define SENDMAIL "/usr/sbin/sendmail" >++#else >+ # define SENDMAIL "/usr/lib/sendmail.real" >+ #endif >++#endif >+ #define SECRING_SIZE_TYPE int >+ >+ #define CHECK_CAN_ENCRYPT 0 >diff -urN /usr/ports/mail/pgpsendmail/files/patch-sendpgppass.c mail/pgpsendmail/files/patch-sendpgppass.c >--- /usr/ports/mail/pgpsendmail/files/patch-sendpgppass.c 1970-01-01 09:00:00.000000000 +0900 >+++ mail/pgpsendmail/files/patch-sendpgppass.c 2012-10-24 16:22:58.000000000 +0900 >@@ -0,0 +1,58 @@ >+--- sendpgppass.c.orig 1994-12-03 13:10:21.000000000 +0900 >++++ sendpgppass.c 2012-10-24 16:22:30.000000000 +0900 >+@@ -56,13 +56,15 @@ >+ #include <stdio.h> >+ #include <unistd.h> >+ #include <stdlib.h> >++#include <string.h> >+ #include <sys/types.h> >+ #include <sys/stat.h> >++#include <sys/wait.h> >+ #ifdef _AIX >+ # include <termios.h> >+ # include <termio.h> >+ #else >+-# include <sys/termios.h> >++# include <termios.h> >+ #endif >+ #include <fcntl.h> >+ #include "pgpsendmail.h" >+@@ -96,7 +98,7 @@ >+ STATIC_FUNCTION (char *get_userid, (char *pgppath) ); >+ >+ >+-void main (argc, argv, envp) >++int main (argc, argv, envp) >+ int argc; >+ char *argv[]; >+ char *envp[]; >+@@ -118,7 +120,9 @@ >+ char txt[STRING_LENGTH]; >+ char *pgp_argv[7]; >+ ERRNO_TYPE errno; >++#if 0 >+ extern char *sys_errlist[]; >++#endif >+ >+ if ( ( pgppath = getenv ("PGPPATH") ) == NULL ) >+ { >+@@ -323,7 +327,9 @@ >+ int count; >+ int fd; >+ ERRNO_TYPE errno; >++#if 0 >+ extern char *sys_errlist[]; >++#endif >+ static char buffer[STRING_LENGTH]; >+ >+ if ( ( fd = open (TTY, O_RDWR, 0) ) < 0 ) >+@@ -395,7 +401,9 @@ >+ char config_filename[STRING_LENGTH]; >+ char txt[STRING_LENGTH]; >+ ERRNO_TYPE errno; >++#if 0 >+ extern char *sys_errlist[]; >++#endif >+ >+ (void) sprintf (config_filename, "%s/PGPdaemon.config", pgppath); >+ if ( ( fp = fopen (config_filename, "r") ) == NULL ) >diff -urN /usr/ports/mail/pgpsendmail/files/patch-spawn.c mail/pgpsendmail/files/patch-spawn.c >--- /usr/ports/mail/pgpsendmail/files/patch-spawn.c 1970-01-01 09:00:00.000000000 +0900 >+++ mail/pgpsendmail/files/patch-spawn.c 2012-10-24 16:00:14.000000000 +0900 >@@ -0,0 +1,21 @@ >+--- spawn.c.orig 1994-12-03 15:02:30.000000000 +0900 >++++ spawn.c 2012-10-24 15:59:57.000000000 +0900 >+@@ -49,6 +49,8 @@ >+ >+ */ >+ #include <stdio.h> >++#include <sys/types.h> >++#include <unistd.h> >+ #include "pgpsendmail.h" >+ >+ >+@@ -79,7 +81,9 @@ >+ int child_pid; >+ int in_fds[2], out_fds[2], err_fds[2]; >+ ERRNO_TYPE errno; >++#if 0 >+ extern char *sys_errlist[]; >++#endif >+ >+ if (*in_fd < 0) >+ { >diff -urN /usr/ports/mail/pgpsendmail/pkg-descr mail/pgpsendmail/pkg-descr >--- /usr/ports/mail/pgpsendmail/pkg-descr 2012-11-08 06:23:54.000000000 +0900 >+++ mail/pgpsendmail/pkg-descr 2012-10-24 16:55:34.000000000 +0900 >@@ -1,8 +1,7 @@ >- PGPsendmail is a drop-in wrapper for the standard sendmail >-programme which resides as /usr/lib/sendmail on most Unix systems. >-It allows the automatic encryption of outgoing messages by using the >-recipient's PGP public keys. It does *not* provide for automatic >-decryption of incoming messages: such a feature would necessarily >-involve compromising your passphrase. >-However, it can provide for automatic signing of outgoing messages by >-using PGPdaemon. >+PGPsendmail is a drop-in wrapper for the standard sendmail programme >+which resides as /usr/sbin/sendmail on most Unix systems. It allows the >+automatic encryption of outgoing messages by using the recipient's PGP >+public keys. It does *not* provide for automatic decryption of incoming >+messages: such a feature would necessarily involve compromising your >+passphrase. However, it can provide for automatic signing of outgoing >+messages by using PGPdaemon. >diff -urN /usr/ports/mail/pgpsendmail/pkg-plist mail/pgpsendmail/pkg-plist >--- /usr/ports/mail/pgpsendmail/pkg-plist 2012-11-08 06:23:54.000000000 +0900 >+++ mail/pgpsendmail/pkg-plist 1970-01-01 09:00:00.000000000 +0900 >@@ -1,4 +0,0 @@ >-lib/pgpsendmail >-bin/pgpdaemon >-bin/pgppipe >-bin/sendpgppass
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 175046
: 131026