pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/news/xrn Use strerror, not sys_errlist. Probably fixes...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4888b49dc1fc
branches:  trunk
changeset: 639382:4888b49dc1fc
user:      dholland <dholland%pkgsrc.org@localhost>
date:      Fri Sep 12 04:17:38 2014 +0000

description:
Use strerror, not sys_errlist. Probably fixes Solaris build and others.
While here patch some other legacy C issues as well.

diffstat:

 news/xrn/distinfo                  |   6 +++-
 news/xrn/patches/patch-ac          |  20 +++++++++++------
 news/xrn/patches/patch-clientlib.c |  32 ++++++++++++++++++++++++++++
 news/xrn/patches/patch-compose.c   |  43 ++++++++++++++++++++++++++++++++++++++
 4 files changed, 92 insertions(+), 9 deletions(-)

diffs (134 lines):

diff -r e3ef4f920ecc -r 4888b49dc1fc news/xrn/distinfo
--- a/news/xrn/distinfo Fri Sep 12 03:57:32 2014 +0000
+++ b/news/xrn/distinfo Fri Sep 12 04:17:38 2014 +0000
@@ -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 -r e3ef4f920ecc -r 4888b49dc1fc news/xrn/patches/patch-ac
--- a/news/xrn/patches/patch-ac Fri Sep 12 03:57:32 2014 +0000
+++ b/news/xrn/patches/patch-ac Fri Sep 12 04:17:38 2014 +0000
@@ -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 $
+
+Use strerror, not sys_errlist.
 
---- error_hnds.h.orig  2006-01-02 23:27:55.000000000 +0000
+--- 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 -r e3ef4f920ecc -r 4888b49dc1fc news/xrn/patches/patch-clientlib.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/news/xrn/patches/patch-clientlib.c        Fri Sep 12 04:17:38 2014 +0000
@@ -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 -r e3ef4f920ecc -r 4888b49dc1fc news/xrn/patches/patch-compose.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/news/xrn/patches/patch-compose.c  Fri Sep 12 04:17:38 2014 +0000
@@ -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);



Home | Main Index | Thread Index | Old Index