aboutsummaryrefslogtreecommitdiff
path: root/net/rmsg
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2007-03-27 07:37:56 +0000
committerMartin Wilke <miwi@FreeBSD.org>2007-03-27 07:37:56 +0000
commit108a8c42e42b9ce6a618e80a94b7d3f17c92c48c (patch)
treed0eab904e8bdb9feed1591f4cbcc30d157169ac4 /net/rmsg
parent43f1cc100e99c595c121d3ddf767eeb11709df27 (diff)
downloadports-108a8c42e42b9ce6a618e80a94b7d3f17c92c48c.tar.gz
ports-108a8c42e42b9ce6a618e80a94b7d3f17c92c48c.zip
Notes
Diffstat (limited to 'net/rmsg')
-rw-r--r--net/rmsg/files/patch-ad66
-rw-r--r--net/rmsg/files/patch-server.c44
2 files changed, 42 insertions, 68 deletions
diff --git a/net/rmsg/files/patch-ad b/net/rmsg/files/patch-ad
deleted file mode 100644
index 023cb649b00f..000000000000
--- a/net/rmsg/files/patch-ad
+++ /dev/null
@@ -1,66 +0,0 @@
-*** server.c.orig Sat Jun 26 16:23:23 1993
---- server.c Sun Sep 19 16:48:42 1999
-***************
-*** 66,72 ****
- #else
- char *malloc();
- #endif
-! long time();
- uid_t getuid();
- char *progname;
- int debug = 0;
---- 66,72 ----
- #else
- char *malloc();
- #endif
-! time_t time();
- uid_t getuid();
- char *progname;
- int debug = 0;
-***************
-*** 99,118 ****
- }
-
- if (! strcmp (basename (progname), "rmsgd")) {
- if (fork()) _exit(0); /* make myself a daemon */
-! #ifdef BSD
- fd = open("/dev/tty", O_RDWR); /* disconnect from control tty */
- if (fd >= 0) {
- (void) ioctl(fd, TIOCNOTTY, (char *)0);
- (void) close(fd); /* close this, don't need any more*/
- }
-! #else
- (void) setpgrp ();
- #endif
- }
-
- else {
-! (void) fprintf (stderr, "Starting from inetd not yet supported, rename me ase rmsgd and start\nfrom /etc/rc\n");
- }
-
- if (argc > 1)
---- 99,122 ----
- }
-
- if (! strcmp (basename (progname), "rmsgd")) {
-+ #if (defined(BSD) && (BSD >= 199306))
-+ (void)daemon(0,0);
-+ #else
- if (fork()) _exit(0); /* make myself a daemon */
-! # ifdef BSD
- fd = open("/dev/tty", O_RDWR); /* disconnect from control tty */
- if (fd >= 0) {
- (void) ioctl(fd, TIOCNOTTY, (char *)0);
- (void) close(fd); /* close this, don't need any more*/
- }
-! # else
- (void) setpgrp ();
-+ # endif
- #endif
- }
-
- else {
-! (void) fprintf (stderr, "Starting from inetd not yet supported, rename me ase rmsgd and start\nfrom /etc/rc.local\n");
- }
-
- if (argc > 1)
diff --git a/net/rmsg/files/patch-server.c b/net/rmsg/files/patch-server.c
index 72aaf6245f0b..9d17c6e74af5 100644
--- a/net/rmsg/files/patch-server.c
+++ b/net/rmsg/files/patch-server.c
@@ -1,6 +1,46 @@
--- server.c Tue Jun 4 21:40:19 2002
+++ server.c Tue Jun 4 21:42:56 2002
-@@ -146,7 +146,7 @@
+@@ -54,7 +54,6 @@
+ #endif /* USG5 || SVR4 */
+
+ #include <sys/param.h>
+-#include <sgtty.h>
+ #include <sys/types.h>
+ #include <ctype.h>
+
+@@ -66,7 +65,7 @@
+ #else
+ char *malloc();
+ #endif
+-long time();
++time_t time();
+ uid_t getuid();
+ char *progname;
+ int debug = 0;
+@@ -99,6 +98,9 @@
+ }
+
+ if (! strcmp (basename (progname), "rmsgd")) {
++#if (defined(BSD) && (BSD >= 199306))
++ (void)daemon(0,0);
++#else
+ if (fork()) _exit(0); /* make myself a daemon */
+ #ifdef BSD
+ fd = open("/dev/tty", O_RDWR); /* disconnect from control tty */
+@@ -109,10 +111,11 @@
+ #else
+ (void) setpgrp ();
+ #endif
++#endif
+ }
+
+ 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");
+ }
+
+ if (argc > 1)
+@@ -142,7 +145,7 @@
{
int child, pid, fd;
unsigned int retval = 0;
@@ -9,7 +49,7 @@
int status;
#else
union wait status;
-@@ -202,6 +202,9 @@
+@@ -198,6 +201,9 @@
#if defined(HPUX) || defined(SVR4)
if (status & 0xff) retval = -1;
else retval = ((status & 0xffff) >> 8);