From nobody@FreeBSD.org  Sun Dec  9 11:20:17 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 1A15332F
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  9 Dec 2012 11:20:17 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 00F5E8FC0C
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  9 Dec 2012 11:20:17 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id qB9BKGgA025893
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 9 Dec 2012 11:20:16 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id qB9BKG5O025892;
	Sun, 9 Dec 2012 11:20:16 GMT
	(envelope-from nobody)
Message-Id: <201212091120.qB9BKG5O025892@red.freebsd.org>
Date: Sun, 9 Dec 2012 11:20:16 GMT
From: Rene Ladan <rene@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: editors/hte does not build with clang
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         174294
>Category:       ports
>Synopsis:       editors/hte does not build with clang
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    mva
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Dec 09 11:30:00 UTC 2012
>Closed-Date:    Mon Dec 17 09:58:41 UTC 2012
>Last-Modified:  Mon Dec 17 09:58:41 UTC 2012
>Originator:     Rene Ladan
>Release:        FreeBSD 10.0/amd64
>Organization:
>Environment:
FreeBSD acer 10.0-CURRENT FreeBSD 10.0-CURRENT #5 r243869: Wed Dec  5 10:30:44 CET 2012     rene@acer:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
editors/hte does not build with clang as cc;


cc -DHAVE_CONFIG_H -I.   -I./analyser -I./asm -I./info -I./io/posix -I./io -I./output -I./eval -I. -I/usr/local/include  -O2 -pipe -march=core2
c++ -DHAVE_CONFIG_H -I.   -I./analyser -I./asm -I./info -I./io/posix -I./io -I./output -I./eval -I. -I/usr/local/include  -O2 -pipe -march=core
mv -f .deps/htdoc.Tpo .deps/htdoc.Po
c++ -DHAVE_CONFIG_H -I.   -I./analyser -I./asm -I./info -I./io/posix -I./io -I./output -I./eval -I. -I/usr/local/include  -O2 -pipe -march=core
htapp.cc:768:10: warning: cast to 'void *' from smaller integer type 'uint' (aka 'unsigned int') [-Wint-to-pointer-cast]
                return (void*)(project->count());
                       ^
htapp.cc:1880:9: error: redefinition of 'emfile'
                File *emfile = new LocalFile(f, IOAM_READ, FOM_EXISTS);
                      ^
htapp.cc:1876:8: note: previous definition is here
        File *emfile = NULL;
              ^
1 warning and 1 error generated.
gmake[1]: *** [htapp.o] Error 1

>How-To-Repeat:
on a recent CURRENT:
% cd /usr/ports/editors/hte
% make

>Fix:


Patch attached with submission follows:

Index: files/patch-htapp.cc
===================================================================
--- files/patch-htapp.cc	(revision 0)
+++ files/patch-htapp.cc	(working copy)
@@ -0,0 +1,11 @@
+--- htapp.cc.orig	2009-08-27 16:31:35.000000000 +0200
++++ htapp.cc	2012-12-09 12:16:23.000000000 +0100
+@@ -1877,7 +1877,7 @@
+ 	ht_ltextfile *tfile = NULL;
+ 	FileLayer *file = NULL;
+ 	try {
+-		File *emfile = new LocalFile(f, IOAM_READ, FOM_EXISTS);
++		emfile = new LocalFile(f, IOAM_READ, FOM_EXISTS);
+ 
+ 		if (!doFileChecks(emfile)) {
+ 			delete emfile;


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->mva 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sun Dec 9 11:30:10 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

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

From: =?ISO-8859-1?Q?Ren=E9_Ladan?= <rene@freebsd.org>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/174294: editors/hte does not build with clang
Date: Sun, 16 Dec 2012 17:09:14 +0100

 This appears to be a bug in clang itself. The fix is included in the
 next import, so this PR can be closed.
State-Changed-From-To: open->closed 
State-Changed-By: mva 
State-Changed-When: Mon Dec 17 09:58:40 UTC 2012 
State-Changed-Why:  
Closed on submitter's request. 

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