pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/mail/metamail



Module Name:    pkgsrc
Committed By:   mrg
Date:           Sun Oct 12 00:57:39 UTC 2025

Modified Files:
        pkgsrc/mail/metamail: Makefile distinfo
        pkgsrc/mail/metamail/patches: patch-ae patch-af patch-ai patch-ar
            patch-at patch-metamail_codes.c patch-metamail_shared.c
            patch-richmail_iso2022.c
Added Files:
        pkgsrc/mail/metamail/patches: patch-metamail_metamail.h
            patch-metamail_mmencode.c patch-richmail_richlex.c
            patch-richmail_richlex.h patch-richmail_richset.c
            patch-richmail_richset.h patch-richmail_richtoatk.c
            patch-richmail_usascii.c

Log Message:
make build with GCC 14.  phew!

it's a lot of standard things:
- missing headers
- missing types
- conflicting types


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 pkgsrc/mail/metamail/Makefile
cvs rdiff -u -r1.31 -r1.32 pkgsrc/mail/metamail/distinfo
cvs rdiff -u -r1.6 -r1.7 pkgsrc/mail/metamail/patches/patch-ae
cvs rdiff -u -r1.5 -r1.6 pkgsrc/mail/metamail/patches/patch-af
cvs rdiff -u -r1.4 -r1.5 pkgsrc/mail/metamail/patches/patch-ai
cvs rdiff -u -r1.2 -r1.3 pkgsrc/mail/metamail/patches/patch-ar
cvs rdiff -u -r1.3 -r1.4 pkgsrc/mail/metamail/patches/patch-at
cvs rdiff -u -r1.1 -r1.2 pkgsrc/mail/metamail/patches/patch-metamail_codes.c \
    pkgsrc/mail/metamail/patches/patch-metamail_shared.c \
    pkgsrc/mail/metamail/patches/patch-richmail_iso2022.c
cvs rdiff -u -r0 -r1.1 pkgsrc/mail/metamail/patches/patch-metamail_metamail.h \
    pkgsrc/mail/metamail/patches/patch-metamail_mmencode.c \
    pkgsrc/mail/metamail/patches/patch-richmail_richlex.c \
    pkgsrc/mail/metamail/patches/patch-richmail_richlex.h \
    pkgsrc/mail/metamail/patches/patch-richmail_richset.c \
    pkgsrc/mail/metamail/patches/patch-richmail_richset.h \
    pkgsrc/mail/metamail/patches/patch-richmail_richtoatk.c \
    pkgsrc/mail/metamail/patches/patch-richmail_usascii.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mail/metamail/Makefile
diff -u pkgsrc/mail/metamail/Makefile:1.55 pkgsrc/mail/metamail/Makefile:1.56
--- pkgsrc/mail/metamail/Makefile:1.55  Sun Apr 25 05:57:10 2021
+++ pkgsrc/mail/metamail/Makefile       Sun Oct 12 00:57:38 2025
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.55 2021/04/25 05:57:10 wiz Exp $
+# $NetBSD: Makefile,v 1.56 2025/10/12 00:57:38 mrg Exp $
 
 DISTNAME=      mm2.7
 PKGNAME=       metamail-2.7
@@ -16,6 +16,7 @@ WRKSRC=               ${WRKDIR}/${DISTNAME}/src
 
 CFLAGS.Linux+= -DLINUX
 CFLAGS.SunOS+= -DSYSV
+#CFLAGS.NetBSD+=       -Wno-implicit-int -Wno-implicit-function-declaration -Wno-builtin-declaration-mismatch -Wno-incompatible-pointer-types
 MAKE_ENV+=     PKG_SYSCONFDIR=${PKG_SYSCONFDIR} CHMOD=${CHMOD:Q} SED=${SED:Q}
 
 EGDIR=         ${PREFIX}/share/examples/metamail

Index: pkgsrc/mail/metamail/distinfo
diff -u pkgsrc/mail/metamail/distinfo:1.31 pkgsrc/mail/metamail/distinfo:1.32
--- pkgsrc/mail/metamail/distinfo:1.31  Tue Oct 26 10:54:07 2021
+++ pkgsrc/mail/metamail/distinfo       Sun Oct 12 00:57:38 2025
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.31 2021/10/26 10:54:07 nia Exp $
+$NetBSD: distinfo,v 1.32 2025/10/12 00:57:38 mrg Exp $
 
 BLAKE2s (mm2.7.tar.Z) = b0dd18b18b9ba6dc57d5bf805f2647fd90c81a67bc6d88832481807fbbb3aa39
 SHA512 (mm2.7.tar.Z) = 9cd2619ca83594ca7be94453270b6a9ef01f5a496fd361bb76f16fc575f549ab450efa1d480c3d4b0b172f245d9c3276f99ba1ae4e3ae4bb6618df9d8131f77e
@@ -7,11 +7,11 @@ SHA1 (patch-aa) = 6f1d8f9cd5773deb3a050c
 SHA1 (patch-ab) = 15dd81405551f4d7d3c0e59cf49038857603a9eb
 SHA1 (patch-ac) = f0b04f7d6b17fb5c71a09b4caaf4298acdcff64e
 SHA1 (patch-ad) = 1f152ab38d3c2da42afdb3b3c6a1b218ac8d3996
-SHA1 (patch-ae) = c7d1997371ee5d61a0c7236da1f408502eeb0f1a
-SHA1 (patch-af) = 03d08e3bdff9009ef7f978364d99a9243f28eda5
+SHA1 (patch-ae) = bff45b036f41a17b260259074432dc8f4ad8e16b
+SHA1 (patch-af) = eeb28c5273a8fdd815e7479a47c48625ce2c0a1b
 SHA1 (patch-ag) = 674ceb59955de76e9a673ee4969d359a30fba5f8
 SHA1 (patch-ah) = 69f286fbb45420921cfe57e16c6ec220e409b784
-SHA1 (patch-ai) = bfb4a4cabdfb4b27b8d1f78285e678d1c214e62a
+SHA1 (patch-ai) = 2e84c8b0aebfa7eb9f03f51f430c3e0ca2301802
 SHA1 (patch-aj) = 7384564119a360189c68bdc5ce0ba3648a44769c
 SHA1 (patch-ak) = fcf331b9d28243cb403fd0dc34a365eb147f3da4
 SHA1 (patch-al) = c63427174a5d80c62b207212e0d855457939d0bc
@@ -20,9 +20,17 @@ SHA1 (patch-an) = 56c228106dc663623cb31e
 SHA1 (patch-ao) = 90566d47642fe8ee71295ea47f3cf7420d0b2880
 SHA1 (patch-ap) = ade6fba2254e7db3f9cf52acf453bb512c0a3d32
 SHA1 (patch-aq) = 90f84381aaf91db03cecef84d9433c3ffd1152db
-SHA1 (patch-ar) = 7167065afb79f59febbf7821ad625972eaf921f2
+SHA1 (patch-ar) = 6d01e5f53bd702b56b6caa3ff3f70bf63e75ec2d
 SHA1 (patch-as) = 8d8c31f1ff508e9d7fc73a03a5f7ba63faa118ef
-SHA1 (patch-at) = 9193001c138875a0a6cc562f9f8a0424f78328aa
-SHA1 (patch-metamail_codes.c) = df6df4ff4abeba96c0d68f3d025390121c2b589a
-SHA1 (patch-metamail_shared.c) = b014d77bb5d09cd2d3199bcaecaf51da490d70ca
-SHA1 (patch-richmail_iso2022.c) = 3a6ff631d50963d31701e7a0f5519967bbbf1e2e
+SHA1 (patch-at) = 027136588a15585dab456310ba12fc78eabc2e7c
+SHA1 (patch-metamail_codes.c) = 452b25dc2c60915af2de56213d9db6afa2013f6d
+SHA1 (patch-metamail_metamail.h) = 4300d2c43dc56f201d7758394b7feb2a154927ad
+SHA1 (patch-metamail_mmencode.c) = 0e2d28fb38ab8323bf91f92760cc48e206a097cb
+SHA1 (patch-metamail_shared.c) = af6fb54e3b164850b655241512f0229d3426032c
+SHA1 (patch-richmail_iso2022.c) = 0d9a5eaa0e7381301e36288af8051e9e20920e89
+SHA1 (patch-richmail_richlex.c) = ece3d7501e028d3a8e2be736e9a0b77ea40dc5ed
+SHA1 (patch-richmail_richlex.h) = f47c758727de1da3b079c344c0d9cbbdcfba23c2
+SHA1 (patch-richmail_richset.c) = 3508891395475a6942b66893815a4b9f344f6d24
+SHA1 (patch-richmail_richset.h) = 54919a8545a488598f94912fd3e75437dd445475
+SHA1 (patch-richmail_richtoatk.c) = 5d1793e7adce3f365520ae7852181661696ddea7
+SHA1 (patch-richmail_usascii.c) = c0ab6829d1267d1e56c20ea54b0c365e64d4b61d

Index: pkgsrc/mail/metamail/patches/patch-ae
diff -u pkgsrc/mail/metamail/patches/patch-ae:1.6 pkgsrc/mail/metamail/patches/patch-ae:1.7
--- pkgsrc/mail/metamail/patches/patch-ae:1.6   Sun Dec 30 05:38:55 2012
+++ pkgsrc/mail/metamail/patches/patch-ae       Sun Oct 12 00:57:39 2025
@@ -1,19 +1,21 @@
-$NetBSD: patch-ae,v 1.6 2012/12/30 05:38:55 dholland Exp $
+$NetBSD: patch-ae,v 1.7 2025/10/12 00:57:39 mrg Exp $
 
 - use required standard headers
 - make sure index() is available 
 - don't provide own declarations of standard functions
 - fix path to sendmail (although, is this really adequately MI?)
 - buffer length fix
+- port for GCC 14
 
---- metamail/splitmail.c.orig  1994-01-31 22:23:14.000000000 +0000
-+++ metamail/splitmail.c
-@@ -21,14 +21,20 @@ WITHOUT ANY EXPRESS OR IMPLIED WARRANTIE
+--- metamail/splitmail.c.orig  1994-01-31 14:23:14.000000000 -0800
++++ metamail/splitmail.c       2025-10-11 17:24:38.158624097 -0700
+@@ -21,14 +21,26 @@ WITHOUT ANY EXPRESS OR IMPLIED WARRANTIE
   ******************************************************* */
  
  #include <stdio.h>
 +#include <stdlib.h>
 +#include <string.h>
++#include <unistd.h>
  #include <sys/types.h>
  #include <sys/stat.h>
  #include <config.h>
@@ -27,10 +29,15 @@ $NetBSD: patch-ae,v 1.6 2012/12/30 05:38
  #define MINCHUNKSIZE 20000 /* Better be enough to hold the headers, or we die! */
 -extern char *malloc(), *index(), *getmyname();
 +extern char *getmyname();
