ports/japanese/mh/files/patch-uip_mshcmds.c
Brooks Davis 993ca87fed 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
2024-10-01 21:11:47 +01:00

19 lines
372 B
C
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

--- 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;