summaryrefslogtreecommitdiff
path: root/www/firefox/patches/patch-as
blob: dbf4713e7dd4a8af4130889402b185e6f0c61522 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
$NetBSD: patch-as,v 1.3 2013/05/23 13:12:13 ryoon Exp $

Treat DragonFly like FreeBSD.

--- js/src/configure.in.orig	2013-05-11 19:19:32.000000000 +0000
+++ js/src/configure.in
@@ -2399,6 +2399,7 @@ EOF
 #pragma GCC visibility push(hidden)
 #pragma GCC visibility push(default)
 #include <string.h>
+#include <iterator>
 #pragma GCC visibility pop
 
 __attribute__ ((visibility ("default"))) void Func() {
@@ -2407,7 +2408,7 @@ __attribute__ ((visibility ("default")))
 }
 EOF
                        ac_cv_have_visibility_builtin_bug=no
-                       if ! ${CC-cc} ${CFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then
+                       if ! ${CXX-c++} ${CXXFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then
                          ac_cv_have_visibility_builtin_bug=yes
                        else
                          if test `grep -c "@PLT" conftest.S` = 0; then
@@ -2628,7 +2629,7 @@ then
     fi
 
 	case "$target" in
-	    *-*-freebsd*)
+	    *-*-freebsd*|*-dragonfly*)
 			AC_DEFINE(_REENTRANT)
 			AC_DEFINE(_THREAD_SAFE)
 			dnl -pthread links in -lpthread, so don't specify it explicitly.
@@ -2711,6 +2712,9 @@ AC_CACHE_CHECK(
         #ifdef linux
         #define _BSD_SOURCE 1
         #endif
+        #ifdef __NetBSD__
+        #error use of global _res variable in threaded programs is not portable
+        #endif
         #include <resolv.h>
         ],
         [int foo = res_ninit(&_res);],
@@ -3486,7 +3490,7 @@ if test "$MOZ_MEMORY"; then
   *-darwin*)
     AC_DEFINE(MOZ_MEMORY_DARWIN)
     ;;
-  *-*freebsd*)
+  *-*freebsd*|*-*dragonfly*)
     AC_DEFINE(MOZ_MEMORY_BSD)
     ;;
   *-android*|*-linuxandroid*)