++
++int ShareThisHeader();
++void HandleOnePart();
++int ULstrcmp();
++int IllegalContentType();
  
  #ifdef AMIGA
  #define Prototype   extern
-@@ -40,9 +46,8 @@ extern char *malloc(), *index(), *getmyn
+@@ -40,11 +52,11 @@ extern char *malloc(), *index(), *getmyn
  #define NORMALDELIVERYCMD NormalDeliveryCmd
  #define VERBOSEDELIVERYCMD VerboseDeliveryCmd
  #else
@@ -41,8 +48,21 @@ $NetBSD: patch-ae,v 1.6 2012/12/30 05:38
 +#define VERBOSEDELIVERYCMD "/usr/sbin/sendmail -t -v -oi"
  #endif
  
++void
  usageexit() {
-@@ -194,7 +199,7 @@ char **argv;
+     fprintf(stderr, "Usage:  splitmail [-d] [-v] [-s splitsize] [-i id-suffix] [-p prefix] [file-name]\n");
+     exit(-1);
+@@ -67,7 +79,9 @@ char *s;
+     }
+ }
+ 
++int
+ main(argc, argv)
++int argc;
+ char **argv;
+ {
+     int i, DoDeliver=0, SplitSize=DEFAULT_SPLIT_SIZE, dum, InNewline=1, bytesread, whichpart=1, Verbose=0, numparts = -1, c;
+@@ -194,7 +208,7 @@ char **argv;
        s = endofheader(from);  /* would be index(from, '\n'),
                                 but need to check for continuation lines */
          *s = '\0';
@@ -51,11 +71,20 @@ $NetBSD: patch-ae,v 1.6 2012/12/30 05:38
            strcat(SharedHeaders, from);
            strcat(SharedHeaders, "\n");
        }
-@@ -339,9 +344,10 @@ static char *SharedHeads[] = {
+@@ -238,6 +252,7 @@ char **argv;
+     return(0);
+ }
+ 
++void
+ HandleOnePart(DoDeliver, deliverycmd, prefix, numparts, whichpart, SharedHeaders, SubjectBuf, id, MessageID, bigbuf, OrigID)
+ int DoDeliver, numparts, whichpart;
+ char *deliverycmd, *prefix, *SharedHeaders, *SubjectBuf, *id, *MessageID, *bigbuf, *OrigID;
+@@ -339,9 +354,11 @@ static char *SharedHeads[] = {
      NULL
  };
  
 -ShareThisHeader(s, SubjectBuf, OrigID)
++int
 +ShareThisHeader(s, SubjectBuf, size, OrigID)
  char *s;
  char *SubjectBuf;
@@ -63,7 +92,7 @@ $NetBSD: patch-ae,v 1.6 2012/12/30 05:38
  char **OrigID;
  {
      int i;
-@@ -361,7 +367,8 @@ char **OrigID;
+@@ -361,7 +378,8 @@ char **OrigID;
      }
      if (!ULstrcmp(s, "subject")) {
          *colon = ':';
@@ -73,3 +102,11 @@ $NetBSD: patch-ae,v 1.6 2012/12/30 05:38
          return(0);
      }
      if (!ULstrcmp(s, "content-type")) {
+@@ -379,6 +397,7 @@ char **OrigID;
+ 
+ static char *tspecials = "()<>@,;:\\\"/[]?.=";
+ 
++int
+ IllegalContentType(ctype)
+ char *ctype;
+ {

Index: pkgsrc/mail/metamail/patches/patch-af
diff -u pkgsrc/mail/metamail/patches/patch-af:1.5 pkgsrc/mail/metamail/patches/patch-af:1.6
--- pkgsrc/mail/metamail/patches/patch-af:1.5   Sun Dec 30 05:38:55 2012
+++ pkgsrc/mail/metamail/patches/patch-af       Sun Oct 12 00:57:39 2025
@@ -1,4 +1,4 @@
-$NetBSD: patch-af,v 1.5 2012/12/30 05:38:55 dholland Exp $
+$NetBSD: patch-af,v 1.6 2025/10/12 00:57:39 mrg Exp $
 
 - use required standard headers
 - don't provide own declarations of standard functions
@@ -6,10 +6,11 @@ $NetBSD: patch-af,v 1.5 2012/12/30 05:38
 - use C89
 - don't use gets()
 - ...? (XXX)
+- Add various missing prototypes, etc, for GCC 14.
 
---- metamail/mailto.c.orig     1994-02-09 20:30:26.000000000 +0000
-+++ metamail/mailto.c
-@@ -36,7 +36,9 @@ STILL NEED TO DO/SUPPORT:
+--- metamail/mailto.c.orig     1994-02-09 12:30:26.000000000 -0800
++++ metamail/mailto.c  2025-10-11 17:19:50.131558639 -0700
+@@ -36,11 +36,16 @@ STILL NEED TO DO/SUPPORT:
  -- Replace EditString with something that does the right thing in-line.
  */
  
@@ -19,7 +20,14 @@ $NetBSD: patch-af,v 1.5 2012/12/30 05:38
  #include <ctype.h>
  #include <config.h>
  #include <pwd.h>
-@@ -50,8 +52,6 @@ STILL NEED TO DO/SUPPORT:
+ #include <signal.h>
++#include <unistd.h>
++#include <termcap.h>
++#include <ctype.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/file.h>
+@@ -50,8 +55,6 @@ STILL NEED TO DO/SUPPORT:
  #include <getfiles.h>
  #include <time.h>
  #include <lib_protos.h>
@@ -28,13 +36,45 @@ $NetBSD: patch-af,v 1.5 2012/12/30 05:38
  #endif
  
  #ifdef SYSV
-@@ -60,9 +60,16 @@ extern char *getenv();
+@@ -60,8 +63,47 @@ extern char *getenv();
  #include <unistd.h>
  #endif
  
 -extern char *malloc(), *realloc(), *index(), *getmyname();
++#include "metamail.h"
++
  struct mailpart *CreateNewPart();
- 
++void nomemabort();
++void cleanexit();
++void tfputs();
++void ProcessInitFiles();
++void InitSignals();
++void SwitchToEuropean();
++int ContainsEightBitChar();
++void fputsquoting();
++void WriteCtypeNicely();
++void EmitAddresses();
++void EmitHeader();
++void EmitHeaderWithAliases();
++void PutQP();
++void HandleSetCommand();
++void BuildCommand();
++int WhichEncodingForFile();
++void SetTextFlags();
++int ProcessMailcapFiles();
++int WriteDeadLetter();
++void finalize();
++void TryClosingStyle();
++void TryOpeningStyle();
++void ToggleStyle();
++void EndStyle();
++void StartStyle();
++void TempCloseStyles();
++void ReopenStyles();
++int TranslateInputToEncodedOutput();
++int RestoreCurrentStyles();
++void WriteContentTypeAndEncoding();
++
 +void DeAlias(char *name, FILE *fp, char *hdr);
 +void HeaderFputs(char *s, FILE *fp, char *hdr);
 +void HandleAliasCommand(char *aliasline);
@@ -42,11 +82,60 @@ $NetBSD: patch-af,v 1.5 2012/12/30 05:38
 +void EditCurrentMessage(int UseVisual);
 +void FputsQuotingLT(char *s, FILE *fp, struct mailpart *part, int EightBitMode, int RightToLeftMode);
 +void WriteOutMessage(FILE *fp, char *ToList, char *Subject, char *CCList, struct mailpart *FirstPart);
-+
+ 
  /* The main data structure for the multiple parts of the mail */
  
- struct mailpart {
-@@ -570,6 +577,7 @@ char **argv;
+@@ -138,6 +180,7 @@ int  V_askcc=0, /* To ask about the Cc f
+ int JustificationState = JUST_LEFT;
+ 
+ 
++void
+ EightBitCharHelp() {
+     if (!CharacterSet || !strcmp(CharacterSet, "us-ascii")) {
+         printf("There are no extended characters available for your US-ASCII terminal.\n\n");
+@@ -199,6 +242,7 @@ tmpname() {
+     return(s);
+ }
+ 
++void
+ TildeHelp() {
+     char *pager = getenv("PAGER");
+     char TmpName[100], CmdBuf[150];
+@@ -298,6 +342,7 @@ char *gethome() {
+ static char standoutbuf[50], standendbuf[50], StartUnderline[50], StopUnderline[50], BoldOn[50], BoldOff[50], KS[50], KE[50];
+ static int termcolumns, termrows;
+ 
++void
+ InitTerminal() {
+ #ifdef AMIGA
+     strcpy(standoutbuf, "\x9b\x37m");   /* Enter standout (highlighted) mode */
+@@ -350,6 +395,7 @@ InitTerminal() {
+ #endif
+ }
+ 
++void
+ FinalizeTerminal() {
+     tfputs(standendbuf);
+     tfputs(BoldOff);
+@@ -375,6 +421,7 @@ NewPart() {
+     return(p);
+ }
+ 
++void
+ nomemabort() {
+     fprintf(stderr, "mailto: Out of memory\n");
+     cleanexit(-1);
+@@ -484,7 +531,9 @@ int definitelynew;
+     return(List);
+ }
+ 
++void
+ main(argc, argv)
++int argc;
+ char **argv;
+ {
+     char *sdum, *LineBuf, CmdBuf[100];
+@@ -570,6 +619,7 @@ char **argv;
          if (isupper(*sdum)) *sdum = tolower(*sdum);
      }
      if (strcmp(CharacterSet, "us-ascii")
@@ -54,7 +143,7 @@ $NetBSD: patch-af,v 1.5 2012/12/30 05:38
           && strncmp(CharacterSet, "iso-8859-", 9)) {
          fprintf(stderr, "mailto:  Unsupported character set: %s\n", CharacterSet);
          exit(-1);
-@@ -1042,10 +1050,7 @@ char *newid() {
+@@ -1042,10 +1092,7 @@ char *newid() {
      return(idbuf);
  }
  
@@ -66,7 +155,15 @@ $NetBSD: patch-af,v 1.5 2012/12/30 05:38
  {
      FILE *fpin;
      static int ctr = 0;
-@@ -1130,6 +1135,7 @@ struct mailpart *part;
+@@ -1121,6 +1168,7 @@ struct mailpart *FirstPart;
+     }
+ }
+ 
++void
+ WriteContentTypeAndEncoding(fp, part)
+ FILE *fp;
+ struct mailpart *part;
+@@ -1130,6 +1178,7 @@ struct mailpart *part;
          if (part->isrich) {
              if (strcmp(CharacterSet, "us-ascii")
                   && (strncmp(CharacterSet, "iso-8859-", 9) 
@@ -74,7 +171,7 @@ $NetBSD: patch-af,v 1.5 2012/12/30 05:38
                        || part->encoding_type_needed != ENC_NONE)) {
                  fprintf(fp, "Content-type: text/richtext; charset=\"%s\"\n", CharacterSet);
              } else {
-@@ -1140,6 +1146,7 @@ struct mailpart *part;
+@@ -1140,6 +1189,7 @@ struct mailpart *part;
              WriteCtypeNicely(fp, part->content_type);
              if (strcmp(CharacterSet, "us-ascii")
                   && (strncmp(CharacterSet, "iso-8859-", 9) 
@@ -82,7 +179,93 @@ $NetBSD: patch-af,v 1.5 2012/12/30 05:38
                        || part->encoding_type_needed != ENC_NONE)) {
                  fprintf(fp, "; charset=\"%s\"\n", CharacterSet);
              } else fputs("\n", fp);
-@@ -1328,11 +1335,7 @@ struct mailpart *part;
+@@ -1160,6 +1210,7 @@ struct mailpart *part;
+     }
+ }
+ 
++int
+ TranslateInputToEncodedOutput(InputFP, OutputFP, Ecode, ctype)
+ FILE *InputFP, *OutputFP;
+ int Ecode;
+@@ -1192,6 +1243,7 @@ static char *EnvStartStack[MAX_STACK_SIZ
+    kept open across an inserted object -- i.e. the richtext is split into 
+    two parts of a multipart message */
+ 
++void
+ TempCloseStyles(fp)
+ FILE *fp;
+ {
+@@ -1205,6 +1257,7 @@ FILE *fp;
+     fflush(stdout);
+ }
+ 
++int
+ RestoreCurrentStyles() {
+     int i=0;
+     while (i<StackSize) {
+@@ -1215,6 +1268,7 @@ RestoreCurrentStyles() {
+     }
+ }
+ 
++void
+ ReopenStyles(fp, part)
+ FILE *fp;
+ struct mailpart *part;
+@@ -1227,11 +1281,13 @@ struct mailpart *part;
+     }
+ }
+ 
++void
+ richtextreset()
+ {
+     StackSize = 0;
+ }
+ 
++int
+ AlreadyInStyle(s)
+ char *s;
+ {
+@@ -1242,6 +1298,7 @@ char *s;
+     return(0);
+ }
+ 
++void
+ StartStyle(fp, s, envstartstr)
+ FILE *fp;
+ char *s;
+@@ -1258,6 +1315,7 @@ char *envstartstr;
+     if (!V_quiet) printf("Beginning: %s\n", t);
+ }
+ 
++void
+ EndStyle(fp, s)
+ FILE *fp;
+ char *s;
+@@ -1282,6 +1340,7 @@ char *s;
+     if (!V_quiet) printf("Ending: %s\n", s);
+ }
+ 
++void
+ ToggleStyle(name, fp, part, turnonstr, turnoffstr)
+ char *name;
+ FILE *fp;
+@@ -1301,6 +1360,7 @@ char *turnonstr, *turnoffstr;
+     }
+ }
+ 
++void
+ TryOpeningStyle(name, fp, part, envstartstr)
+ char *name;
+ FILE *fp;
+@@ -1315,6 +1375,7 @@ char *envstartstr;
+     }
+ }
+ 
++void
+ TryClosingStyle(name, fp, part)
+ char *name;
+ FILE *fp;
+@@ -1328,11 +1389,7 @@ struct mailpart *part;
      }
  }
  
