diff options
author | Mikhail Teterin <mi@FreeBSD.org> | 2013-04-23 21:56:07 +0000 |
---|---|---|
committer | Mikhail Teterin <mi@FreeBSD.org> | 2013-04-23 21:56:07 +0000 |
commit | be029966f113da45e2c5bd83b84d6eb736d4ae02 (patch) | |
tree | ebd543f2fde5e5dd7ea1e4ad5a2364502b355dd0 /net/rmsg | |
parent | c4ddb35931a269cb73450c20992672aef8cfb6dc (diff) | |
download | ports-be029966f113da45e2c5bd83b84d6eb736d4ae02.tar.gz ports-be029966f113da45e2c5bd83b84d6eb736d4ae02.zip |
Notes
Diffstat (limited to 'net/rmsg')
-rw-r--r-- | net/rmsg/Makefile | 8 | ||||
-rw-r--r-- | net/rmsg/files/patch-ab | 44 | ||||
-rw-r--r-- | net/rmsg/files/patch-ac | 25 | ||||
-rw-r--r-- | net/rmsg/files/patch-ae | 41 | ||||
-rw-r--r-- | net/rmsg/files/patch-rmsg.c | 36 | ||||
-rw-r--r-- | net/rmsg/files/patch-server.c | 63 | ||||
-rw-r--r-- | net/rmsg/files/patch-xdr | 16 |
7 files changed, 197 insertions, 36 deletions
diff --git a/net/rmsg/Makefile b/net/rmsg/Makefile index 7d2746e1469c..fa60cc60b5e8 100644 --- a/net/rmsg/Makefile +++ b/net/rmsg/Makefile @@ -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> diff --git a/net/rmsg/files/patch-ab b/net/rmsg/files/patch-ab index a53bb61bfdba..bc83dd37e9c3 100644 --- a/net/rmsg/files/patch-ab +++ b/net/rmsg/files/patch-ab @@ -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; diff --git a/net/rmsg/files/patch-ac b/net/rmsg/files/patch-ac index 201ca5602b93..5defeda51870 100644 --- a/net/rmsg/files/patch-ac +++ b/net/rmsg/files/patch-ac @@ -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 */ + }; + diff --git a/net/rmsg/files/patch-ae b/net/rmsg/files/patch-ae index e858dbafe6f4..4661d739ebc9 100644 --- a/net/rmsg/files/patch-ae +++ b/net/rmsg/files/patch-ae @@ -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 */ diff --git a/net/rmsg/files/patch-rmsg.c b/net/rmsg/files/patch-rmsg.c new file mode 100644 index 000000000000..91e89437a4ad --- /dev/null +++ b/net/rmsg/files/patch-rmsg.c @@ -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; + diff --git a/net/rmsg/files/patch-server.c b/net/rmsg/files/patch-server.c index 9d17c6e74af5..afc9a3cb814e 100644 --- a/net/rmsg/files/patch-server.c +++ b/net/rmsg/files/patch-server.c @@ -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); diff --git a/net/rmsg/files/patch-xdr b/net/rmsg/files/patch-xdr new file mode 100644 index 000000000000..85ff46810f25 --- /dev/null +++ b/net/rmsg/files/patch-xdr @@ -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 *); |