mirror of
https://git.freebsd.org/ports.git
synced 2025-04-28 01:26:39 -04:00
mail/faces: include errno.h for errno
errno must be accessed by a macro from errno.h. Also add stdio.h for sys_nerr and sys_errlist. PR: 281783 Approved by: portmgr (build fix blanket), mikael
This commit is contained in:
parent
4680b0d8d0
commit
4c00fb987e
4 changed files with 36 additions and 22 deletions
|
@ -1,6 +1,6 @@
|
|||
PORTNAME= faces
|
||||
PORTVERSION= 1.7.7
|
||||
PORTREVISION= 13
|
||||
PORTREVISION= 14
|
||||
CATEGORIES= mail
|
||||
MASTER_SITES= SF
|
||||
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
--- compface/cmain.c.orig
|
||||
+++ compface/cmain.c
|
||||
@@ -13,77 +13,64 @@
|
||||
@@ -13,77 +13,63 @@
|
||||
* to me, then an attempt will be made to fix them.
|
||||
*/
|
||||
|
||||
-#include <stdlib.h>
|
||||
-#include <unistd.h>
|
||||
+#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
+#include <stdio.h>
|
||||
#include "compface.h"
|
||||
|
||||
-#define STRCAT (void) strcat
|
||||
|
@ -33,11 +35,10 @@
|
|||
-/* Error handling definitions follow */
|
||||
+/* error handling definitions follow */
|
||||
|
||||
extern int errno, sys_nerr;
|
||||
extern char *sys_errlist[];
|
||||
|
||||
-extern int errno, sys_nerr;
|
||||
-extern char *sys_errlist[];
|
||||
+extern void exit P((int)) ;
|
||||
+
|
||||
|
||||
#define ERR ((errno < sys_nerr) ? sys_errlist[errno] : "")
|
||||
-#define INITERR(s) { \
|
||||
- STRCPY(fbuf, cmdname); \
|
||||
|
@ -106,7 +107,7 @@
|
|||
INITERR(inname)
|
||||
ADDERR(": ")
|
||||
ADDERR(ERR)
|
||||
@@ -91,10 +78,11 @@
|
||||
@@ -91,10 +77,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -121,7 +122,7 @@
|
|||
INITERR(outname)
|
||||
ADDERR(": ")
|
||||
ADDERR(ERR)
|
||||
@@ -103,7 +91,8 @@
|
||||
@@ -103,7 +90,8 @@
|
||||
}
|
||||
|
||||
(void) ReadBuf();
|
||||
|
@ -131,7 +132,7 @@
|
|||
case -2 : INITERR("internal error")
|
||||
ERROR
|
||||
case -1 : INITERR(inname)
|
||||
@@ -123,13 +112,15 @@
|
||||
@@ -123,13 +111,15 @@
|
||||
int
|
||||
WriteBuf()
|
||||
{
|
||||
|
@ -151,7 +152,7 @@
|
|||
INITERR(outname)
|
||||
ADDERR(": ")
|
||||
ADDERR(ERR)
|
||||
@@ -137,27 +128,30 @@
|
||||
@@ -137,27 +127,30 @@
|
||||
}
|
||||
s += len;
|
||||
}
|
||||
|
@ -188,7 +189,7 @@
|
|||
INITWARN(inname)
|
||||
ADDWARN(" exceeds internal buffer size. Data may be lost")
|
||||
WARN
|
||||
@@ -165,5 +159,5 @@
|
||||
@@ -165,5 +158,5 @@
|
||||
}
|
||||
}
|
||||
*t = '\0';
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
--- compface/uncmain.c.orig
|
||||
+++ compface/uncmain.c
|
||||
@@ -13,16 +13,12 @@
|
||||
@@ -13,16 +13,14 @@
|
||||
* to me, then an attempt will be made to fix them.
|
||||
*/
|
||||
|
||||
-#include <stdlib.h>
|
||||
-#include <unistd.h>
|
||||
+#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
+#include <stdio.h>
|
||||
#include "compface.h"
|
||||
|
||||
-#define STRCAT (void) strcat
|
||||
|
@ -19,7 +21,7 @@
|
|||
#define FACEBUFLEN 2048
|
||||
char fbuf[FACEBUFLEN];
|
||||
|
||||
@@ -32,56 +28,58 @@
|
||||
@@ -32,56 +30,55 @@
|
||||
int outfile = 1;
|
||||
char *outname = "<stdout>";
|
||||
|
||||
|
@ -30,11 +32,10 @@
|
|||
-/* Error handling definitions follow */
|
||||
+/* error handling definitions follow */
|
||||
|
||||
extern int errno, sys_nerr;
|
||||
extern char *sys_errlist[];
|
||||
|
||||
-extern int errno, sys_nerr;
|
||||
-extern char *sys_errlist[];
|
||||
+extern void exit P((int)) ;
|
||||
+
|
||||
|
||||
#define ERR ((errno < sys_nerr) ? sys_errlist[errno] : "")
|
||||
-#define INITERR(s) { \
|
||||
- STRCPY(fbuf, cmdname); \
|
||||
|
@ -108,7 +109,7 @@
|
|||
INITERR(inname)
|
||||
ADDERR(": ")
|
||||
ADDERR(ERR)
|
||||
@@ -89,10 +87,11 @@
|
||||
@@ -89,10 +86,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -123,7 +124,7 @@
|
|||
INITERR(outname)
|
||||
ADDERR(": ")
|
||||
ADDERR(ERR)
|
||||
@@ -101,7 +100,8 @@
|
||||
@@ -101,7 +99,8 @@
|
||||
}
|
||||
|
||||
(void) ReadBuf();
|
||||
|
@ -133,7 +134,7 @@
|
|||
case -2 : INITERR("internal error")
|
||||
ERROR
|
||||
case -1 : INITERR(inname)
|
||||
@@ -121,13 +121,15 @@
|
||||
@@ -121,13 +120,15 @@
|
||||
int
|
||||
WriteBuf()
|
||||
{
|
||||
|
@ -153,7 +154,7 @@
|
|||
INITERR(outname)
|
||||
ADDERR(": ")
|
||||
ADDERR(ERR)
|
||||
@@ -135,27 +137,30 @@
|
||||
@@ -135,27 +136,30 @@
|
||||
}
|
||||
s += len;
|
||||
}
|
||||
|
@ -190,7 +191,7 @@
|
|||
INITWARN(inname)
|
||||
ADDWARN(" exceeds internal buffer size. Data may be lost")
|
||||
WARN
|
||||
@@ -163,5 +168,5 @@
|
||||
@@ -163,5 +167,5 @@
|
||||
}
|
||||
}
|
||||
*t = '\0';
|
||||
|
|
12
mail/faces/files/patch-intl_dcgettext.c
Normal file
12
mail/faces/files/patch-intl_dcgettext.c
Normal file
|
@ -0,0 +1,12 @@
|
|||
--- intl/dcgettext.c.orig 2024-09-30 18:50:01.925202000 +0100
|
||||
+++ intl/dcgettext.c 2024-09-30 18:51:19.264270000 +0100
|
||||
@@ -39,9 +39,6 @@
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
-#ifndef errno
|
||||
-extern int errno;
|
||||
-#endif
|
||||
#ifndef __set_errno
|
||||
# define __set_errno(val) errno = (val)
|
||||
#endif
|
Loading…
Add table
Reference in a new issue