@@ -95,7 +278,47 @@ $NetBSD: patch-af,v 1.5 2012/12/30 05:38
  {
      static int InNewLineSequence=1;
      int c=0;
-@@ -1745,6 +1748,7 @@ CreateNewPart() {
+@@ -1393,6 +1450,7 @@ int EightBitMode, RightToLeftMode;
+     }
+ }
+ 
++void
+ cleanexit(code)
+ int code;
+ {
+@@ -1400,6 +1458,7 @@ int code;
+     exit(code);
+ }
+ 
++void
+ finalize() {
+     while (FirstPart) {
+         unlink(FirstPart->filename);
+@@ -1436,6 +1495,7 @@ int signum;
+ #endif
+ }
+ 
++void
+ InitSignals() {
+     signal(SIGINT, cleanup);
+ #ifndef AMIGA
+@@ -1456,6 +1516,7 @@ InitSignals() {
+ #endif
+ }
+ 
++int
+ WriteDeadLetter()
+ {
+     FILE *fp;
+@@ -1662,6 +1723,7 @@ FILE *fp;
+     return(mc);
+ }
+ 
++int
+ ProcessMailcapFiles() 
+ {
+     char *s, *path = getenv("MAILCAPS"), *origpath;
+@@ -1745,6 +1807,7 @@ CreateNewPart() {
      }
      printf("\n\nEnter your choice as a number from 0 to %d: ", i);
      fflush(stdout);
@@ -103,7 +326,7 @@ $NetBSD: patch-af,v 1.5 2012/12/30 05:38
      fgets(LineBuf, sizeof(LineBuf), stdin);
      ans = atoi(LineBuf);
      if (ans == 0 || ans == 1) {
-@@ -1791,7 +1795,7 @@ CreateNewPart() {
+@@ -1791,7 +1854,7 @@ CreateNewPart() {
                  int ct;
                  printf("\nEnter the MIME Content-type value for the data from file %s\n    (type '?' for a list of locally-valid content-types): ", sdum);
                  fflush(stdout);
@@ -112,7 +335,7 @@ $NetBSD: patch-af,v 1.5 2012/12/30 05:38
                  if (index(LineBuf, '/')) {
                      char lc[100], *s, AnsBuf[100];
                      strcpy(lc, LineBuf);
-@@ -1809,7 +1813,7 @@ CreateNewPart() {
+@@ -1809,7 +1872,7 @@ CreateNewPart() {
                      }
                      if (mc) break;
                      printf("The MIME content-type '%s' is not listed in your local mailcap files,\nand may not be a valid MIME type.  Do you want to use it anyway [no] ? ", LineBuf);
@@ -121,7 +344,39 @@ $NetBSD: patch-af,v 1.5 2012/12/30 05:38
                      while (s && *s && isspace((unsigned char) *s)) ++s;
                      if (s && (*s == 'y' || *s == 'Y')) break;
                      continue;
-@@ -2073,8 +2077,7 @@ char *ctype, *pat;
+@@ -1967,6 +2030,7 @@ CreateNewPart() {
+     return(mp);
+ }
+ 
++void
+ SetTextFlags(mp)
+ struct mailpart *mp;
+ {
+@@ -1978,6 +2042,7 @@ struct mailpart *mp;
+     }
+ }
+ 
++int
+ WhichEncodingForFile(fname, ctype)
+ char *fname, *ctype;
+ {
+@@ -2014,6 +2079,7 @@ char *fname, *ctype;
+     return(ENC_NONE);
+ }
+ 
++void
+ BuildCommand(Buf, controlstring, TmpFileName)
+ char *Buf, *controlstring, *TmpFileName;
+ {
+@@ -2052,6 +2118,7 @@ char *Buf, *controlstring, *TmpFileName;
+     }
+ }
+ 
++int
+ CtypeMatch(ctype, pat)
+ char *ctype, *pat;
+ {
+@@ -2073,8 +2140,7 @@ char *ctype, *pat;
      return(0);
  }
  
@@ -131,7 +386,15 @@ $NetBSD: patch-af,v 1.5 2012/12/30 05:38
  {
      char *editor = NULL;
      char *CmdBuf, *CmdBuf2, LineBuf[100];
-@@ -2212,9 +2215,7 @@ int IsAndrew;
+@@ -2162,6 +2228,7 @@ int UseVisual;
+ }
+ 
+ 
++void
+ ProcessInitFiles() {
+ #ifdef AMIGA
+     ProcessOneMailRC(mailRC, 0);
+@@ -2212,9 +2279,7 @@ int IsAndrew;
      }
  }
  
@@ -142,7 +405,15 @@ $NetBSD: patch-af,v 1.5 2012/12/30 05:38
  {
      FILE *fp;
      char *LineBuf = NULL, *sdum;
-@@ -2290,8 +2291,7 @@ struct alias {
+@@ -2246,6 +2311,7 @@ int IsAndrew;
+     fclose(fp);
+ }
+ 
++void
+ HandleSetCommand(cmd, DoSet)
+ char *cmd;
+ int DoSet;
+@@ -2290,8 +2356,7 @@ struct alias {
      struct alias *next;
  } *FirstAlias = NULL;
  
@@ -152,7 +423,15 @@ $NetBSD: patch-af,v 1.5 2012/12/30 05:38
  {
      struct alias *tmpalias;
      char *s, *s2;
-@@ -2357,10 +2357,7 @@ char *s;
+@@ -2319,6 +2384,7 @@ char *aliasline;
+     FirstAlias = tmpalias;
+ }
+ 
++void
+ EmitHeader(fp, hdr, body)
+ FILE *fp;
+ char *hdr;
+@@ -2357,10 +2423,7 @@ char *s;
      return(NULL);
  }
  
@@ -164,7 +443,31 @@ $NetBSD: patch-af,v 1.5 2012/12/30 05:38
  {
      char *firstnonascii, *firstascii;
  
-@@ -2436,10 +2433,7 @@ char *hdr;
+@@ -2398,6 +2461,7 @@ char *hdr;
+ 
+ static char basis_hex[] = "0123456789ABCDEF";
+ 
++void
+ PutQP(c, fp)
+ unsigned char c;
+ FILE *fp;
+@@ -2407,6 +2471,7 @@ FILE *fp;
+     putc(basis_hex[c&0xF], fp);
+ }
+ 
++void
+ EmitHeaderWithAliases(fp, hdr, names)
+ FILE *fp;
+ char *hdr;
+@@ -2418,6 +2483,7 @@ char *names;
+     fputs("\n", fp);
+ }
+ 
++void
+ EmitAddresses(fp, names, hdr)
+ FILE *fp;
+ char *names;
+@@ -2436,10 +2502,7 @@ char *hdr;
      }
  }
  
@@ -176,3 +479,56 @@ $NetBSD: patch-af,v 1.5 2012/12/30 05:38
  {
      struct alias *tmpalias;
      char *end, savechar;
+@@ -2462,6 +2525,7 @@ char *hdr;
+ }
+ 
+ 
++void
+ WriteCtypeNicely(fp, ct)
+ FILE *fp;
+ char *ct;
+@@ -2497,6 +2561,7 @@ char *ct;
+     }
+ }
+ 
++void
+ fputsquoting(s, fp)
+ char *s;
+ FILE *fp;
+@@ -2566,10 +2631,12 @@ char *cmd;
+ }
+ #endif
+ 
++int
+ controlputc(c)
+-char c;
++int c;
+ {
+     fputc(c, stdout);
++    return (0);
+ }
+ 
+ /* Do the equivalent of an fputs for the terminal escape stuff */
+@@ -2581,12 +2648,14 @@ char *s;
+     return (0);
+ }
+ #else
++void
+ tfputs(s)
+ char *s;
+ {
+     tputs(s, 1, controlputc);
+ }
+ #endif
++int
+ ContainsEightBitChar(fname)
+ char *fname;
+ {
+@@ -2607,6 +2676,7 @@ char *fname;
+     return(eightBitSeen);
+ }
+ 
++void
+ SwitchToEuropean() {
+     printf("WARNING:  You have entered 8-bit characters in what is supposed to be\n");
+     printf("plain ASCII text.  If you are using a non-ASCII character set, you should\n");

Index: pkgsrc/mail/metamail/patches/patch-ai
diff -u pkgsrc/mail/metamail/patches/patch-ai:1.4 pkgsrc/mail/metamail/patches/patch-ai:1.5
--- pkgsrc/mail/metamail/patches/patch-ai:1.4   Sun Nov  8 20:51:59 2015
+++ pkgsrc/mail/metamail/patches/patch-ai       Sun Oct 12 00:57:39 2025
@@ -1,4 +1,4 @@
-$NetBSD: patch-ai,v 1.4 2015/11/08 20:51:59 dholland Exp $
+$NetBSD: patch-ai,v 1.5 2025/10/12 00:57:39 mrg Exp $
 
 - clean up junk decls that exist in headers, and include the right headers
 - use fgets instead of gets
@@ -6,10 +6,20 @@ $NetBSD: patch-ai,v 1.4 2015/11/08 20:51
 - when executing a child metamail, propagate the parents options as much as
   possible
 - use termios instead of termio/sgtty
+- give many things return types and (basic) prototypes for GCC 14.
 
---- metamail/metamail.c.orig   1994-02-17 01:57:19.000000000 +0000
-+++ metamail/metamail.c
-@@ -46,12 +46,8 @@ extern char *mktemp(char *);
+--- metamail/metamail.c.orig   1994-02-16 17:57:19.000000000 -0800
++++ metamail/metamail.c        2025-10-11 16:45:09.001504426 -0700
+@@ -26,6 +26,8 @@ WITHOUT ANY EXPRESS OR IMPLIED WARRANTIE
+ #include <config.h>
+ #include <patchlevel.h>
+ 
++#include "metamail.h"
++
+ #ifdef BORLAND
+ #define F_OK 0
+ extern unsigned _stklen = 16384;
+@@ -46,12 +48,8 @@ extern char *mktemp(char *);
  #include <signal.h>
  
  #ifndef AMIGA
@@ -23,7 +33,7 @@ $NetBSD: patch-ai,v 1.4 2015/11/08 20:51
  #endif /* AMIGA */
  #endif /* MICROSOFT */
  #endif /* BORLAND */
-@@ -83,7 +79,7 @@ extern char *MkRmScript();
+@@ -83,7 +81,7 @@ extern char *MkRmScript();
  #define MAX_FILE_NAME_SIZE 256
  #define WRITE_BINARY  "w"
  #else /* AMIGA */
@@ -32,7 +42,7 @@ $NetBSD: patch-ai,v 1.4 2015/11/08 20:51
  #define CATCOMMAND  "cat"
  #define CATTEMPLATE "cat %s"
  #define METAMAIL    "metamail"
-@@ -100,15 +96,14 @@ extern char **environ, *gets();
+@@ -100,15 +98,49 @@ extern char **environ, *gets();
  #define CMDSIZE 1200 /* Maximum size of command to execute */
  
  #define LINE_BUF_SIZE       2000
@@ -50,11 +60,46 @@ $NetBSD: patch-ai,v 1.4 2015/11/08 20:51
  
 +void PauseForUser(void);
 +void maybephead(char *);
++int ProcessArguments(int, char **);
++int ExitWithError(char *);
++void RestoreTtyState();
++int HandleMessage(char *, int);
++int Read822Prefix(int, int);
++int ProcessMailcapFiles(char *);
++int SaveSquirrelFile(char *);
++void PrepareMessage();
++void MkTmpFileName(char *);
++int TryBuiltIns(char *);
++void TranslateInputToOutput();
++void usage();
++void StripTrailingSpace(char *);
++void RunInNewWindow();
++void CreateNewWindowPrefix();
++void SetUpEnvironment();
++int ProcessMailcapFile();
++int TryMailcapEntry();
++int IsDirectory();
++int CtypeMatch();
++int GetMailcapEntry();
++int ExecuteMailcapEntry();
++int OKToRun();
++int ExecuteCommand();
++int PassesTest();
++void BuildCommand();
++int StartRawStdin();
++void strcatquoting();
++int NeedToBeQuiet();
++int NeedToAskBeforeExecuting();
++void SaveTtyState();
++int WriteTmpFile();
++void EliminateNastyChars();
++void strcpynoquotes();
++void phead();
 +
  char *FindParam();
  extern FILE *popen();
  static char *nomem = "Out of memory!";
-@@ -151,6 +146,32 @@ int MightAskBeforeExecuting = 1,
+@@ -151,6 +183,32 @@ int MightAskBeforeExecuting = 1,
      JustWriteFiles = 0,
      ProcessingErrors = 0;
  
@@ -87,7 +132,23 @@ $NetBSD: patch-ai,v 1.4 2015/11/08 20:51
  char *ContentType = NULL,
      *ContentEncoding = NULL,
      *MailerName = "unknown",
-@@ -497,8 +518,9 @@ int nestingdepth;
+@@ -295,6 +353,7 @@ char *auxpath;
+     }
+ }
+ 
++void
+ main(argc, argv)
+ int argc;
+ char **argv;
+@@ -387,6 +446,7 @@ char *fname;
+     }
+ }
+ 
++int
+ HandleMessage(SquirrelFile, nestingdepth)
+ char *SquirrelFile;
+ /* SquirrelFile, if non-NULL, is a place to save a recognized body instead of executing it. */
+@@ -497,8 +557,9 @@ int nestingdepth;
          if (IsAlternative) {
              if (WroteSquirrelFile) {
                  int retcode; 
@@ -99,7 +160,7 @@ $NetBSD: patch-ai,v 1.4 2015/11/08 20:51
                  fflush(stdout); fflush(stderr);
                  retcode = system(Cmd);
  #ifdef MSDOS
-@@ -579,7 +601,7 @@ int nestingdepth;
+@@ -579,7 +640,7 @@ int nestingdepth;
                                  int overwriteans = -1;
                                  do {
                                      printf("File %s exists.  Do you want to overwrite it (y/n) ?\n", Fname);
@@ -108,7 +169,69 @@ $NetBSD: patch-ai,v 1.4 2015/11/08 20:51
                                      if (!s) {
                                          overwriteans = 0;
                                      } else {
-@@ -1202,9 +1224,9 @@ char *SquirrelFile;
+@@ -661,6 +722,7 @@ int nestingdepth;
+     return(-1); /* Unrecognized, really */
+ }
+ 
++int
+ ProcessArguments(argc, argv)
+ int argc;
+ char **argv;
+@@ -940,11 +1002,13 @@ char **argv;
+     return(0);
+ }
+ 
++void
+ usage() {
+     fprintf(stderr, "Usage:  metamail [-b] [-B] [-d] [-e] [-h] [-r] [-R] [-p]  [-P] [-x] [-y] [-z] [-c content-type] [-E content-transfer-encoding] [-f from-name] [-m mailername] [-s subject] 
[message-file-name]\n");
+     ExitWithError(NULL);
+ }
+ 
++void
+ RunInNewWindow(argv, argc, SourceFileNamePtr)
+ char **argv, **SourceFileNamePtr;
+ int argc;
+@@ -1026,6 +1090,7 @@ struct MailcapEntry BuiltInsAlternative[
+     {"text/plain", CATTEMPLATE, NULL, 0, 1, 0, "plain text", LPRTEMPLATE},
+     {NULL, NULL, NULL, 0, 0, 0}};
+ 
++int
+ ProcessMailcapFiles(SquirrelFile) 
+ char *SquirrelFile;
+ {
+@@ -1082,6 +1147,7 @@ char *SquirrelFile;
+ #endif /* MICROSOFT */
+ }
+ 
++int
+ TryBuiltIns(SquirrelFile) 
+ char *SquirrelFile;
+ {
+@@ -1094,6 +1160,7 @@ char *SquirrelFile;
+     return(-1);
+ }
+ 
++int
+ ProcessMailcapFile(file, SquirrelFile)
+ char *file, *SquirrelFile;
+ {
+@@ -1166,6 +1233,7 @@ eatmore:
+     }
+ }    
+ 
++int
+ TryMailcapEntry(mc, SquirrelFile)
+ struct MailcapEntry mc;
+ char *SquirrelFile;
+@@ -1189,6 +1257,7 @@ char *SquirrelFile;
+     return(-1);
+ }
+ 
++int
+ SaveSquirrelFile(SquirrelFile)
+ char *SquirrelFile;
+ {
+@@ -1202,9 +1271,9 @@ char *SquirrelFile;
      fprintf(outfp, "Content-type: %s", ContentType);
      for (j=0; j<CParamsUsed; ++j) {
          fprintf(outfp, " ; ");
@@ -120,7 +243,71 @@ $NetBSD: patch-ai,v 1.4 2015/11/08 20:51
      }
      fprintf(outfp, "\n\n"); 
      TranslateInputToOutput(InputFP, outfp, EncodingCode, ContentType);
-@@ -1823,7 +1845,7 @@ char *ctype, *progname, *label;
+@@ -1214,6 +1283,7 @@ char *SquirrelFile;
+     return(0);
+ }
+ 
++int
+ ExecuteMailcapEntry(mc, TmpFileName, ThisContentType)
+ char *TmpFileName, *ThisContentType;
+ struct MailcapEntry mc;
+@@ -1361,6 +1431,7 @@ struct MailcapEntry mc;
+     return(0);
+ }
+ 
++int
+ PassesTest(mc)
+ struct MailcapEntry *mc;
+ {
+@@ -1414,6 +1485,7 @@ char *s, **t;
+     return(NULL);
+ }     
+ 
++int
+ GetMailcapEntry(fp, mc)
+ FILE *fp;
+ struct MailcapEntry *mc;
+@@ -1507,6 +1579,7 @@ struct MailcapEntry *mc;
+     return(1);
+ }
+ 
++int
+ ExitWithError(txt)
+ char *txt;
+ {
+@@ -1534,6 +1607,7 @@ char *s;
+     return(newcopy);
+ }
+ 
++int
+ Read822Prefix(PrintHeads, nestingdepth)
+ int PrintHeads, nestingdepth;
+ {
+@@ -1654,6 +1728,7 @@ yankagain:
+     return 0;
+ }
+ 
++void
+ PrepareMessage() {
+     int c;
+ 
+@@ -1688,6 +1763,7 @@ PrepareMessage() {
+     SetUpEnvironment();  
+ }
+ 
++void
+ SetUpEnvironment() { 
+     int i, j, environsize;
+     char **newenviron, *mailervar, *summaryvar, *ctypevar, *s;
+@@ -1809,6 +1885,7 @@ char *def;
+ }
+ #endif
+ 
++int
+ OKToRun(ctype, progname, label)
+ char *ctype, *progname, *label;
+ {
+@@ -1823,7 +1900,7 @@ char *ctype, *progname, *label;
          } else {
              printf("This message contains '%s'-format data.\nDo you want to view it using the '%s' command (y/n) [y] ? ", ctype, ShortCommand(progname));
          }
@@ -129,7 +316,23 @@ $NetBSD: patch-ai,v 1.4 2015/11/08 20:51
          if (!s) return(0); /* EOF */
        while (s && *s && isspace((unsigned char) *s)) ++s;
        if (*s == 'y' || *s == 'Y' || !*s || *s == '\n') return(1);
-@@ -1900,7 +1922,7 @@ char *hdr;
+@@ -1834,6 +1911,7 @@ char *ctype, *progname, *label;
+     }
+ }
+ 
++void
+ EliminateNastyChars(s)
+ char *s;
+ {
+@@ -1848,6 +1926,7 @@ char *s;
+     }
+ }
+ 
++void
+ StripTrailingSpace(s)
+ char *s;
+ {
+@@ -1900,7 +1979,7 @@ char *hdr;
  }
  
  /* check the header given to see if it matches any in the KeyHeadList */
