From inyaoo@gmail.com  Thu Jul  7 09:31:18 2011
Return-Path: <inyaoo@gmail.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A32371065674
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  7 Jul 2011 09:31:18 +0000 (UTC)
	(envelope-from inyaoo@gmail.com)
Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182])
	by mx1.freebsd.org (Postfix) with ESMTP id 4038B8FC17
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  7 Jul 2011 09:31:17 +0000 (UTC)
Received: by wyg24 with SMTP id 24so688865wyg.13
        for <FreeBSD-gnats-submit@freebsd.org>; Thu, 07 Jul 2011 02:31:17 -0700 (PDT)
Received: by 10.227.96.140 with SMTP id h12mr486290wbn.95.1310031077037;
        Thu, 07 Jul 2011 02:31:17 -0700 (PDT)
Received: from localhost (politkovskaja.torservers.net [77.247.181.165])
        by mx.google.com with ESMTPS id em16sm1499728wbb.16.2011.07.07.02.31.15
        (version=SSLv3 cipher=OTHER);
        Thu, 07 Jul 2011 02:31:16 -0700 (PDT)
Message-Id: <861uy2bfof.fsf@gmail.com>
Date: Thu, 07 Jul 2011 13:31:12 +0400
From: Pan Tsu <inyaoo@gmail.com>
To: FreeBSD-gnats-submit@freebsd.org
Subject: [patch] www/firefox-devel: prune -DFREEBSD cruft in js

>Number:         158702
>Category:       ports
>Synopsis:       [patch] www/firefox-devel: prune -DFREEBSD cruft in js
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gecko
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul 07 09:40:05 UTC 2011
>Closed-Date:    Tue Aug 16 19:41:52 UTC 2011
>Last-Modified:  Tue Aug 16 19:41:52 UTC 2011
>Originator:     Pan Tsu
>Release:        FreeBSD 9.0-CURRENT amd64
>Organization:
>Environment:
gcc46
>Description:
I think the issue[1] with hidden pthread_attr_get_np is gcc specific.
pthread_np.h in config/system-headers should be enough to unhide it.

[1] http://docs.freebsd.org/cgi/mid.cgi?86mxposuzj.fsf
>How-To-Repeat:
1. build with gcc45 and basegcc
2. nm -D /usr/local/lib/firefox/libxul.so | grep 'pthread.*attr'
>Fix:
--- a.diff begins here ---
Index: www/firefox-aurora/files/patch-js-src-jsnativestack.cpp
===================================================================
--- www/firefox-aurora/files/patch-js-src-jsnativestack.cpp	(revision 587)
+++ www/firefox-aurora/files/patch-js-src-jsnativestack.cpp	(working copy)
@@ -1,12 +0,0 @@
---- js/src/jsnativestack.cpp.orig	2011-06-01 00:33:48.000000000 +0200
-+++ js/src/jsnativestack.cpp	2011-06-01 00:56:21.718439794 +0200
-@@ -50,7 +50,8 @@
- #elif defined(XP_MACOSX) || defined(DARWIN) || defined(XP_UNIX)
- # include <pthread.h>
- 
--# if defined(__FreeBSD__) || defined(__OpenBSD__)
-+# if defined(FREEBSD) || defined(__OpenBSD__)
-+#  include <cstddef>
- #  include <pthread_np.h>
- # endif
- 
Index: www/firefox-aurora/files/patch-js-src-Makefile.in
===================================================================
--- www/firefox-aurora/files/patch-js-src-Makefile.in	(revision 587)
+++ www/firefox-aurora/files/patch-js-src-Makefile.in	(working copy)
@@ -28,12 +28,11 @@
  
  INCLUDES	+= -I$(srcdir)
  
-@@ -793,7 +796,8 @@
+@@ -793,7 +796,7 @@
  endif # WINNT
  
  ifeq ($(OS_ARCH),FreeBSD)
 -EXTRA_LIBS	+= -pthread
-+DEFINES		+= -DFREEBSD
 +EXTRA_LIBS	+= -pthread -lc
  endif
  ifeq ($(OS_ARCH),IRIX)
--- a.diff ends here ---
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: linimon 
State-Changed-When: Sun Aug 7 06:57:01 UTC 2011 
State-Changed-Why:  
There's no port firefox-aurora in the repository.  Can you be more 
specific about where this patch should be applied? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=158702 
State-Changed-From-To: feedback->closed 
State-Changed-By: linimon 
State-Changed-When: Sun Aug 7 07:16:11 UTC 2011 
State-Changed-Why:  
Submitter's email address bounced. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=158702 
State-Changed-From-To: closed->open 
State-Changed-By: flo 
State-Changed-When: Sun Aug 7 08:41:00 UTC 2011 
State-Changed-Why:  
This is actually a valid PR and i'm working on it. We have firefox-aurora 
in the gecko svn repo. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=158702 
State-Changed-From-To: open->closed 
State-Changed-By: flo 
State-Changed-When: Tue Aug 16 19:41:51 UTC 2011 
State-Changed-Why:  
Committed. Thanks! 

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