Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Apr 2013 21:56:07 +0000 (UTC)
From:      Mikhail Teterin <mi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r316395 - in head/net/rmsg: . files
Message-ID:  <201304232156.r3NLu7F9013865@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mi
Date: Tue Apr 23 21:56:07 2013
New Revision: 316395
URL: http://svnweb.freebsd.org/changeset/ports/316395

Log:
  Unbreak -- compiles here (9.1/amd64). While at it, patch the ancient
  code up so it compiles cleaner.

Added:
  head/net/rmsg/files/patch-rmsg.c   (contents, props changed)
  head/net/rmsg/files/patch-xdr   (contents, props changed)
Modified:
  head/net/rmsg/Makefile   (contents, props changed)
  head/net/rmsg/files/patch-ab   (contents, props changed)
  head/net/rmsg/files/patch-ac   (contents, props changed)
  head/net/rmsg/files/patch-ae   (contents, props changed)
  head/net/rmsg/files/patch-server.c   (contents, props changed)

Modified: head/net/rmsg/Makefile
==============================================================================
--- head/net/rmsg/Makefile	Tue Apr 23 21:47:49 2013	(r316394)
+++ head/net/rmsg/Makefile	Tue Apr 23 21:56:07 2013	(r316395)
@@ -17,10 +17,4 @@ WRKSRC=		${WRKDIR}/rmsg
 MAN1=		rmsg.1
 MAN8=		rmsgd.8
 
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} > 900007
-BROKEN=		fails to build with new utmpx
-.endif
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Modified: head/net/rmsg/files/patch-ab
==============================================================================
--- head/net/rmsg/files/patch-ab	Tue Apr 23 21:47:49 2013	(r316394)
+++ head/net/rmsg/files/patch-ab	Tue Apr 23 21:56:07 2013	(r316395)
@@ -1,8 +1,44 @@
-*** parser.c.orig	Sat Jun 26 23:04:41 1993
---- parser.c	Mon Oct  9 14:20:54 1995
+*** parser.c	Sat Jun 26 17:04:41 1993
+--- parser.c	Tue Apr 23 17:26:30 2013
+***************
+*** 11,22 ****
+   * Last modified: Sat Aug 20 18:47:54 1988
+   */
+  
+  #include <stdio.h>
+! #if defined(SVR4)
+! # include <string.h>
+! #else
+! # include <strings.h>
+! #endif /* SVR4 */
+  #include <pwd.h>
+  #include <ctype.h>
+  #include <sys/types.h>
+--- 11,19 ----
+   * Last modified: Sat Aug 20 18:47:54 1988
+   */
+  
++ #include <stdlib.h>
+  #include <stdio.h>
+! #include <string.h>
+  #include <pwd.h>
+  #include <ctype.h>
+  #include <sys/types.h>
+***************
+*** 71,79 ****
+  
+  /* end of config params */
+  
+- struct passwd *getpwnam();
+- char *malloc();
+- 
+  extern char *progname;
+  extern int debug;
+  
+--- 68,73 ----
 ***************
 *** 89,94 ****
---- 89,95 ----
+--- 83,89 ----
   char *user;
   {
        struct passwd *pwd;
@@ -25,7 +61,7 @@
        }
   
        (void) strcpy (home, pwd->pw_dir);
---- 108,125 ----
+--- 102,119 ----
        a->next = 0;
        cur_ali = aliases = a;
   

Modified: head/net/rmsg/files/patch-ac
==============================================================================
--- head/net/rmsg/files/patch-ac	Tue Apr 23 21:47:49 2013	(r316394)
+++ head/net/rmsg/files/patch-ac	Tue Apr 23 21:56:07 2013	(r316395)
@@ -1,5 +1,5 @@
-*** rmsg.h.orig	Mon Oct  9 13:17:57 1995
---- rmsg.h	Mon Oct  9 13:31:18 1995
+*** rmsg.h	Sat Jun 26 17:05:59 1993
+--- rmsg.h	Tue Apr 23 17:18:46 2013
 ***************
 *** 11,16 ****
 --- 11,20 ----
@@ -14,8 +14,20 @@
   # define index strchr
   # define rindex strrchr
 ***************