@@ -138,7 +341,15 @@ $NetBSD: patch-ai,v 1.4 2015/11/08 20:51
  char *hdr;
  {
      char *s;
-@@ -2022,7 +2044,8 @@ int ShowLeadingWhitespace;
+@@ -1934,6 +2013,7 @@ char *hdr;
+ }
+ 
+ /* This next routine prints out a mail header, and needs to deal with the new extended charset headers. */
++void
+ phead(s)
+ char *s;
+ {
+@@ -2022,7 +2102,8 @@ int ShowLeadingWhitespace;
      if (lc2strcmp(charset, PrevCharset)) {
          char *s2, *charsetinuse;
  
@@ -148,7 +359,7 @@ $NetBSD: patch-ai,v 1.4 2015/11/08 20:51
          for (s2=PrevCharset; *s2; ++s2) {
              if (isupper((unsigned char) *s2)) *s2 = tolower((unsigned char) *s2);
          }
-@@ -2032,7 +2055,7 @@ int ShowLeadingWhitespace;
+@@ -2032,7 +2113,7 @@ int ShowLeadingWhitespace;
          }
      }
      if (ecode == ENCODING_NONE) {
@@ -157,7 +368,47 @@ $NetBSD: patch-ai,v 1.4 2015/11/08 20:51
      } else {
          /* What follows is REALLY bogus, but all my encoding stuff is pipe-oriented right now... */
          MkTmpFileName(TmpFile);
-@@ -2375,41 +2398,25 @@ char *Prefix;
+@@ -2067,6 +2148,7 @@ int ShowLeadingWhitespace;
+     PrintHeader(txtend + 2, 0);
+ }
+ 
++void
+ BuildCommand(Buf, controlstring, TmpFileName, UsedTmpFileName, PartsWritten)
+ char *Buf, *controlstring, *TmpFileName;
+ int *UsedTmpFileName;
+@@ -2279,6 +2361,7 @@ struct part **PartsWritten;
+     *to = 0;
+ }
+ 
++void
+ strcpynoquotes(t,f)
+ char *t, *f;
+ {
+@@ -2290,6 +2373,7 @@ char *t, *f;
+     }
+ }
+ 
++int
+ WriteTmpFile(fname, ctype)
+ char *fname;
+ char *ctype;
+@@ -2309,6 +2393,7 @@ char *ctype;
+ }
+ 
+ 
++void
+ TranslateInputToOutput(InputFP, OutputFP, Ecode, ctype)
+ FILE *InputFP, *OutputFP;
+ int Ecode;
+@@ -2336,6 +2421,7 @@ char *ctype;
+ #endif
+ }
+ 
++void
+ CreateNewWindowPrefix(Prefix)
+ char *Prefix;
+ {
+@@ -2375,43 +2461,30 @@ char *Prefix;
  
  int HasSavedTtyState=0;
  #if !defined(AMIGA) && !defined(MSDOS)
@@ -169,6 +420,7 @@ $NetBSD: patch-ai,v 1.4 2015/11/08 20:51
 +static struct termios MyTtyStateIn, MyTtyStateOut;
  #endif
  
++void
  SaveTtyState() {
      /* Bogus -- would like a good portable way to reset the terminal state here */
  #if !defined(AMIGA) && !defined(MSDOS)
@@ -185,26 +437,70 @@ $NetBSD: patch-ai,v 1.4 2015/11/08 20:51
  #endif
  }
  
++void
  RestoreTtyState() {
  #if !defined(AMIGA) && !defined(MSDOS)
 -#ifdef SYSV
--    if (HasSavedTtyState) {
+     if (HasSavedTtyState) {
 -        ioctl(fileno(stdout), TCSETA, &MyTtyStateOut);
 -        ioctl(fileno(stdin), TCSETA, &MyTtyStateIn);
--    }
--#else
-     if (HasSavedTtyState) {
--        stty(fileno(stdout), &MyTtyStateOut);
--        stty(fileno(stdin), &MyTtyStateIn);
 +        tcsetattr(fileno(stdout), TCSANOW, &MyTtyStateOut);
 +        tcsetattr(fileno(stdin), TCSANOW, &MyTtyStateIn);
      }
- #endif
+-#else
+-    if (HasSavedTtyState) {
+-        stty(fileno(stdout), &MyTtyStateOut);
+-        stty(fileno(stdin), &MyTtyStateIn);
+-    }
 -#endif
+ #endif
  }
  
++int
  NeedToAskBeforeExecuting(type)
-@@ -2655,12 +2662,12 @@ char *s2;
+ char *type;
+ {
+@@ -2423,6 +2496,7 @@ char *type;
+     return(1);
+ }
+ 
++int
+ NeedToBeQuiet(cmd)
+ char *cmd;
+ {
+@@ -2433,6 +2507,7 @@ char *cmd;
+     return(0);
+ }
+ 
++int
+ CtypeMatch(ctype, pat)
+ char *ctype, *pat;
+ {
+@@ -2459,6 +2534,7 @@ char *ctype, *pat;
+     return(0);
+ }
+ 
++int
+ ExecuteCommand(cmd, really)
+ char *cmd;
+ int really;
+@@ -2484,6 +2560,7 @@ int really;
+     return(0);
+ }
+ 
++void
+ MkTmpFileName(name)
+ char *name;
+ {
+@@ -2640,6 +2717,7 @@ char *s;
+ }
+ #endif
+ 
++void
+ strcatquoting(s1, s2)
+ char *s1;
+ char *s2;
+@@ -2655,12 +2733,12 @@ char *s2;
  #endif
  }
  
