diff options
author | dholland <dholland@pkgsrc.org> | 2014-09-12 04:17:38 +0000 |
---|---|---|
committer | dholland <dholland@pkgsrc.org> | 2014-09-12 04:17:38 +0000 |
commit | 23349e82bf9579cd0fc2173d1d0a221e3a6713a6 (patch) | |
tree | 9af9c6f418934cd2f1bfbf2c54b80afb91309eac | |
parent | 72dea0e57550eed297901edc009b01161b34cf38 (diff) | |
download | pkgsrc-23349e82bf9579cd0fc2173d1d0a221e3a6713a6.tar.gz |
Use strerror, not sys_errlist. Probably fixes Solaris build and others.
While here patch some other legacy C issues as well.
-rw-r--r-- | news/xrn/distinfo | 6 | ||||
-rw-r--r-- | news/xrn/patches/patch-ac | 20 | ||||
-rw-r--r-- | news/xrn/patches/patch-clientlib.c | 32 | ||||
-rw-r--r-- | news/xrn/patches/patch-compose.c | 43 |
4 files changed, 92 insertions, 9 deletions
diff --git a/news/xrn/distinfo b/news/xrn/distinfo index d91e5760c5d..17d6ff75666 100644 --- a/news/xrn/distinfo +++ b/news/xrn/distinfo @@ -1,13 +1,15 @@ -$NetBSD: distinfo,v 1.7 2012/05/03 09:08:11 obache Exp $ +$NetBSD: distinfo,v 1.8 2014/09/12 04:17:38 dholland Exp $ SHA1 (xrn/9.01.tgz) = a560d07629efaa907ae01527192dd474e11555ad RMD160 (xrn/9.01.tgz) = c98d26e17fd8c511d9272378a54943ef9a453d3a Size (xrn/9.01.tgz) = 357098 bytes SHA1 (patch-aa) = 5560da41c2ef1d077fcc696f954bca7528d577af SHA1 (patch-ab) = 8e44803fcbffc0985a68479bf8f177793c1d857f -SHA1 (patch-ac) = ffbc0e5d529add2fae06c14d93d539fb15a13c8c +SHA1 (patch-ac) = 4113548f1b957aef9748571b05f4ee03a8c302ca SHA1 (patch-ad) = b4b88f463cfab63500d284620fb32a6a418fd6ca SHA1 (patch-ae) = 3a1eef86f89acaa3b0bb6a78bfbd8d7c4be969d2 SHA1 (patch-af) = 849b86cac73328cf2a773bc289f97c3e21456f71 SHA1 (patch-ag) = f42c743a45c68b7702494399dbf40c3ac9cefd13 +SHA1 (patch-clientlib.c) = 21ed52e3648803572be6b7ddb6c67fb546418364 +SHA1 (patch-compose.c) = 3f98c97236401aeb8db9e7c560a9c12d46d2a95e SHA1 (patch-rclex.l) = 9fa36815375c1d389cbf286cd15a8322d7006209 diff --git a/news/xrn/patches/patch-ac b/news/xrn/patches/patch-ac index 2b62fb44313..b7a37ec5910 100644 --- a/news/xrn/patches/patch-ac +++ b/news/xrn/patches/patch-ac @@ -1,13 +1,19 @@ -$NetBSD: patch-ac,v 1.1 2006/01/02 23:33:41 joerg Exp $ +$NetBSD: patch-ac,v 1.2 2014/09/12 04:17:38 dholland Exp $ ---- error_hnds.h.orig 2006-01-02 23:27:55.000000000 +0000 +Use strerror, not sys_errlist. + +--- error_hnds.h.orig 1997-12-18 13:04:04.000000000 +0000 +++ error_hnds.h -@@ -54,7 +54,7 @@ extern void ehInstallErrorHandlers _ARGU +@@ -54,11 +54,6 @@ extern void ehInstallErrorHandlers _ARGU /* install the signal handlers */ extern void ehInstallSignalHandlers _ARGUMENTS((void)); -#if !defined(__GNU_LIBRARY__) && !defined(__NetBSD__) && !defined(__FreeBSD__) -+#if !defined(__GNU_LIBRARY__) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__DragonFly__) - extern int errno, sys_nerr; - extern char *sys_errlist[]; - #endif +-extern int errno, sys_nerr; +-extern char *sys_errlist[]; +-#endif +- +-#define errmsg(a) ((a < sys_nerr) ? sys_errlist[a] : "unknown error") ++#define errmsg(a) strerror(a) + + #endif /* ERROR_HANDLERS_H */ diff --git a/news/xrn/patches/patch-clientlib.c b/news/xrn/patches/patch-clientlib.c new file mode 100644 index 00000000000..20aa9a9b965 --- /dev/null +++ b/news/xrn/patches/patch-clientlib.c @@ -0,0 +1,32 @@ +$NetBSD: patch-clientlib.c,v 1.1 2014/09/12 04:17:38 dholland Exp $ + +- Use standard headers. +- Silence compiler warning about braces. + +--- clientlib.c~ 1997-06-05 11:11:40.000000000 +0000 ++++ clientlib.c +@@ -30,6 +30,7 @@ static char XRNrcsid[] = "$Id: clientlib + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + ++#include <stdlib.h> + #include "config.h" + #include "utils.h" + #include <X11/Xos.h> +@@ -308,7 +309,7 @@ static int get_tcp_socket(machine) + + (void) memset((char *) &sin, 0, sizeof(sin)); + +- if (! port) ++ if (! port) { + if (nntp_port) + port = htons(atoi(nntp_port)); + else { +@@ -318,6 +319,7 @@ static int get_tcp_socket(machine) + } + port = sp->s_port; + } ++ } + sin.sin_port = port; + + if ((sin.sin_addr.s_addr = inet_addr(machine)) != -1) { diff --git a/news/xrn/patches/patch-compose.c b/news/xrn/patches/patch-compose.c new file mode 100644 index 00000000000..0f81fd8001b --- /dev/null +++ b/news/xrn/patches/patch-compose.c @@ -0,0 +1,43 @@ +$NetBSD: patch-compose.c,v 1.1 2014/09/12 04:17:38 dholland Exp $ + +- Use standard headers. +- Silence compiler warning about format string. +- Call varargs functions correctly. + +--- compose.c~ 1998-05-14 01:29:15.000000000 +0000 ++++ compose.c +@@ -38,6 +38,7 @@ static char XRNrcsid[] = "$Id: compose.c + #include <ctype.h> + #include <errno.h> + #include <sys/file.h> ++#include <stdlib.h> + #include <signal.h> + #include <assert.h> + #include "error_hnds.h" +@@ -1907,7 +1908,7 @@ getIncludedArticleText() + + if (PostingMode == FORWARD) { + int line_size; +- (void) sprintf(input, FORWARDED_ARTICLE_END_MSG); ++ (void) sprintf(input, "%s", FORWARDED_ARTICLE_END_MSG); + line_size = strlen(input); + if (prefix_size + line_size > size - cur_size - 1) { + /* See above */ +@@ -2334,7 +2335,7 @@ Call_Editor( + for (i = 3; i < maxdesc; i++) { + (void) close(i); + } +- (void) execl("/bin/sh", "sh", "-c", buffer, 0); ++ (void) execl("/bin/sh", "sh", "-c", buffer, (const char *)NULL); + (void) fprintf(stderr, ERROR_EXEC_FAILED_MSG, buffer); + (void) _exit(127); + } +@@ -2902,7 +2903,7 @@ static void switch_message_type(Header) + return; + + title = followup_or_reply_title(Header, followup, reply); +- XtVaSetValues(ComposeLabel, XtNlabel, title, 0); ++ XtVaSetValues(ComposeLabel, XtNlabel, title, (const void *)NULL); + + headers = update_headers(Header, False, followup, reply); + addField(headers); |