summaryrefslogtreecommitdiff
path: root/comms/xtel
diff options
context:
space:
mode:
authordholland <dholland@pkgsrc.org>2011-10-09 03:35:26 +0000
committerdholland <dholland@pkgsrc.org>2011-10-09 03:35:26 +0000
commit60612921b6f09b3182e1039af6129ca3cd9ba5ab (patch)
treea0ea1a9177e06e6365074639fa5103df392ac6d6 /comms/xtel
parent81b3650848d21527d4b11b65fee6cc29d79bad71 (diff)
downloadpkgsrc-60612921b6f09b3182e1039af6129ca3cd9ba5ab.tar.gz
Add a monster cleanup patch, posted as a distfile, to fix rampant
misuse of function pointer casts and mismatched function calls and arguments. Now this has some chance at running on something other than i386. PKGREVISION -> 12.
Diffstat (limited to 'comms/xtel')
-rw-r--r--comms/xtel/Makefile8
-rw-r--r--comms/xtel/distinfo13
-rw-r--r--comms/xtel/patches/patch-aa22
-rw-r--r--comms/xtel/patches/patch-ac17
-rw-r--r--comms/xtel/patches/patch-ad17
-rw-r--r--comms/xtel/patches/patch-ae26
-rw-r--r--comms/xtel/patches/patch-af255
-rw-r--r--comms/xtel/patches/patch-ag62
-rw-r--r--comms/xtel/patches/patch-ah13
9 files changed, 12 insertions, 421 deletions
diff --git a/comms/xtel/Makefile b/comms/xtel/Makefile
index 9e0c8ad970f..e1705917d6b 100644
--- a/comms/xtel/Makefile
+++ b/comms/xtel/Makefile
@@ -1,11 +1,15 @@
-# $NetBSD: Makefile,v 1.22 2011/10/08 07:04:34 dholland Exp $
+# $NetBSD: Makefile,v 1.23 2011/10/09 03:35:26 dholland Exp $
#
DISTNAME= xtel-3.3.0
-PKGREVISION= 11
+PKGREVISION= 12
CATEGORIES= comms x11
MASTER_SITES= http://pficheux.free.fr/xtel/download/
+PATCHFILES= xtel-jumbo-patch-20111008.gz
+PATCH_SITES= http://www.NetBSD.org/~dholland/patchkits/xtel/
+PATCH_DIST_STRIP= -p1
+
MAINTAINER= bouyer@NetBSD.org
HOMEPAGE= http://pficheux.free.fr/xtel/
COMMENT= Minitel(r) emulator
diff --git a/comms/xtel/distinfo b/comms/xtel/distinfo
index 7b09c0d71c9..41ca4cfe96c 100644
--- a/comms/xtel/distinfo
+++ b/comms/xtel/distinfo
@@ -1,14 +1,11 @@
-$NetBSD: distinfo,v 1.6 2009/02/07 22:06:06 joerg Exp $
+$NetBSD: distinfo,v 1.7 2011/10/09 03:35:26 dholland Exp $
SHA1 (xtel-3.3.0.tar.gz) = 7ee5a5afa20bea46e08c346605c53cdd32d69dc9
RMD160 (xtel-3.3.0.tar.gz) = 0ba51e9129b24db33ac96cff23ffc88d3f13b653
Size (xtel-3.3.0.tar.gz) = 309426 bytes
-SHA1 (patch-aa) = 648ff6a6a1bffd836a28abed1f0da5e781d61d53
+SHA1 (xtel-jumbo-patch-20111008.gz) = 868afb6a47402ae4eb819fed5509733b4fafebca
+RMD160 (xtel-jumbo-patch-20111008.gz) = 4f23535a9c93347aa45dce8959e3e6aea6e3957c
+Size (xtel-jumbo-patch-20111008.gz) = 43856 bytes
SHA1 (patch-ab) = 991cd916bbb4c20c71214d4d74a43736940fd5ce
-SHA1 (patch-ac) = 696f513b24a3b4a36e1f49f7fc72a20f1efd57cb
-SHA1 (patch-ad) = 95cd5a8c3e421d711f9fd0ad502aa33e92273e0f
-SHA1 (patch-ae) = ece76180605a5310044ff06506fd298f3dde3234
-SHA1 (patch-af) = c52f5b39da50c350ac3ce929b3f77eafdce4942c
-SHA1 (patch-ag) = 6addd47ca368ed78011162b0b843124329909fc1
-SHA1 (patch-ah) = 18f454bba7898a4d80f68215e7b6995d2ba26a71
+SHA1 (patch-ae) = 38a846ba1ece5f4267771a062d9691f24057b4e1
SHA1 (patch-ai) = 7ee6020f7cbf0f53be43c8aa264958fc1cab6322
diff --git a/comms/xtel/patches/patch-aa b/comms/xtel/patches/patch-aa
deleted file mode 100644
index 42541194305..00000000000
--- a/comms/xtel/patches/patch-aa
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-aa,v 1.2 2004/02/12 12:57:10 agc Exp $
-
---- Xsra/SelFile.c.orig Sat Jan 12 17:52:02 2002
-+++ Xsra/SelFile.c Sat Jan 12 17:52:18 2002
-@@ -41,17 +41,8 @@
- * 1-1-1 Hirakawa-cho, Chiyoda-ku
- * Tokyo 102 Japan. TEL +81-3-234-2692
- */
--
- #include <stdio.h>
- #include <errno.h>
--/* BSD 4.3 errno.h does not declare errno */
--extern int errno;
--extern int sys_nerr;
--#ifndef __FreeBSD__
--#ifndef __GLIBC__
--extern char *sys_errlist[];
--#endif
--#endif
-
- #include <sys/param.h>
- #include <X11/cursorfont.h>
diff --git a/comms/xtel/patches/patch-ac b/comms/xtel/patches/patch-ac
deleted file mode 100644
index 1ea9327d773..00000000000
--- a/comms/xtel/patches/patch-ac
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD: patch-ac,v 1.2 2006/01/02 16:17:09 joerg Exp $
-
---- global.h.orig 2001-02-10 23:58:59.000000000 +0000
-+++ global.h
-@@ -203,11 +203,9 @@ char *build_name();
- /*
- * Variables
- */
--#ifndef __FreeBSD__
--#ifndef __GLIBC__
-+#if !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__NetBSD__) && !defined(__GLIBC__)
- extern char *sys_errlist[];
- #endif
--#endif
-
- /* xtel.c */
- #ifdef NO_NETWORK
diff --git a/comms/xtel/patches/patch-ad b/comms/xtel/patches/patch-ad
deleted file mode 100644
index 26419536879..00000000000
--- a/comms/xtel/patches/patch-ad
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD: patch-ad,v 1.2 2006/01/02 16:17:09 joerg Exp $
-
---- globald.h.orig 1999-04-09 08:07:59.000000000 +0000
-+++ globald.h
-@@ -33,11 +33,9 @@ typedef char Boolean;
- /*
- * Variables
- */
--#ifndef __FreeBSD__
--#ifndef __GLIBC__
-+#if !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__NetBSD__) && !defined(__GLIBC__)
- extern char *sys_errlist[];
- #endif
--#endif
-
- EXTERN struct definition_ligne definition_lignes[MAX_LIGNES];
- EXTERN struct definition_service definition_services[MAX_SERVICES];
diff --git a/comms/xtel/patches/patch-ae b/comms/xtel/patches/patch-ae
index a65a240cbfe..22265b0608f 100644
--- a/comms/xtel/patches/patch-ae
+++ b/comms/xtel/patches/patch-ae
@@ -1,31 +1,7 @@
-$NetBSD: patch-ae,v 1.2 2006/01/02 16:17:09 joerg Exp $
+$NetBSD: patch-ae,v 1.3 2011/10/09 03:35:27 dholland Exp $
--- mdmdetect.c.orig 2001-02-11 00:02:58.000000000 +0000
+++ mdmdetect.c
-@@ -37,18 +37,20 @@ static char rcsid[] = "$Id: mdmdetect.c,
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
-+#ifdef USE_TERMIOS
-+#include <termios.h>
-+#else
- #include <termio.h>
-+#endif
- #ifdef SVR4
- #include <sys/mkdev.h>
- #endif /* SVR4 */
-
- #define TIMEOUT_READ 5
-
--#ifndef __FreeBSD__
--#ifndef __GLIBC__
-+#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) && !defined(__GLIBC__)
- extern char *sys_errlist[];
- #endif
--#endif
- extern char *xtel_basename (), *next_token ();
-
- static int fdl;
@@ -290,7 +292,11 @@ char **av;
check_and_lock (cp);
diff --git a/comms/xtel/patches/patch-af b/comms/xtel/patches/patch-af
deleted file mode 100644
index c4b24aa5a23..00000000000
--- a/comms/xtel/patches/patch-af
+++ /dev/null
@@ -1,255 +0,0 @@
-$NetBSD: patch-af,v 1.1.1.1 2002/01/12 18:34:56 bouyer Exp $
-
---- modem.c.orig Tue Feb 13 10:39:23 2001
-+++ modem.c Sat Jan 12 19:27:52 2002
-@@ -32,7 +32,6 @@
- #include <sgtty.h>
- #else
- #ifdef USE_TERMIOS
--#include <sys/ioctl.h>
- #include <termios.h>
- #else
- #include <termio.h>
-@@ -44,6 +43,11 @@
- #ifdef USE_SYSLOG
- #include <syslog.h>
- #endif /* USE_SYSLOG */
-+#ifdef __STDC__
-+#include <stdarg.h>
-+#else
-+#include <varargs.h>
-+#endif
-
- #include "demon.h"
- #include "globald.h"
-@@ -87,55 +91,56 @@
- #endif
- }
-
--/* Syslog or not syslog ? */
--#ifdef USE_SYSLOG
--void log_debug (fmt, p1, p2, p3, p4, p5, p6, p7)
--char *fmt;
--int p1, p2, p3, p4, p5, p6, p7;
--{
-- char msg[256];
--
-- sprintf (msg, fmt, p1, p2, p3, p4, p5, p6, p7);
-- syslog (LOG_INFO, msg);
--}
--
--void log_err (s)
--char *s;
--{
-- syslog (LOG_ERR, s);
--}
-+#ifdef __STDC__
-+void log_debug(const char *fmt, ...)
- #else
--void log_debug (fmt, p1, p2, p3, p4, p5, p6, p7)
--char *fmt;
--int p1, p2, p3, p4, p5, p6, p7;
-+void log_debug(va_alist)
-+ va_dcl
-+#endif
- {
-+ va_list ap;
-+#ifdef __STDC__
-+ va_start(ap, fmt);
-+#else
-+ const char *fmt;
-+ va_start(ap);
-+ fmt = va_arg(ap, const char *);
-+#endif
-+#ifdef USE_SYSLOG
-+ vsyslog(LOG_INFO, fmt, ap);
-+#else
- fprintf (fp_console, "%s[%d] ", prefix, getpid());
-- fprintf (fp_console, fmt, p1, p2, p3, p4, p5, p6, p7);
-+ vfprintf (fp_console, fmt, ap);
- fprintf (fp_console, "\n\r");
-+#endif
-+ va_end(ap);
- }
-
--void log_err (s)
--char *s;
-+#ifdef __STDC__
-+void log_err(const char *fmt, ...)
-+#else
-+void log_err(va_alist)
-+ va_dcl
-+#endif
- {
-+ va_list ap;
-+#ifdef __STDC__
-+ va_start(ap, fmt);
-+#else
-+ const char *fmt;
-+ va_start(ap);
-+ fmt = va_arg(ap, const char *);
-+#endif
-+#ifdef USE_SYSLOG
-+ vsyslog(LOG_ERR, fmt, ap);
-+#else
- fprintf (fp_console, "%s[%d] ", prefix, getpid());
--
-- while (*s) {
-- if (*s != '%')
-- fputc (*s, fp_console);
-- else if (*(s+1) == 'm') {
-- fprintf (fp_console, "%s", sys_errlist[errno]);
-- s++;
-- }
--
-- s++;
-- }
--
-+ vfprintf (fp_console, fmt, ap);
- fprintf (fp_console, "\n\r");
-+#endif
-+ va_end(ap);
- }
-
--#endif /* USE_SYSLOG */
--
--
- /* Envoi d'une commande MODEM */
- static void writemodem (fd, buf, n)
- int fd;
-@@ -165,8 +170,10 @@
- #else
-
- #ifdef USE_TERMIOS
-- ioctl (fd, TIOCGETA, &term);
-- memcpy ((char *)&term_sauve, (char *)&term, sizeof(struct termios));
-+ if (tcgetattr(fd, &term) < 0) {
-+ log_err("tcgetattr: %s", strerror(errno));
-+ exit(1);
-+ }
- #else
- ioctl (fd, TCGETA, &term);
- memcpy ((char *)&term_sauve, (char *)&term, sizeof(struct termio));
-@@ -174,11 +181,21 @@
-
- /* Parametrage de la ligne */
- term.c_cc[VMIN] = 1;
-+#ifdef __NetBSD__
-+ term.c_cc[VTIME] = term.c_cc[VKILL] = term.c_cc[VERASE] = 0;
-+ term.c_iflag = IGNBRK | IGNPAR;
-+ term.c_oflag = term.c_lflag = 0;
-+#else
- term.c_cc[VTIME] = 0;
- term.c_iflag &= ~(IXON|IXOFF|ICRNL);
- term.c_lflag &= ~(ICANON|ISIG|ECHO|IEXTEN);
-+#endif
-
- #ifdef USE_TERMIOS
-+#ifdef __NetBSD__
-+ term.c_cflag = (CREAD | HUPCL | CRTSCTS);
-+ cfsetspeed( &term, speed);
-+#else
- /*
- * FreeBSD 1.1 (Beta) n'a pas l'air d'apprecier qu'on mette clocal
- * a 0... (blocage au premier write sur /dev/cua01)
-@@ -186,6 +203,7 @@
- term.c_cflag &= ~(CSIZE|CSTOPB);
- term.c_cflag |= (CREAD|HUPCL);
- term.c_ispeed = term.c_ospeed = speed;
-+#endif /* __NetBSD__ */
- #else
- term.c_cflag &= ~(CSIZE|CBAUD|CLOCAL);
-
-@@ -223,10 +241,12 @@
- #endif /* sun */
-
- #ifdef USE_TERMIOS
-+#ifndef __NetBSD__
- term.c_iflag &= ~(IGNCR|ICRNL|INLCR|IMAXBEL);
- term.c_iflag |= (ISTRIP|INPCK);
- term.c_lflag &= ~(ECHOCTL|IEXTEN);
- term.c_oflag &= ~OPOST;
-+#endif /* __NetBSD__ */
- #endif /* USE_TERMIOS */
-
- /* Cas du Minitel 1/2 */
-@@ -235,7 +255,10 @@
-
- /* Affectation des parametres */
- #ifdef USE_TERMIOS
-- ioctl (fd, TIOCSETA, &term);
-+ if (tcsetattr (fd, TCSANOW, &term) < 0) {
-+ log_err("tcsetattr(1):%s", strerror(errno));
-+ exit(1);
-+ }
- #else
- ioctl (fd, TCSETA, &term);
- #endif /* USE_TERMIOS */
-@@ -256,10 +279,11 @@
- ioctl (fd, TIOCSETP, &term_sauve);
- #else
- #ifdef USE_TERMIOS
-- term.c_ispeed = B0;
-- term.c_ospeed = B0;
-- ioctl (fd, TIOCSETAW, &term);
-- ioctl (fd, TIOCSETA, &term_sauve);
-+ cfsetspeed(&term_sauve, B0);
-+ if (tcsetattr (fd, TCSADRAIN, &term_sauve) < 0) {
-+ log_err("tcsetattr(2):%s", strerror(errno));
-+ exit(1);
-+ }
- #else
- term.c_cflag &= ~CBAUD;
- term.c_cflag |= B0;
-@@ -285,7 +309,7 @@
- int reply_size;
- {
- fd_set a_lire, t_a_lire;
-- int i, erreur, fin, nbread, cmodem;
-+ int i, erreur, fin, nbread, cmodem = 0;
- char *pt_chat, c, *q;
-
- delai_maxi.tv_sec = tmax;
-@@ -307,14 +331,20 @@
- * (comme le Hayes Optima par exemple)...
- */
- #ifdef USE_TERMIOS
-- ioctl (fd, TCIOCGETA, &term);
-+ if (tcgetattr(fd, &term) < 0) {
-+ log_err("tcgetattr: %s", strerror(errno));
-+ exit(1);
-+ }
- #else
- ioctl (fd, TCGETA, &term);
- #endif /* USE_TERMIOS */
-- if ((term.c_cflag | CLOCAL) == 0) {
-+ if ((term.c_cflag & CLOCAL) == 0) {
- term.c_cflag |= CLOCAL;
- #ifdef USE_TERMIOS
-- ioctl (fd, TCIOCSETA, &term);
-+ if (tcsetattr (fd, TCSANOW, &term) < 0) {
-+ log_err("tcsetattr(3):%s", strerror(errno));
-+ exit(1);
-+ }
- #else
- ioctl (fd, TCSETA, &term);
- #endif /* USE_TERMIOS */
-@@ -586,13 +616,17 @@
- fin = ((erreur != 0 || *(pt_chat-1) == 0) ? 1 : 0);
- usleep (30000);
- }
-+ sleep(3);
-
- #ifndef NO_TERMIO
- /* Repasse en controle modem */
- if (cmodem) {
- term.c_cflag &= ~CLOCAL;
- #ifdef USE_TERMIOS
-- ioctl (fd, TCIOCSETA, &term);
-+ if (tcsetattr (fd, TCSANOW, &term) < 0) {
-+ log_err("tcsetattr(4):%s", strerror(errno));
-+ exit(1);
-+ }
- #else
- ioctl (fd, TCSETA, &term);
- #endif /* USE_TERMIOS */
diff --git a/comms/xtel/patches/patch-ag b/comms/xtel/patches/patch-ag
deleted file mode 100644
index cb4979d92b1..00000000000
--- a/comms/xtel/patches/patch-ag
+++ /dev/null
@@ -1,62 +0,0 @@
-$NetBSD: patch-ag,v 1.1.1.1 2002/01/12 18:34:56 bouyer Exp $
-
---- xteld.c.orig Sat Jan 12 19:24:14 2002
-+++ xteld.c Sat Jan 12 19:25:38 2002
-@@ -624,12 +624,12 @@
- flag_crlf = True;
-
- if (pipe (tuyau_in) < 0) {
-- log_err ("pipe: tuyau_in: %m");
-+ log_err ("pipe: tuyau_in: %s", strerror(errno));
- exit (1);
- }
-
- if (pipe (tuyau_out) < 0) {
-- log_err ("pipe: tuyau_out: %m");
-+ log_err ("pipe: tuyau_out: %s", strerror(errno));
- exit (1);
- }
-
-@@ -674,7 +674,7 @@
- #endif
-
- if (execvp (code_teletel, Argv) < 0) {
-- log_err ("execlp: %m");
-+ log_err ("execlp: %s", strerror(errno));
- exit (1);
- }
- }
-@@ -1060,7 +1060,7 @@
- return 0;
-
- err:
-- log_err ("read: %m");
-+ log_err ("read: %s", strerror(errno));
- return -1;
- }
-
-@@ -1079,13 +1079,13 @@
- /* Adresse du client */
- len = sizeof (client);
- if (getpeername (XTELD_INPUT, (struct sockaddr *) &client, &len) < 0) {
-- log_err ("getpeername: %m");
-+ log_err ("getpeername: %s", strerror(errno));
- }
- else {
- struct hostent *h;
-
- if ((h = gethostbyaddr ((char *)&client.sin_addr, sizeof(client.sin_addr), AF_INET)) == NULL) {
-- log_err ("gethostbyaddr: %m");
-+ log_err ("gethostbyaddr: %s", strerror(errno));
- return NULL;
- }
- else
-@@ -1391,7 +1391,7 @@
- return 1;
-
- err:
-- log_err ("read: %m");
-+ log_err ("read: %s", strerror(errno));
-
- return -1;
- }
diff --git a/comms/xtel/patches/patch-ah b/comms/xtel/patches/patch-ah
deleted file mode 100644
index 24d28356e8d..00000000000
--- a/comms/xtel/patches/patch-ah
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ah,v 1.1 2007/08/08 16:50:26 joerg Exp $
-
---- Videotex/Videotex.c.orig 2007-08-08 16:22:41.000000000 +0000
-+++ Videotex/Videotex.c
-@@ -22,7 +22,7 @@ static char rcsid[] = "$Id: Videotex.c,v
- /*
- * Widget Videotex: VideotexWidgetClass
- */
--#include <malloc.h>
-+#include <stdlib.h>
- #include <ctype.h>
- #include <X11/IntrinsicP.h>
- #include <X11/StringDefs.h>