@@ -219,8 +515,11 @@ $NetBSD: patch-ai,v 1.4 2015/11/08 20:51
  #if defined(MSDOS) || defined(AMIGA)
      printf("Press RETURN to go on\n");
      gets(Buf);
-@@ -2681,21 +2688,14 @@ PauseForUser() {
+@@ -2679,23 +2757,17 @@ PauseForUser() {
+ #endif
+ }
  
++int
  StartRawStdin() {
  #if !defined(AMIGA) && !defined(MSDOS)
 -#ifdef SYSV

Index: pkgsrc/mail/metamail/patches/patch-ar
diff -u pkgsrc/mail/metamail/patches/patch-ar:1.2 pkgsrc/mail/metamail/patches/patch-ar:1.3
--- pkgsrc/mail/metamail/patches/patch-ar:1.2   Fri Oct 26 20:27:15 2012
+++ pkgsrc/mail/metamail/patches/patch-ar       Sun Oct 12 00:57:39 2025
@@ -1,8 +1,8 @@
-$NetBSD: patch-ar,v 1.2 2012/10/26 20:27:15 joerg Exp $
+$NetBSD: patch-ar,v 1.3 2025/10/12 00:57:39 mrg Exp $
 
---- richmail/richtext.c.orig   1994-02-09 16:31:18.000000000 +0000
-+++ richmail/richtext.c
-@@ -13,18 +13,16 @@ OF THIS MATERIAL FOR ANY PURPOSE.  IT IS
+--- richmail/richtext.c.orig   1994-02-09 08:31:18.000000000 -0800
++++ richmail/richtext.c        2025-10-11 17:38:16.071403518 -0700
+@@ -13,18 +13,18 @@ OF THIS MATERIAL FOR ANY PURPOSE.  IT IS
  WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
  */
  
@@ -12,6 +12,8 @@ $NetBSD: patch-ar,v 1.2 2012/10/26 20:27
  #include <signal.h>
 +#include <stdlib.h>
 +#include <string.h>
++#include <unistd.h>
++#include <termcap.h>
  #include "richlex.h"
  #include "richset.h"
  #include <config.h>
@@ -24,22 +26,143 @@ $NetBSD: patch-ar,v 1.2 2012/10/26 20:27
  #ifdef MSDOS
  unsigned _stklen=16384;       /* Increase stack size under MS-DOS */
  #endif
-@@ -79,7 +77,13 @@ static int FakeTerminal;
+@@ -79,7 +79,15 @@ static int FakeTerminal;
  extern tputs();
  #endif
  
 -static outputc(), realoutputc(), MakeWorkingMargins(), Pause(), fputsmovingright(), ResetTerminalCodes(), FinalizeTerminal(), outputstr(), FPUTS();
 +static int lc2strcmp(char *s1, char *s2);
 +
-+static outputc(), realoutputc(), MakeWorkingMargins(), Pause(), FinalizeTerminal(), outputstr(), FPUTS();
++static void outputc(), realoutputc(), MakeWorkingMargins(), Pause(), FinalizeTerminal(), outputstr(), FPUTS();
 +static void fputsmovingright(struct charsetmember *s, FILE *fp);
 +static void ResetTerminalCodes(int FakeTerminal, int standout, int underline, int bold, char *standoutbuf, char *standendbuf,
 +                    int modifiedstandout, char *StartUnderline, char *StopUnderline, int modifiedunderline,
 +                    char *BoldOn, char *BoldOff, int modifiedbold);
++int richtext_main();
++int controloutput();
  
  #define       OUTC(c)         (outputc((RCHAR)(c)))
  
-@@ -905,9 +909,7 @@ static Pause()
+@@ -125,7 +133,7 @@ int signum;
+ #endif
+ }
+ 
+-static InitSignals() {
++static int InitSignals() {
+     signal(SIGINT, cleanup);
+ #if !defined(AMIGA)
+ #if !defined(MSDOS)
+@@ -146,7 +154,7 @@ static InitSignals() {
+ #endif
+ }
+ 
+-static nomemabort() {
++static int nomemabort() {
+     fprintf(stderr, "richtext: Out of memory\n");
+     FinalizeTerminal();
+ #ifdef AMIGA
+@@ -163,6 +171,7 @@ static nomemabort() {
+  * library call.
+  */
+ 
++int
+ main(argc, argv)
+ int argc;
+ char **argv;
+@@ -172,6 +181,7 @@ char **argv;
+ 
+ #endif
+ 
++int
+ richtext_main(argc, argv)
+ int argc;
+ char **argv;
+@@ -659,6 +669,7 @@ char **argv;
+ static struct charsetmember OutputBuf[1000] = {0,0};
+ static int PendingOutput = 0, PendingControls = 0;
+ 
++int
+ controlputc(c)
+ int c;
+ {
+@@ -667,12 +678,13 @@ int c;
+     ++PendingControls;
+ }
+ 
+-static immediate_controlputc(c)
++static int immediate_controlputc(c)
+ int c;
+ {
+     (*RichtextPutc) (c, stdout);
+ }
+ 
++int
+ controloutput(s, immediate)
+ char *s;
+ int immediate;
+@@ -680,7 +692,7 @@ int immediate;
+     tputs(s, 1, immediate ? immediate_controlputc : controlputc);
+ }
+ 
+-static folding_point (buf, pos)
++static int folding_point (buf, pos)
+ struct        charsetmember *buf;
+ int   pos;
+ {
+@@ -692,7 +704,7 @@ int        pos;
+     return (0);
+ }
+ 
+-static calc_column (buf, pos)
++static int calc_column (buf, pos)
+ struct        charsetmember *buf;
+ int   pos;
+ {
+@@ -707,7 +719,7 @@ int        pos;
+     return (col);
+ }
+ 
+-static FlushOut() {
++static void FlushOut() {
+     int i, j, x;
+     static struct charsetmember NewOutputBuf[1000];
+     struct charsetmember *s;
+@@ -797,7 +809,7 @@ static FlushOut() {
+                         StopUnderline, 0, BoldOn, BoldOff, 0);
+ }
+ 
+-static outputc(c)
++static void outputc(c)
+ RCHAR c;
+ {
+     struct charsetmember member;
+@@ -805,6 +817,7 @@ RCHAR c;
+     realoutputc(member, 0);
+ }
+ 
++void
+ static realoutputc(c, alreadyformatted)
+ struct charsetmember c;
+ int alreadyformatted;
+@@ -877,7 +890,7 @@ int alreadyformatted;
+     }
+ }
+ 
+-static MakeWorkingMargins() {
++static void MakeWorkingMargins() {
+     int oldworkingleft=workingleft, i;
+ 
+     workingleft = leftmargin;
+@@ -891,7 +904,7 @@ static MakeWorkingMargins() {
+     }
+ }
+ 
+-static Pause()
++static void Pause()
+ {
+     int       c;
+ 
+@@ -905,9 +918,7 @@ static Pause()
  /* Leading spaces should be output as MoveRight, to avoid 
     having margins that are underlined or reverse video */
  
@@ -50,7 +173,7 @@ $NetBSD: patch-ar,v 1.2 2012/10/26 20:27
  {
      int inmargin=1;
      if (!s) return;
-@@ -925,11 +927,9 @@ FILE *fp;
+@@ -925,11 +936,9 @@ FILE *fp;
      }
  }
  
@@ -65,7 +188,32 @@ $NetBSD: patch-ar,v 1.2 2012/10/26 20:27
  {
      if (OverStrike)
        return;
-@@ -989,7 +989,7 @@ FILE *fp;
+@@ -953,14 +962,14 @@ char *standoutbuf, *standendbuf, *StartU
+     }
+ }
+ 
+-static FinalizeTerminal() {
++static void FinalizeTerminal() {
+     tputs(standendbuf, 1, immediate_controlputc);
+     tputs(BoldOff, 1, immediate_controlputc);
+     tputs(StopUnderline, 1, immediate_controlputc);
+     FPUTS(KE, stdout);
+ }
+ 
+-static outputstr(s)
++static void outputstr(s)
+ char *s;
+ {
+     while (*s) OUTC(*s++);
+@@ -982,14 +991,14 @@ int (*func)();
+ }
+ #endif
+ 
+-static FPUTS(s,fp)
++static void FPUTS(s,fp)
+ unsigned char *s;
+ FILE *fp;
+ {
      while(*s) (*RichtextPutc)((int)(*s++),fp);
  }
  
@@ -74,3 +222,12 @@ $NetBSD: patch-ar,v 1.2 2012/10/26 20:27
  char *s1, *s2;
  {
      if (!s1 || !s2) return (-1);
+@@ -1000,7 +1009,7 @@ char *s1, *s2;
+     return((*s1 == *s2) ? 0 : -1);
+ }
+ 
+-static lc2strncmp(s1, s2, len)
++static int lc2strncmp(s1, s2, len)
+ char *s1, *s2;
+ int len;
+ {

Index: pkgsrc/mail/metamail/patches/patch-at
diff -u pkgsrc/mail/metamail/patches/patch-at:1.3 pkgsrc/mail/metamail/patches/patch-at:1.4
--- pkgsrc/mail/metamail/patches/patch-at:1.3   Fri Oct 26 20:27:15 2012
+++ pkgsrc/mail/metamail/patches/patch-at       Sun Oct 12 00:57:39 2025
@@ -1,17 +1,40 @@
-$NetBSD: patch-at,v 1.3 2012/10/26 20:27:15 joerg Exp $
+$NetBSD: patch-at,v 1.4 2025/10/12 00:57:39 mrg Exp $
 
---- metamail/uue.c.orig        1993-07-28 18:31:02.000000000 +0000
-+++ metamail/uue.c
-@@ -30,7 +30,7 @@ FILE *outfp;
+- Avoid modern getline().
+- Add types for GCC 14.
+
+--- metamail/uue.c.orig        1993-07-28 11:31:02.000000000 -0700
++++ metamail/uue.c     2025-10-11 16:50:50.935538991 -0700
+@@ -1,13 +1,18 @@
+ #include <stdio.h>
++#include <string.h>
++
++#include "metamail.h"
+ 
+ /*
+  * hack to metamail to decode uuencoded bodyparts
+  * Written by Keith Moore, February 1992
+  */
+ 
++void
+ uueget (ptr, outfp, n)
+ char *ptr;
+ FILE *outfp;
++int n;
+ {
+     unsigned char c1, c2, c3;
+     unsigned char p0, p1, p2, p3;
+@@ -30,7 +35,8 @@ FILE *outfp;
  }
  
  
 -getline (buf, size, fp)
++int
 +uue_getline (buf, size, fp)
  char *buf;
  int size;
  FILE *fp;
-@@ -62,7 +62,7 @@ FILE *fp;
+@@ -62,7 +68,7 @@ FILE *fp;
  }
  
  
@@ -20,7 +43,7 @@ $NetBSD: patch-at,v 1.3 2012/10/26 20:27
  FILE *infp, *outfp;
  char **boundaries;
  int *ctptr;
-@@ -70,7 +70,7 @@ int *ctptr;
+@@ -70,7 +76,7 @@ int *ctptr;
      char buf[63];
  
      while (1) {
@@ -29,7 +52,7 @@ $NetBSD: patch-at,v 1.3 2012/10/26 20:27
            fprintf (stderr, "Premature EOF!\n");
            return;
        }
-@@ -82,7 +82,7 @@ int *ctptr;
+@@ -82,7 +88,7 @@ int *ctptr;
        }
      } 
      while (1) {

Index: pkgsrc/mail/metamail/patches/patch-metamail_codes.c
diff -u pkgsrc/mail/metamail/patches/patch-metamail_codes.c:1.1 pkgsrc/mail/metamail/patches/patch-metamail_codes.c:1.2
--- pkgsrc/mail/metamail/patches/patch-metamail_codes.c:1.1     Fri Oct 26 20:27:15 2012
+++ pkgsrc/mail/metamail/patches/patch-metamail_codes.c Sun Oct 12 00:57:39 2025
@@ -1,8 +1,58 @@
-$NetBSD: patch-metamail_codes.c,v 1.1 2012/10/26 20:27:15 joerg Exp $
+$NetBSD: patch-metamail_codes.c,v 1.2 2025/10/12 00:57:39 mrg Exp $
 
---- metamail/codes.c.orig      2012-10-25 19:39:57.000000000 +0000
-+++ metamail/codes.c
-@@ -174,7 +174,7 @@ int PortableNewlines;
+- Add types for GCC 14.
+
+--- metamail/codes.c.orig      1993-09-20 06:13:22.000000000 -0700
++++ metamail/codes.c   2025-10-11 16:49:48.546329391 -0700
+@@ -14,9 +14,13 @@ WITHOUT ANY EXPRESS OR IMPLIED WARRANTIE
+ */
+ #include <stdio.h>
+ #include <ctype.h>
++#include <string.h>
+ #include <config.h>
+ 
++#include "metamail.h"
++
+ extern char *index();
++void output64chunk();
+ static char basis_64[] =
+    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+ 
+@@ -69,6 +73,7 @@ int PortableNewlines;
+ #endif
+ }
+ 
++void
+ to64(infile, outfile, PortableNewlines) 
+ FILE *infile, *outfile;
+ int PortableNewlines;
+@@ -97,7 +102,9 @@ int PortableNewlines;
+     fflush(outfile);
+ }
+ 
++void
+ output64chunk(c1, c2, c3, pads, outfile)
++int c1, c2, c3, pads;
+ FILE *outfile;
+ {
+     putc(basis_64[c1>>2], outfile);
+@@ -114,6 +121,7 @@ FILE *outfile;
+     }
+ }
+ 
++int
+ PendingBoundary(s, Boundaries, BoundaryCt)
+ char *s;
+ char **Boundaries;
+@@ -140,6 +148,7 @@ int *BoundaryCt;
+ static int CRpending = 0;
+ 
+ #ifdef NEWLINE_CHAR
++void
+ almostputc(c, outfile, PortableNewlines)
+ int c;
+ FILE *outfile;
+@@ -174,7 +183,7 @@ int PortableNewlines;
  }
  #endif
  
@@ -11,7 +61,15 @@ $NetBSD: patch-metamail_codes.c,v 1.1 20
  FILE *infile, *outfile;
  char **boundaries;
  int *boundaryct;
-@@ -350,7 +350,7 @@ FILE *infile, *outfile;
+@@ -275,6 +284,7 @@ char c;
+ }
+ */
+ 
++void
+ toqp(infile, outfile) 
+ FILE *infile, *outfile;
+ {
+@@ -350,7 +360,7 @@ FILE *infile, *outfile;
      }
  }
  
Index: pkgsrc/mail/metamail/patches/patch-metamail_shared.c
diff -u pkgsrc/mail/metamail/patches/patch-metamail_shared.c:1.1 pkgsrc/mail/metamail/patches/patch-metamail_shared.c:1.2
--- pkgsrc/mail/metamail/patches/patch-metamail_shared.c:1.1    Sun Dec 30 05:38:55 2012
+++ pkgsrc/mail/metamail/patches/patch-metamail_shared.c        Sun Oct 12 00:57:39 2025
@@ -1,27 +1,36 @@
-$NetBSD: patch-metamail_shared.c,v 1.1 2012/12/30 05:38:55 dholland Exp $
+$NetBSD: patch-metamail_shared.c,v 1.2 2025/10/12 00:57:39 mrg Exp $
 
 - use standard headers
 - don't provide own declarations of standard functions
 - don't cast the return value of malloc
