From ed@hoeg.nl  Mon Mar 26 12:48:04 2007
Return-Path: <ed@hoeg.nl>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 129E316A401
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 26 Mar 2007 12:48:04 +0000 (UTC)
	(envelope-from ed@hoeg.nl)
Received: from palm.hoeg.nl (palm.hoeg.nl [83.98.131.212])
	by mx1.freebsd.org (Postfix) with ESMTP id D2ED713C468
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 26 Mar 2007 12:48:03 +0000 (UTC)
	(envelope-from ed@hoeg.nl)
Received: by palm.hoeg.nl (Postfix, from userid 1000)
	id E1A851CC3A; Mon, 26 Mar 2007 14:48:02 +0200 (CEST)
Message-Id: <20070326124802.E1A851CC3A@palm.hoeg.nl>
Date: Mon, 26 Mar 2007 14:48:02 +0200 (CEST)
From: Ed Schouten <ed@fxq.nl>
Reply-To: Ed Schouten <ed@fxq.nl>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [net/rmsg] Remove useless inclusion of <sgtty.h>
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         110851
>Category:       ports
>Synopsis:       [net/rmsg] Remove useless inclusion of <sgtty.h>
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    miwi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 26 12:50:06 GMT 2007
>Closed-Date:    Tue Mar 27 07:38:54 GMT 2007
>Last-Modified:  Tue Mar 27 07:40:03 GMT 2007
>Originator:     Ed Schouten
>Release:        FreeBSD 6.2-STABLE i386
>Organization:
>Environment:
System: FreeBSD palm.hoeg.nl 6.2-STABLE FreeBSD 6.2-STABLE #0: Sun Feb 11 22:32:09 CET 2007 root@palm.hoeg.nl:/usr/obj/usr/src/sys/PALM i386
>Description:
The net/rmsg application includes the <sgtty.h> header file, but doesn't
use it anyway. The files `patch-ad' and `patch-server.c' both patch the
same file. The following patch merges both files to `patch-server.c' and
also removes the `#include <sgtty.h>' line.
>How-To-Repeat:
>Fix:
Please apply the patch below. Do not forget to remove filed/patch-ad
after applying!

--- net/rmsg/files/patch-server.c	Sun Jun 16 11:13:29 2002
+++ net/rmsg/files/patch-server.c	Mon Mar 26 14:42:25 2007
@@ -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);
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->miwi 
Responsible-Changed-By: miwi 
Responsible-Changed-When: Mon Mar 26 12:59:29 UTC 2007 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=110851 
State-Changed-From-To: open->closed 
State-Changed-By: miwi 
State-Changed-When: Tue Mar 27 07:38:53 UTC 2007 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=110851 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/110851: commit references a PR
Date: Tue, 27 Mar 2007 07:38:02 +0000 (UTC)

 miwi        2007-03-27 07:37:56 UTC
 
   FreeBSD ports repository
 
   Modified files:
     net/rmsg/files       patch-server.c 
   Removed files:
     net/rmsg/files       patch-ad 
   Log:
   - Remove useless inclusion of <sgtty.h>
   
   PR:             110851
   Submitted by:    Ed Schouten <ed@fxq.nl>
   
   Revision  Changes    Path
   1.3       +0 -66     ports/net/rmsg/files/patch-ad (dead)
   1.2       +42 -2     ports/net/rmsg/files/patch-server.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
