delegate: fix build on char = signed char systems

This commit is contained in:
wiz 2022-12-21 14:41:59 +00:00
parent e4d053af27
commit a14b042756
4 changed files with 103 additions and 1 deletions

View file

@ -1,8 +1,10 @@
$NetBSD: distinfo,v 1.17 2022/09/18 22:46:25 he Exp $
$NetBSD: distinfo,v 1.18 2022/12/21 14:41:59 wiz Exp $
BLAKE2s (delegate9.9.1.tar.gz) = 5c2691c941b17c4d2fe359ab3b686848249e6e23f6e2480a181f6ea906f5933e
SHA512 (delegate9.9.1.tar.gz) = 85e316de1eaef7f1e69ae767c6aba7e58a43dd8f41b508ce8dcb84a381829879f99be87b54440e339d5e0858c6ef87349223364a4d3ec786dba04af7111c87f4
Size (delegate9.9.1.tar.gz) = 1944670 bytes
SHA1 (patch-filters_pdft.c) = 4ef94a8a029d26052806973a8383e9fafb9a712c
SHA1 (patch-fsx_any2fdif.c) = 622638a4b6442e09ac76c54ed0175078fdaad969
SHA1 (patch-mimekit_mimehead.c) = 73f63930acd4eabb6854d96cf8792c5c33a09822
SHA1 (patch-rary_credhy.c) = d4788506a9f177eeb2568091089ccb823813035b
SHA1 (patch-rary_pstitle_c) = 3b30e698749b5ed6a9cc197b0ab6a1e013de2673
@ -10,3 +12,4 @@ SHA1 (patch-resolvy_resconf_c) = d090d26542a3197fb48514652f3b421b6282a6cc
SHA1 (patch-resolvy_resolv_c) = d903447c60f1c79b7bc596cba9d3c8070298a1e2
SHA1 (patch-src_delegated_c) = d0355e6c7c700e9c0fc894fec3eb403f626a1758
SHA1 (patch-src_inets_c) = 3664facb1bfaa88a76fc74186bae45184b41115c
SHA1 (patch-src_telnet.c) = b75ad32cb94384220184ea140fc515142f95c0c9

View file

@ -0,0 +1,24 @@
$NetBSD: patch-filters_pdft.c,v 1.1 2022/12/21 14:41:59 wiz Exp $
Fix compilation on char = signed char systems.
--- filters/pdft.c.orig 2007-02-14 08:42:43.000000000 +0000
+++ filters/pdft.c
@@ -172,7 +172,7 @@ int main(int ac,char *av[]){
}
#endif
-static char passpadd[] = {
+static unsigned char passpadd[] = {
0x28, 0xBF, 0x4E, 0x5E, 0x4E, 0x75, 0x8A, 0x41,
0x64, 0x00, 0x4E, 0x56, 0xFF, 0xFA, 0x01, 0x08,
0x2E, 0x2E, 0x00, 0xB6, 0xD0, 0x68, 0x3E, 0x80,
@@ -194,7 +194,7 @@ static void setupCrypt(Pdf *pdf,int ver,
stdf->p_length = len;
md5 = newMD5();
- addMD5(md5,passpadd,32);
+ addMD5(md5,(char*)passpadd,32);
addMD5(md5,owner,32);
perm[0] = per;
perm[1] = per >> 8;

View file

@ -0,0 +1,24 @@
$NetBSD: patch-fsx_any2fdif.c,v 1.1 2022/12/21 14:41:59 wiz Exp $
Fix compilation on char = signed char systems.
--- fsx/any2fdif.c.orig 2009-01-21 07:09:37.000000000 +0000
+++ fsx/any2fdif.c
@@ -141,7 +141,7 @@ static const char *indexbase = "freyasx/
#define T_MBOX 6
#define CH_COPYR 0xA9
-static char thru8[32] = {CH_COPYR};
+static unsigned char thru8[32] = {CH_COPYR};
static int Itype = T_HTML;
typedef struct {
@@ -2350,7 +2350,7 @@ int any2fdif(PCStr(pre),PCStr(strip),PCS
ccx_oututf = strcasestr(ccx_outcode,"utf") != 0;
CCXcreate("*",ccx_outcode,(CCXP)Ccx);
- CCXthru8((CCXP)Ccx,thru8);
+ CCXthru8((CCXP)Ccx,(char*)thru8);
CCXdisable = 0;
if( streq(ccx_outcode,"thru") ){
CCXdisable = 1;

View file

@ -0,0 +1,51 @@
$NetBSD: patch-src_telnet.c,v 1.1 2022/12/21 14:41:59 wiz Exp $
Fix compilation on char = signed char systems.
--- src/telnet.c.orig 2008-12-14 09:33:10.000000000 +0000
+++ src/telnet.c
@@ -160,7 +160,7 @@ static void sigTERM(int sig){
#define O_AUTH 37 /* Authentication */
#define O_NENVIRON 39 /* New Environment Option RFC1572 */
-static char NOPstr[2] = { IAC, NOP };
+static unsigned char NOPstr[2] = { IAC, NOP };
static void sigurg(int sig)
{ const char *ssig;
@@ -1810,7 +1810,7 @@ static int telnetonly(Connection *Conn)
static struct {
char *ne_USER;
} clenv;
-static char doNewEnviron[] = {IAC,SB,O_NENVIRON,1,IAC,SE};
+static unsigned char doNewEnviron[] = {IAC,SB,O_NENVIRON,1,IAC,SE};
static int getUSERenv(FILE *fc,FILE *tc,AuthInfo *au){
int rcc,nrcc;
int timeout = 15*1000;
@@ -1911,7 +1911,7 @@ int service_telnet(Connection *Conn)
*/
if( telnetonly(Conn) ){
write(ToC,NOPstr,2);
- scanCommands(DtoC,CVStr(NOPstr),2);
+ scanCommands(DtoC,CVStr((char *)NOPstr),2);
}
}
proxy_telnet(Conn);
@@ -1927,7 +1927,7 @@ int service_telnet(Connection *Conn)
int dport = DFLT_PORT;
write(ToC,NOPstr,2);
- scanCommands(DtoC,CVStr(NOPstr),2);
+ scanCommands(DtoC,CVStr((char *)NOPstr),2);
auser[0] = ahost[0] = 0;
DFLT_PORT = 0; /* to escape "already authorized" */
@@ -1967,7 +1967,7 @@ int service_telnet(Connection *Conn)
*/
if( PollIn(FromS,10) == 0 ){
write(ToC,NOPstr,2);
- scanCommands(DtoC,CVStr(NOPstr),2);
+ scanCommands(DtoC,CVStr((char *)NOPstr),2);
}
/*
{ CStr(buf,3);