From kcwu@kcwu.dyndns.org  Sat Dec 14 16:45:39 2002
Return-Path: <kcwu@kcwu.dyndns.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id A9A5337B401
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 14 Dec 2002 16:45:39 -0800 (PST)
Received: from kcwu.dyndns.org (u142-187.u61-70.giga.net.tw [61.70.142.187])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 5D89743ED8
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 14 Dec 2002 16:45:38 -0800 (PST)
	(envelope-from kcwu@kcwu.dyndns.org)
Received: from kcwu.dyndns.org (m722 [127.0.0.1])
	by kcwu.dyndns.org (8.12.6/8.12.6) with ESMTP id gBF0jU83071664
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 15 Dec 2002 08:45:36 +0800 (CST)
	(envelope-from kcwu@kcwu.dyndns.org)
Received: (from kcwu@localhost)
	by kcwu.dyndns.org (8.12.6/8.12.6/Submit) id gBF0jQer071663;
	Sun, 15 Dec 2002 08:45:26 +0800 (CST)
Message-Id: <200212150045.gBF0jQer071663@kcwu.dyndns.org>
Date: Sun, 15 Dec 2002 08:45:26 +0800 (CST)
From: Kuang-che Wu <kcwu@kcwu.dyndns.org>
Reply-To: Kuang-che Wu <kcwu@kcwu.dyndns.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Fix build on -current for misc/dirtree
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         46263
>Category:       ports
>Synopsis:       Fix build on -current for misc/dirtree
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Dec 14 16:50:01 PST 2002
>Closed-Date:    Sat Dec 14 18:38:55 PST 2002
>Last-Modified:  Sat Dec 14 18:38:55 PST 2002
>Originator:     Kuang-che Wu
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD m722 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Tue Nov 26 18:00:18 CST 2002 root@m722:/usr/obj/usr/src/sys/M722 i386


	
>Description:
	Fix build on -current for misc/dirtree
	
>How-To-Repeat:
	
>Fix:
diff -urN dirtree/Makefile dirtree.new/Makefile
--- dirtree/Makefile	Sun Dec 15 08:42:50 2002
+++ dirtree.new/Makefile	Sun Dec 15 08:43:08 2002
@@ -23,10 +23,4 @@
 
 MAN1=	dirtree.1
 
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} >= 500035
-BROKEN=		"Does not compile on 5.0"
-.endif
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff -urN dirtree/files/patch-src::CppDir.cpp dirtree.new/files/patch-src::CppDir.cpp
--- dirtree/files/patch-src::CppDir.cpp	Thu Jan  1 08:00:00 1970
+++ dirtree.new/files/patch-src::CppDir.cpp	Sun Dec 15 08:42:39 2002
@@ -0,0 +1,17 @@
+--- src/CppDir.cpp.orig	Sun Dec 15 08:31:02 2002
++++ src/CppDir.cpp	Sun Dec 15 08:34:44 2002
+@@ -1,4 +1,5 @@
+ #include "CppDir.hh"
++#include <ostream>
+ 
+ #ifdef LINUX
+ #  include <sys/stat.h>
+@@ -152,7 +153,7 @@
+     }
+ }
+ 
+-ostream& CppDir::operator << ( ostream& out , File::Type type )
++std::ostream& CppDir::operator << ( std::ostream& out , File::Type type )
+ {
+   switch( type )
+     {
diff -urN dirtree/files/patch-src::CppDir.hh dirtree.new/files/patch-src::CppDir.hh
--- dirtree/files/patch-src::CppDir.hh	Thu Jan  1 08:00:00 1970
+++ dirtree.new/files/patch-src::CppDir.hh	Sun Dec 15 08:42:39 2002
@@ -0,0 +1,11 @@
+--- src/CppDir.hh.orig	Sun Dec 15 08:32:48 2002
++++ src/CppDir.hh	Sun Dec 15 08:35:12 2002
+@@ -95,7 +95,7 @@
+       void close(); ///< closes the directory
+     };
+ 
+-  ostream& operator << ( ostream& out , File::Type type );
++  std::ostream& operator << ( std::ostream& out , File::Type type );
+   std::string concat_dir( std::string path, std::string name );
+ }
+ 
diff -urN dirtree/files/patch-src::xgetcwd.cpp dirtree.new/files/patch-src::xgetcwd.cpp
--- dirtree/files/patch-src::xgetcwd.cpp	Thu Jan  1 08:00:00 1970
+++ dirtree.new/files/patch-src::xgetcwd.cpp	Sun Dec 15 08:42:39 2002
@@ -0,0 +1,16 @@
+--- src/xgetcwd.cpp.orig	Sun Dec 15 08:39:34 2002
++++ src/xgetcwd.cpp	Sun Dec 15 08:39:36 2002
+@@ -11,10 +11,10 @@
+    function returns a string */
+ std::string xgetcwd()
+ {
+-  const unsigned int PATH_MAX = 100;
+-  const unsigned int PATH_INC = PATH_MAX;
++  const unsigned int PATHMAX = 100;
++  const unsigned int PATH_INC = PATHMAX;
+ 
+-  unsigned int path_max = PATH_MAX;
++  unsigned int path_max = PATHMAX;
+   path_max += 2;		/* The getcwd docs say to do this. */
+ 
+   char* cwd = static_cast<char*>(malloc(path_max));

	


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: edwin 
State-Changed-When: Sat Dec 14 18:37:46 PST 2002 
State-Changed-Why:  
A similar fix has been supplied by perky@. 
Thanks anyway! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=46263 
>Unformatted:
