mirror of
https://git.freebsd.org/ports.git
synced 2025-04-28 01:26:39 -04:00
japanese/mh: include errno.h for errno
errno must be accessed by a macro from errno.h. Due to the sheer number of instances use REINPLACE_CMD to replace most instances of "extern int errno;" with "#include <errno.h>". In a few places the errno decleration was a function-scope global where including a header didn't make sense patch those out (the files already included errno.h). This isn't the most elegant, but it's the least of the issues with this code. PR: 281787 Approved by: portmgr (build fix blanket), mikael
This commit is contained in:
parent
d4400f87b2
commit
993ca87fed
5 changed files with 53 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
|||
PORTNAME= mh
|
||||
PORTVERSION= ${VERSION}.j${JP_VERSION}
|
||||
PORTREVISION= 7
|
||||
PORTREVISION= 8
|
||||
CATEGORIES= japanese mail
|
||||
MASTER_SITES= ftp://ftp.laic.u-hyogo.ac.jp/pub/net/mh/
|
||||
DISTNAME= ${PORTNAME}-${VERSION}-JP-${JP_VERSION}
|
||||
|
@ -47,6 +47,9 @@ post-patch:
|
|||
print; \
|
||||
}' ${i}.rf > ${i}.tmp && ${MV} ${i}.tmp ${i}.rf)
|
||||
.endfor
|
||||
${FIND} ${WRKSRC} -type f \! -name \*.orig | \
|
||||
xargs grep -l "extern[ ]*int[ ]*errno" | \
|
||||
xargs ${REINPLACE_CMD} -e "s/^extern[ ]*int[ ]*errno;/#include <errno.h>/"
|
||||
|
||||
post-install:
|
||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/*
|
||||
|
|
10
japanese/mh/files/patch-sbr_ruserpass.c
Normal file
10
japanese/mh/files/patch-sbr_ruserpass.c
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- sbr/ruserpass.c.orig
|
||||
+++ sbr/ruserpass.c
|
||||
@@ -66,7 +66,6 @@
|
||||
char myname[MAXHOSTNAMELEN], *mydomain;
|
||||
int t, i, c, usedefault = 0;
|
||||
struct stat stb;
|
||||
- extern int errno;
|
||||
|
||||
hdir = getenv("HOME");
|
||||
if (hdir == NULL)
|
19
japanese/mh/files/patch-uip_mshcmds.c
Normal file
19
japanese/mh/files/patch-uip_mshcmds.c
Normal file
|
@ -0,0 +1,19 @@
|
|||
--- uip/mshcmds.c.orig
|
||||
+++ uip/mshcmds.c
|
||||
@@ -29,8 +29,6 @@
|
||||
|
||||
/* */
|
||||
|
||||
-extern int errno;
|
||||
-
|
||||
/* BURST */
|
||||
static char delim3[] = "-------";/* from burst.c */
|
||||
|
||||
@@ -3529,7 +3527,6 @@
|
||||
(void) strcpy (tmpfil, m_scratch ("", invo_name));
|
||||
if ((out = fopen (tmpfil, "w")) == NULL) {
|
||||
int olderr;
|
||||
- extern int errno;
|
||||
char newfil[80];
|
||||
|
||||
olderr = errno;
|
10
japanese/mh/files/patch-zotnet_mf_muinc.c
Normal file
10
japanese/mh/files/patch-zotnet_mf_muinc.c
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- zotnet/mf/muinc.c.orig
|
||||
+++ zotnet/mf/muinc.c
|
||||
@@ -81,7 +81,6 @@
|
||||
{
|
||||
int count,
|
||||
fd;
|
||||
- extern int errno;
|
||||
|
||||
for (count = 2; count > 0; count--)
|
||||
if ((fd = lkopen (file, 1)) == NOTOK)
|
10
japanese/mh/files/patch-zotnet_mf_uminc.c
Normal file
10
japanese/mh/files/patch-zotnet_mf_uminc.c
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- zotnet/mf/uminc.c.orig
|
||||
+++ zotnet/mf/uminc.c
|
||||
@@ -86,7 +86,6 @@
|
||||
int clear,
|
||||
count,
|
||||
fd;
|
||||
- extern int errno;
|
||||
struct stat stbuf;
|
||||
|
||||
for (clear = FALSE, count = 2; count > 0; count--)
|
Loading…
Add table
Reference in a new issue