+- add types for GCC 14.
 
---- metamail/shared.c~ 1993-05-16 18:19:32.000000000 +0000
-+++ metamail/shared.c
-@@ -1,4 +1,6 @@
+--- metamail/shared.c.orig     1993-05-16 11:19:32.000000000 -0700
++++ metamail/shared.c  2025-10-11 16:52:18.287181298 -0700
+@@ -1,16 +1,20 @@
  #include <stdio.h>
 +#include <stdlib.h>
 +#include <string.h>
  #include <ctype.h>
  #include <config.h>
- #ifdef SYSV
-@@ -6,7 +8,6 @@
+-#ifdef SYSV
+ #include <unistd.h>
++#ifdef SYSV
  #include <sys/utsname.h>
  #endif
  
 -extern char *malloc();
++#include "metamail.h"
++
  char **Exceptions;
  int *NeedsPortableNewlines;
  int ExceptionsAlloced = 0, ExceptionsUsed = 0;
-@@ -18,14 +19,14 @@ int needsportable;
+ 
++int
+ ExceptionalNewline(contenttype, needsportable)
+ char *contenttype;
+ int needsportable;
+@@ -18,14 +22,14 @@ int needsportable;
      char *s;
      if (ExceptionsAlloced == 0) {
          ExceptionsAlloced = 25;
@@ -40,3 +49,27 @@ $NetBSD: patch-metamail_shared.c,v 1.1 2
          if (!Exceptions || !NeedsPortableNewlines) return(-1);
      }
      s = malloc(1+strlen(contenttype));