-*** 46,54 ****
---- 50,67 ----
+*** 46,57 ****
+  #define PATHLEN 1024
+  #define LINELEN 1024
+  
+  #define UTMP "/etc/utmp"
+  #define UTMP_TTY_SIZE 8
+  #define UTMP_NAME_SIZE 8
+  
+  struct command {
+!      char *token;               /* Command name, e.g. msglast */
+       int (*function)();         /* Function which it is supposed to run */
+  };
+  
+--- 50,70 ----
   #define PATHLEN 1024
   #define LINELEN 1024
   
@@ -33,4 +45,7 @@
 + #endif
   
   struct command {
-       char *token;               /* Command name, e.g. msglast */
+!      const char *token;         /* Command name, e.g. msglast */
+       int (*function)();         /* Function which it is supposed to run */
+  };
+  

Modified: head/net/rmsg/files/patch-ae
==============================================================================
--- head/net/rmsg/files/patch-ae	Tue Apr 23 21:47:49 2013	(r316394)
+++ head/net/rmsg/files/patch-ae	Tue Apr 23 21:56:07 2013	(r316395)
@@ -1,11 +1,38 @@
---- misc.c.orig	Sun Sep 19 16:48:00 1999
-+++ misc.c	Sun Sep 19 16:48:12 1999
-@@ -24,7 +24,7 @@
+--- misc.c	1991-11-08 07:10:03.000000000 -0500
++++ misc.c	2013-04-23 17:48:12.000000000 -0400
+@@ -12,5 +12,7 @@
+  */
+ 
++#include <libgen.h>
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <sys/types.h>
+ #include <sys/types.h>
+@@ -21,18 +23,9 @@
+ #endif
+ #include <time.h>
++#include <rpc/rpc.h>
+ #include "rmsg.h"
  #include "rmsgprot.h"
  
- char *append(), *ctime(), *malloc(), *strcpy();
+-char *append(), *ctime(), *malloc(), *strcpy();
 -long time();
-+time_t time();
+-
+-char *basename(x)
+-char *x;
+-{
+-     char *tmp;
+-     if (tmp = rindex (x, '/')) tmp++;
+-     else tmp = x;
+-     return (tmp);
+-}
++static char *append();
  
- char *basename(x)
- char *x;
+ /*
+@@ -107,5 +100,5 @@
+                     break;
+                case 'd':
+-                    now = time((long *) NULL);
++                    now = time(NULL);
+                     p = ctime (&now);
+                     /* We don't want the cr */