+@@ -40,6 +44,7 @@ int needsportable;
+     return(0);
+ }
+ 
++int
+ DoesNeedPortableNewlines(ctype)
+ char *ctype;
+ {
+@@ -65,6 +70,7 @@ char *ctype;
+     return(0);
+ }
+ 
++int
+ lc2strncmp(s1, s2, len)
+ char *s1, *s2;
+ int len;
+@@ -78,6 +84,7 @@ int len;
+     return((*s1 == *s2) ? 0 : -1);
+ }
+ 
++int
+ lc2strcmp(s1, s2)
+ char *s1, *s2;
+ {
Index: pkgsrc/mail/metamail/patches/patch-richmail_iso2022.c
diff -u pkgsrc/mail/metamail/patches/patch-richmail_iso2022.c:1.1 pkgsrc/mail/metamail/patches/patch-richmail_iso2022.c:1.2
--- pkgsrc/mail/metamail/patches/patch-richmail_iso2022.c:1.1   Fri Oct 26 20:27:15 2012
+++ pkgsrc/mail/metamail/patches/patch-richmail_iso2022.c       Sun Oct 12 00:57:39 2025
@@ -1,13 +1,62 @@
-$NetBSD: patch-richmail_iso2022.c,v 1.1 2012/10/26 20:27:15 joerg Exp $
+$NetBSD: patch-richmail_iso2022.c,v 1.2 2025/10/12 00:57:39 mrg Exp $
 
---- richmail/iso2022.c.orig    2012-10-25 19:46:36.000000000 +0000
-+++ richmail/iso2022.c
-@@ -73,7 +73,7 @@ static       int     OutAsciiMode;
+Port for GCC 14.
+
+--- richmail/iso2022.c.orig    1992-12-22 09:50:21.000000000 -0800
++++ richmail/iso2022.c 2025-10-11 17:50:45.803936379 -0700
+@@ -41,6 +41,7 @@
+ 
+ #include <stdio.h>
+ #include <ctype.h>
++#include <string.h>
+ #include "richlex.h"
+ #include "richset.h"
+ 
+@@ -70,10 +71,13 @@ static     int     OutAsciiMode;
+ #define       ISO_CHARSET_PREFIX      "x-iso-charset-"
+ #define       ISO_CHARSET_LEN         14
+ 
++extern int controloutput(); /* XXX */
++extern int controlputc(); /* XXX */
++
  /*
   * Initialise the ISO-2022 character set processor.
   */
 -iso2022_init (name)
-+void iso2022_init (name)
++int iso2022_init (name)
  char  *name;
  {
      SwToAscii = 'B';
+@@ -84,7 +88,7 @@ char *name;
+     OutCharSet = OUT_ASCII;
+     OutAsciiMode = RICH_ENC_US_ASCII;
+     if (!name)
+-      return;
++      return -1;
+     if (!strncmp (name,"iso-2022-jp",11))
+       richtextencoding (RICH_ENC_JP_ASCII);
+     else if (!strncmp (name,"iso-2022-kr",11)) {
+@@ -92,6 +96,7 @@ char *name;
+       controloutput("\033$)C",0);
+     } else
+       richtextencoding (RICH_ENC_US_ASCII);
++    return 0;
+ }
+ 
+ /*
+@@ -257,6 +262,7 @@ RCHAR      ch;
+ /*
+  * Render the given ISO-2022 character.
+  */
++int
+ iso2022_render (ch,param)
+ RCHAR ch;
+ void  *param;
+@@ -294,6 +300,7 @@ void       *param;
+ /*
+  * Enter or leave the ISO-2022 encoding.
+  */
++int
+ iso2022_encoding (newenc)
+ int   newenc;
+ {

Added files:

Index: pkgsrc/mail/metamail/patches/patch-metamail_metamail.h
diff -u /dev/null pkgsrc/mail/metamail/patches/patch-metamail_metamail.h:1.1
--- /dev/null   Sun Oct 12 00:57:39 2025
+++ pkgsrc/mail/metamail/patches/patch-metamail_metamail.h      Sun Oct 12 00:57:39 2025
@@ -0,0 +1,24 @@
+$NetBSD: patch-metamail_metamail.h,v 1.1 2025/10/12 00:57:39 mrg Exp $
+
+Add a place for shared function headers.
+
+
+--- /dev/null  2025-10-11 17:19:02.891264465 -0700
++++ metamail/metamail.h        2025-10-11 17:20:20.705329874 -0700
+@@ -0,0 +1,16 @@
++/*
++ * Header for metamail stuff.  Public domain.
++ * --mrg 2025-10-11
++ */
++
++int lc2strncmp();
++int lc2strcmp();
++int ExceptionalNewline();
++void from64();
++void fromqp();
++void fromuue();
++void to64();
++void toqp();
++int PendingBoundary();
++int DoesNeedPortableNewlines();
++char *getmyname();
Index: pkgsrc/mail/metamail/patches/patch-metamail_mmencode.c
diff -u /dev/null pkgsrc/mail/metamail/patches/patch-metamail_mmencode.c:1.1
--- /dev/null   Sun Oct 12 00:57:39 2025
+++ pkgsrc/mail/metamail/patches/patch-metamail_mmencode.c      Sun Oct 12 00:57:39 2025
@@ -0,0 +1,25 @@
+$NetBSD: patch-metamail_mmencode.c,v 1.1 2025/10/12 00:57:39 mrg Exp $
+
+- Add types for GCC 14.
+
+--- metamail/mmencode.c.orig   1994-01-26 10:47:37.000000000 -0800
++++ metamail/mmencode.c        2025-10-11 16:52:59.027033250 -0700
+@@ -13,14 +13,18 @@ OF THIS MATERIAL FOR ANY PURPOSE.  IT IS
+ WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
+ */
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <config.h>
+ #ifdef MSDOS
+ #include <fcntl.h>
+ #endif
+ 
++#include "metamail.h"
++
+ #define BASE64 1
+ #define QP 2 /* quoted-printable */
+ 
++int
+ main(argc, argv)
+ int argc;
+ char **argv;
Index: pkgsrc/mail/metamail/patches/patch-richmail_richlex.c
diff -u /dev/null pkgsrc/mail/metamail/patches/patch-richmail_richlex.c:1.1
--- /dev/null   Sun Oct 12 00:57:39 2025
+++ pkgsrc/mail/metamail/patches/patch-richmail_richlex.c       Sun Oct 12 00:57:39 2025
@@ -0,0 +1,57 @@
+$NetBSD: patch-richmail_richlex.c,v 1.1 2025/10/12 00:57:39 mrg Exp $
+
+Port for GCC 14.
+
+
+--- richmail/richlex.c.orig    1994-02-02 18:29:37.000000000 -0800
++++ richmail/richlex.c 2025-10-11 17:43:11.259027887 -0700
+@@ -43,6 +43,7 @@
+ 
+ #include <stdio.h>
+ #include <ctype.h>
++#include <string.h>
+ #include "richlex.h"
+ #include "richset.h"
+ 
+@@ -105,6 +106,7 @@ static     int     PushbackExtract=0;
+ /*
+  * Reset the richtext parsing mechanism.
+  */
++void
+ richtextreset()
+ {
+     StackSize = 0;
+@@ -191,7 +193,7 @@ static int richtextmatchup()
+  * Determine if the current token is one of the singleton
+  * richtext commands: <nl>, <lt>, <np>.
+  */
+-static richtextsingle(TextEnriched)
++static int richtextsingle(TextEnriched)
+ int TextEnriched;
+ {
+     return (charsetsingle (NextToken) ||
+@@ -416,7 +418,7 @@ int nofill; /* Inside a nofill env we pa
+ /*
+  * Output a string via "RichtextPutc".
+  */
+-static richtextoutstr(str,outparam)
++static void richtextoutstr(str,outparam)
+ char *str;
+ void *outparam;
+ {
+@@ -430,6 +432,7 @@ void *outparam;
+  * Read the input stream, correct the richtext, and write the
+  * results to the output stream.
+  */
++void
+ richtextcorrect(inparam,outparam,TextEnriched)
+ void *inparam,*outparam;
+ int TextEnriched;
+@@ -459,6 +462,7 @@ int TextEnriched;
+  * Change the encoding used for characters not present in
+  * richtext command sequences.
+  */
++void
+ richtextencoding(encoding)
+ int   encoding;
+ {
Index: pkgsrc/mail/metamail/patches/patch-richmail_richlex.h
diff -u /dev/null pkgsrc/mail/metamail/patches/patch-richmail_richlex.h:1.1
--- /dev/null   Sun Oct 12 00:57:39 2025
+++ pkgsrc/mail/metamail/patches/patch-richmail_richlex.h       Sun Oct 12 00:57:39 2025
@@ -0,0 +1,34 @@
+$NetBSD: patch-richmail_richlex.h,v 1.1 2025/10/12 00:57:39 mrg Exp $
+
+Port for GCC 14.
+
+
+--- richmail/richlex.h.orig    1993-08-23 15:48:26.000000000 -0700
++++ richmail/richlex.h 2025-10-11 17:43:32.409497968 -0700
+@@ -101,7 +101,7 @@ extern     int (*RichtextPutc) ();
+ /*
+  * Reset the richtext parsing mechanism.
+  */
+-extern        richtextreset();
++extern void   richtextreset();
+ 
+ /*
+  * Get the next token from the input stream.  RICHTEXT_COMMAND
+@@ -123,7 +123,7 @@ extern     RCHAR   richtextlex( /* void *file,
+  * "RichtextPutc" function as the second argument, and "inparam"
+  * is passed to "richtextlex" during parsing.
+  */
+-extern        richtextcorrect( /* void *inparam,void *outparam,int TextEnriched */ );
++extern void   richtextcorrect( /* void *inparam,void *outparam,int TextEnriched */ );
+ 
+ #define       RICH_ENC_US_ASCII       0       /* US-ASCII encoding: one-byte */
+ #define       RICH_ENC_JP_ASCII       1       /* JP-ASCII encoding: one-byte */
+@@ -143,7 +143,7 @@ extern     int     RichtextCharEncoding;
+  * Change the encoding used for characters not present in
+  * richtext command sequences.
+  */
+-extern        richtextencoding( /* int encoding */ );
++extern void   richtextencoding( /* int encoding */ );
+ 
+ /*
+  * Define a number of macros for decoding multi-byte character
Index: pkgsrc/mail/metamail/patches/patch-richmail_richset.c
diff -u /dev/null pkgsrc/mail/metamail/patches/patch-richmail_richset.c:1.1
--- /dev/null   Sun Oct 12 00:57:39 2025
+++ pkgsrc/mail/metamail/patches/patch-richmail_richset.c       Sun Oct 12 00:57:39 2025
@@ -0,0 +1,71 @@
+$NetBSD: patch-richmail_richset.c,v 1.1 2025/10/12 00:57:39 mrg Exp $
+
+Port for GCC 14.
+
+
+--- richmail/richset.c.orig    1992-10-21 11:04:19.000000000 -0700
++++ richmail/richset.c 2025-10-11 17:44:47.838724358 -0700
+@@ -34,6 +34,7 @@
+ -------------------------------------------------------------------------*/
+ 
+ #include <stdio.h>
++#include <stdlib.h>
+ #include "richlex.h"
+ #include "richset.h"
+ 
+@@ -58,6 +59,7 @@ static       int     CharEncStack[MAX_CHAR_SETS];
+  * a particular base processor.  The initialisation function of all
+  * character set processors is called.
+  */
++void
+ charsetinit (charset,name)
+ struct        charsetproc *charset;
+ char  *name;
+@@ -76,6 +78,7 @@ char *name;
+  * Initialise the stack, starting with a character set processor with
+  * a particular name.
+  */
++void
+ charsetnameinit       (name)
+ char  *name;
+ {
+@@ -110,6 +113,7 @@ char       *name;
+ /*
+  * Push a new character set processor onto the stack.
+  */
++void
+ charsetpush (charset)
+ struct        charsetproc *charset;
+ {
+@@ -128,6 +132,7 @@ struct     charsetproc *charset;
+  * if it matches the given processor.  Note: the base
+  * processor is never popped off.
+  */
++void
+ charsetpop (charset)
+ struct        charsetproc *charset;
+ {
+@@ -156,6 +161,7 @@ struct     charsetproc *charset;
+  * Set the details for a character set member in the top-most
+  * character set.
+  */
++void
+ charmember (member,ch)
+ struct        charsetmember *member;
+ RCHAR ch;
+@@ -167,6 +173,7 @@ RCHAR      ch;
+ /*
+  * Set the details for a member of a specific character set.
+  */
++void
+ charmemberspec (member,ch,charset)
+ struct        charsetmember *member;
+ RCHAR ch;
+@@ -179,6 +186,7 @@ struct     charsetproc *charset;
+ /*
+  * Set the details for a output control code character.
+  */
++void
+ charmemberctrl (member,ch)
+ struct        charsetmember *member;
+ RCHAR ch;
Index: pkgsrc/mail/metamail/patches/patch-richmail_richset.h
diff -u /dev/null pkgsrc/mail/metamail/patches/patch-richmail_richset.h:1.1
--- /dev/null   Sun Oct 12 00:57:39 2025
+++ pkgsrc/mail/metamail/patches/patch-richmail_richset.h       Sun Oct 12 00:57:39 2025
@@ -0,0 +1,59 @@
+$NetBSD: patch-richmail_richset.h,v 1.1 2025/10/12 00:57:39 mrg Exp $
+
+Port for GCC 14.
+
+
+--- richmail/richset.h.orig    1992-10-21 11:04:19.000000000 -0700
++++ richmail/richset.h 2025-10-11 17:29:42.796053973 -0700
+@@ -89,25 +89,25 @@ struct     charsetmember
+  * a particular base processor.  The initialisation function of all
+  * character set processors is called.
+  */
+-extern        charsetinit     ( /* struct charsetproc *charset, char *name */ );
++extern        void charsetinit        ( /* struct charsetproc *charset, char *name */ );
+ 
+ /*
+  * Initialise the stack, starting with a character set processor with
+  * a particular name.
+  */
+-extern        charsetnameinit ( /* char *name */ );
++extern        void charsetnameinit    ( /* char *name */ );
+ 
+ /*
+  * Push a new character set processor onto the stack.
+  */
+-extern        charsetpush     ( /* struct charsetproc *charset */ );
++extern        void charsetpush        ( /* struct charsetproc *charset */ );
+ 
+ /*
+  * Pop the top-most character set processor off the stack
+  * if it matches the given processor.  Note: the base
+  * processor is never popped off.
+  */
+-extern        charsetpop      ( /* struct charsetproc *charset */ );
++extern        void charsetpop ( /* struct charsetproc *charset */ );
+ 
+ /*
+  * See if the character set processor on the top of the stack
+@@ -119,18 +119,18 @@ extern   int     charsettop ( /* struct charse
+  * Set the details for a character set member in the top-most
+  * character set.
+  */
+-extern        charmember      ( /* struct charsetmember *member, RCHAR ch */ );
++extern        void charmember ( /* struct charsetmember *member, RCHAR ch */ );
+ 
+ /*
+  * Set the details for a member of a specific character set.
+  */
+-extern        charmemberspec  ( /* struct charsetmember *member, RCHAR ch,
++extern        void charmemberspec     ( /* struct charsetmember *member, RCHAR ch,
+                            struct charset *charset */ );
+ 
+ /*
+  * Set the details for a output control code character.
+  */
+-extern        charmemberctrl  ( /* struct charsetmember *member, RCHAR ch */ );
++extern        void charmemberctrl     ( /* struct charsetmember *member, RCHAR ch */ );
+ 
+ /*
+  * Determine if the given character is a control code character.
Index: pkgsrc/mail/metamail/patches/patch-richmail_richtoatk.c
diff -u /dev/null pkgsrc/mail/metamail/patches/patch-richmail_richtoatk.c:1.1
--- /dev/null   Sun Oct 12 00:57:39 2025
+++ pkgsrc/mail/metamail/patches/patch-richmail_richtoatk.c     Sun Oct 12 00:57:39 2025
@@ -0,0 +1,48 @@
+$NetBSD: patch-richmail_richtoatk.c,v 1.1 2025/10/12 00:57:39 mrg Exp $
+
+Port for GCC 14.
+
+--- richmail/richtoatk.c.orig  1994-02-02 18:28:18.000000000 -0800
++++ richmail/richtoatk.c       2025-10-11 17:53:00.230274649 -0700
+@@ -14,8 +14,11 @@ WITHOUT ANY EXPRESS OR IMPLIED WARRANTIE
+ */
+ #include <stdio.h>
+ #include <ctype.h>
++#include <string.h>
+ #include "richlex.h"
+ 
++int ignoretoken();
++
+ char *translate(t)
+ char *t;
+ {
+@@ -25,6 +28,7 @@ char *t;
+     return(t);
+ }
+ 
++void
+ main() {
+     RCHAR c;
+     int i, JustDidNewline = 0;
+@@ -76,6 +80,7 @@ main() {
+     fputs("\n \n\\enddata{text, 42}\n", stdout);
+ }
+ 
++int
+ ignoretoken(t)
+ char *t;
+ {
+@@ -86,11 +91,13 @@ char *t;
+     return(0);
+ }
+ 
++int
+ controlputc(c)
+ int c;
+ {
+ }
+ 
++int
+ controloutput(s, immediate)
+ char *s;
+ int immediate;
Index: pkgsrc/mail/metamail/patches/patch-richmail_usascii.c
diff -u /dev/null pkgsrc/mail/metamail/patches/patch-richmail_usascii.c:1.1
--- /dev/null   Sun Oct 12 00:57:39 2025
+++ pkgsrc/mail/metamail/patches/patch-richmail_usascii.c       Sun Oct 12 00:57:39 2025
@@ -0,0 +1,37 @@
+$NetBSD: patch-richmail_usascii.c,v 1.1 2025/10/12 00:57:39 mrg Exp $
+
+Port to GCC 14.
+
+--- richmail/usascii.c.orig    1992-10-21 11:04:20.000000000 -0700
++++ richmail/usascii.c 2025-10-11 17:47:17.762815275 -0700
+@@ -35,12 +35,14 @@
+ 
+ #include <stdio.h>
+ #include <ctype.h>
++#include <string.h>
+ #include "richlex.h"
+ #include "richset.h"
+ 
+ /*
+  * Initialise the US-ASCII character set processor.
+  */
++int
+ usascii_init (name)
+ char  *name;
+ {
+@@ -98,6 +100,7 @@ RCHAR       ch;
+ /*
+  * Render the given US-ASCII character.
+  */
++int
+ usascii_render (ch,param)
+ RCHAR ch;
+ void  *param;
+@@ -108,6 +111,7 @@ void       *param;
+ /*
+  * Enter or leave the US-ASCII encoding.
+  */
++int
+ usascii_encoding (newenc)
+ int   newenc;
+ {



Home | Main Index | Thread Index | Old Index