Added: head/net/rmsg/files/patch-rmsg.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/rmsg/files/patch-rmsg.c	Tue Apr 23 21:56:07 2013	(r316395)
@@ -0,0 +1,36 @@
+--- rmsg.c	1992-11-23 16:27:09.000000000 -0500
++++ rmsg.c	2013-04-23 17:00:01.000000000 -0400
+@@ -30,4 +30,6 @@
+ #include <string.h>
+ #endif
++#include <stdlib.h>
++#include <unistd.h>
+ 
+ #include <pwd.h>
+@@ -42,5 +44,2 @@
+ #define HNLEN 200
+ 
+-int xdr_rmsg(), getopt();
+-char *getlogin(), *basename(), *index(), *rindex();
+-uid_t getuid();
+@@ -49,9 +51,4 @@
+ void report();
+ char *getalias(), *parseheader();
+-#ifdef SUNOS
+-void *malloc();
+-#else
+-char *malloc();
+-#endif
+ void storeout();
+ extern struct hostent *gethostbyname();
+@@ -72,9 +69,9 @@
+ #endif
+ 
++int
+ main(argc,argv)
+ int argc;
+ char **argv;
+ {
+-     extern char *optargs;
+      extern int optind;
+ 

Modified: head/net/rmsg/files/patch-server.c
==============================================================================
--- head/net/rmsg/files/patch-server.c	Tue Apr 23 21:47:49 2013	(r316394)
+++ head/net/rmsg/files/patch-server.c	Tue Apr 23 21:56:07 2013	(r316395)
@@ -1,6 +1,31 @@
---- server.c	Tue Jun  4 21:40:19 2002
-+++ server.c	Tue Jun  4 21:42:56 2002
-@@ -54,7 +54,6 @@
+--- server.c	1993-06-26 17:23:23.000000000 -0400
++++ server.c	2013-04-23 17:13:15.000000000 -0400
+@@ -24,7 +24,11 @@
+ 
+ #define SERVER
+ 
++#include <libgen.h>
+ #include <stdio.h>
++#include <stdlib.h>
++#include <sys/param.h>
++#include <unistd.h>
+ #if defined(SVR4)
+ # include <netinet/in.h>
+ #endif /* SVR4 */
+@@ -39,11 +43,7 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/file.h>
+-#if defined(SVR4)
+-# include <string.h>
+-#else
+-# include <strings.h>
+-#endif /* SVR4 */
++#include <string.h>
+ #include <sys/ioctl.h>
+ #ifndef USG5
+ #include <sys/wait.h>
+@@ -54,19 +54,12 @@
  #endif /* USG5 || SVR4 */
  
  #include <sys/param.h>
@@ -8,16 +33,21 @@
  #include <sys/types.h>
  #include <ctype.h>
  
-@@ -66,7 +65,7 @@
- #else
- char *malloc();
- #endif
+-int xdr_rmsg(), smsg();
++static void smsg(struct svc_req *, SVCXPRT *);
+ int tty_write(), dowrite();
+-char *basename(), *parseheader();
+-#ifdef SUNOS
+-void *malloc();
+-#else
+-char *malloc();
+-#endif
 -long time();
-+time_t time();
++char *parseheader();
  uid_t getuid();
  char *progname;
  int debug = 0;
-@@ -99,6 +98,9 @@
+@@ -99,6 +93,9 @@
       }
  
       if (! strcmp (basename (progname), "rmsgd")) {
@@ -27,7 +57,7 @@
            if (fork()) _exit(0);  /* make myself a daemon */
  #ifdef BSD
            fd = open("/dev/tty", O_RDWR);  /* disconnect from control tty */
-@@ -109,10 +111,11 @@
+@@ -109,10 +106,11 @@
  #else
            (void) setpgrp ();
  #endif
@@ -36,11 +66,18 @@
  
       else {
 -          (void) fprintf (stderr, "Starting from inetd not yet supported, rename me ase rmsgd and start\nfrom /etc/rc\n");
-+          (void) fprintf (stderr, "Starting from inetd not yet supported, rename me ase rmsgd and start\nfrom /etc/rc.local\n");
++          (void) fprintf (stderr, "Starting from inetd not yet supported, rename me as rmsgd and start\nfrom /etc/rc.local\n");
       }
  
       if (argc > 1)
-@@ -142,7 +145,7 @@
+@@ -136,13 +134,14 @@
+      exit(-3);
+ }
+ 
++void
+ smsg(rqstp, transp)
+ struct svc_req *rqstp;
+ SVCXPRT *transp;
  {
       int child, pid, fd;
       unsigned int retval = 0;
@@ -49,7 +86,7 @@
       int status;
  #else
       union wait status;
-@@ -198,6 +201,9 @@
+@@ -198,6 +197,9 @@
  #if defined(HPUX) || defined(SVR4)
            if (status & 0xff) retval = -1;
            else retval = ((status & 0xffff) >> 8);

Added: head/net/rmsg/files/patch-xdr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/rmsg/files/patch-xdr	Tue Apr 23 21:56:07 2013	(r316395)
@@ -0,0 +1,16 @@
+--- xdr.c	1988-08-20 12:56:53.000000000 -0400
++++ xdr.c	2013-04-23 17:35:08.000000000 -0400
+@@ -15,5 +15,3 @@
+ #include "rmsgprot.h"
+ 
+-int xdr_rmsg (xdrsp, rm)
++bool_t xdr_rmsg (XDR *xdrsp, struct rmsg_par *rm)
+-XDR *xdrsp;
+-struct rmsg_par *rm;
+--- rmsgprot.h	1988-08-20 12:56:51.000000000 -0400
++++ rmsgprot.h	2013-04-23 17:34:03.000000000 -0400
+@@ -29,2 +29,4 @@
+      char *msg;
+ };
++
++bool_t xdr_rmsg(XDR *, struct rmsg_par *);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304232156.r3NLu7F9013865>