Add support for DragonFly BSD

NEW
Unassigned

Status

()

Core
XPCOM
14 years ago
7 years ago

People

(Reporter: Andy Hauser, Unassigned)

Tracking

Trunk
All
Other
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040221
Build Identifier: Mozilla/5.0 (X11; U; DragonFly i386; en-US; rv:1.6) Gecko/20040325

compiling on DragonFly BSD with gcc3 does not define __FreeBSD__
therefore the attached patch is needed to get to compile:
--- xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h  Thu Mar 25
18:41:46 2004
+++ xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h  Thu Mar 25
18:44:05 2004
@@ -103,6 +103,9 @@
 #define THUNK_BASED_THIS_ADJUST
 #endif

+#elif defined(__DragonFly__)
+#define THUNK_BASED_THIS_ADJUST
+
 #elif defined(__NetBSD__)
 #define THUNK_BASED_THIS_ADJUST



Reproducible: Always
Steps to Reproduce:
1. export CCVER=gcc3
2. cd /usr/ports/www/mozilla
3. make




--- xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h  Thu Mar 25
18:41:46 2004
+++ xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h  Thu Mar 25
18:44:05 2004
@@ -103,6 +103,9 @@
 #define THUNK_BASED_THIS_ADJUST
 #endif

+#elif defined(__DragonFly__)
+#define THUNK_BASED_THIS_ADJUST
+
 #elif defined(__NetBSD__)
 #define THUNK_BASED_THIS_ADJUST

Updated

14 years ago
Assignee: wchang0222 → dougt
Component: NSPR → XPCOM
Product: NSPR → Browser
Version: other → Trunk

Updated

14 years ago
QA Contact: wchang0222 → nobody

Comment 1

13 years ago
what about this patch?

--- config/mkdepend/imakemdep.h 2004-11-15 16:12:54.000000000 +0000
@@ -235,7 +235,7 @@
 #ifdef _CRAY
 #define DEFAULT_CPP "/lib/pcpp"
 #endif
-#if defined(__386BSD__) || defined(__NetBSD__) || defined(__FreeBSD__) ||
defined(__OpenBSD__)
+#if defined(__386BSD__) || defined(__NetBSD__) || defined(__FreeBSD__) ||
defined(__OpenBSD__) || defined(__DragonFly__)
 #define DEFAULT_CPP "/usr/libexec/cpp"
 #endif
 #ifdef MACH
@@ -273,7 +273,7 @@
 #ifdef unix
        "-Uunix",       /* remove unix symbol so that filename unix.c okay */
 #endif
-#if defined(__386BSD__) || defined(__NetBSD__) || defined(__FreeBSD__) ||
defined(__OpenBSD__) || defined(MACH)
+#if defined(__386BSD__) || defined(__NetBSD__) || defined(__FreeBSD__) ||
defined(__DragonFly__) || defined(__OpenBSD__) || defined(MACH)
 # ifdef __i386__
        "-D__i386__",
 # endif
@@ -716,6 +716,9 @@
 #ifdef __FreeBSD__
        {"__FreeBSD__", "1"},
 #endif
+#ifdef __DragonFly__
+       {"__DragonFly__", "1"},
+#endif
 #ifdef __NetBSD__
        {"__NetBSD__", "1"},
 #endif
--- extensions/transformiix/source/base/Double.cpp      2004-11-15
16:12:54.000000000 +0000
@@ -49,7 +49,7 @@
  */

 //A trick to handle IEEE floating point exceptions on FreeBSD - E.D.
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__DragonFly__)
 #include <ieeefp.h>
 #if defined(__i386__)
 fp_except_t allmask = FP_X_INV|FP_X_OFL|FP_X_UFL|FP_X_DZ|FP_X_IMP|FP_X_DNML;
--- gc/boehm/gcconfig.h 2000-08-11 00:13:36.000000000 +0000
@@ -188,6 +188,12 @@
 #   define FREEBSD
 #   define mach_type_known
 # endif
+# if defined(__DragonFly__) && defined(i386)
+#   define I386
+#   define DRAGONFLY
+#   define FREEBSD
+#   define mach_type_known
+# endif
 # if defined(__NetBSD__) && defined(i386)
 #   define I386
 #   define NETBSD
@@ -758,6 +764,11 @@
 #      define OS_TYPE "FREEBSD"
 #      define MPROTECT_VDB
 #   endif
+#   ifdef DRAGONFLY
+/* #       define OS_TYPE "DRAGONFLY" */
+#       define OS_TYPE "FREEBSD"
+#       define MPROTECT_VDB
+#   endif
 #   ifdef NETBSD
 #      define OS_TYPE "NETBSD"
 #   endif
@@ -767,7 +778,7 @@
 #   ifdef BSDI
 #      define OS_TYPE "BSDI"
 #   endif
-#   if defined(OPENBSD) || defined(FREEBSD) || defined(NETBSD) \
+#   if defined(OPENBSD) || defined(FREEBSD) || defined(DRAGONFLY) ||
defined(NETBSD) \
         || defined(THREE86BSD) || defined(BSDI)
 #      define HEURISTIC2
        extern char etext;
--- gc/boehm/mach_dep.c 1999-09-30 02:25:45.000000000 +0000
@@ -206,6 +206,7 @@
        && !defined(SCO) && !defined(SCO_ELF) \
        && !(defined(LINUX)       && defined(__ELF__)) \
        && !(defined(__FreeBSD__) && defined(__ELF__)) \
+       && !(defined(__DragonFly__) && defined(__ELF__)) \
        && !defined(DOS4GW)
        /* I386 code, generic code does not appear to work */
        /* It does appear to work under OS2, and asms dont */
@@ -220,7 +221,8 @@
 #       endif

 #      if ( defined(I386) && defined(LINUX) && defined(__ELF__) ) \
-       || ( defined(I386) && defined(__FreeBSD__) && defined(__ELF__) )
+       || ( defined(I386) && defined(__FreeBSD__) && defined(__ELF__) ) \
+       || ( defined(I386) && defined(__DragonFly__) && defined(__ELF__) )

        /* This is modified for Linux with ELF (Note: _ELF_ only) */
        /* This section handles FreeBSD with ELF. */
--- mailnews/movemail/src/movemail.c    2001-09-28 20:07:47.000000000 +0000
@@ -52,7 +52,7 @@
 #define LINUX_GLIBC_2

 #include <sys/errno.h>
-#if !defined(__FreeBSD__) && !defined(MACLINUX) && !defined(LINUX_GLIBC_2)
+#if !defined(__FreeBSD__) && !defined(MACLINUX) && !defined(LINUX_GLIBC_2) &&
!defined(__DragonFly__)
 extern char *sys_errlist[];
 extern int sys_nerr;
 #endif
--- nsprpub/pr/include/gencfg.c 2001-10-26 04:53:58.000000000 +0000
@@ -59,8 +59,8 @@
 #endif

 #if defined(__alpha)
-#if !(defined(_WIN32)) && !(defined(OSF1)) && !(defined(__linux)) &&
!(defined(__FreeBSD__))
-       error - None of OSF1, _WIN32, __linux, or __FreeBSD__ is defined
+#if !(defined(_WIN32)) && !(defined(OSF1)) && !(defined(__linux)) &&
!(defined(__FreeBSD__)) && !(defined(__DragonFly__))
+       error - None of OSF1, _WIN32, __linux, __DragonFly__ or __FreeBSD__ is
defined
 #endif
 #endif

--- nsprpub/pr/include/md/_freebsd.h    2004-11-15 16:12:55.000000000 +0000
@@ -37,7 +37,7 @@

 #include "prthread.h"

-#if __FreeBSD__ >= 2
+#if __FreeBSD__ >= 2 || defined (__DragonFly__)
 #include <osreldate.h>  /* for __FreeBSD_version */
 #endif
 #include <sys/syscall.h>
@@ -76,7 +76,7 @@
 #define _PR_NO_LARGE_FILES

 #if defined(_PR_PTHREADS)
-#if __FreeBSD_version >= 400008
+#if __FreeBSD_version >= 400008 || defined (__DragonFly__)
 /*
  * libc_r before this version of FreeBSD doesn't have poll().
  * Although libc has poll(), it is not thread-safe so we can't
@@ -85,7 +85,7 @@
 #define _PR_POLL_AVAILABLE
 #endif
 #else
-#if __FreeBSD_version >= 300000
+#if __FreeBSD_version >= 300000 || defined (__DragonFly__)
 #define _PR_POLL_AVAILABLE
 #define _PR_USE_POLL
 #endif
@@ -94,7 +94,7 @@
 #define _PR_HAVE_SYSV_SEMAPHORES
 #define PR_HAVE_SYSV_NAMED_SHARED_MEMORY

-#if __FreeBSD_version >= 400014
+#if __FreeBSD_version >= 400014 || defined (__DragonFly__)
 #define _PR_INET6
 #define _PR_HAVE_INET_NTOP
 #define _PR_HAVE_GETHOSTBYNAME2
--- xpcom/build/malloc.c        2003-07-03 20:54:34.000000000 +0000
@@ -918,7 +918,7 @@


 #ifdef LACKS_UNISTD_H
-#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
+#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) &&
!defined(__DragonFly__)
 #if __STD_C
 extern Void_t*     sbrk(ptrdiff_t);
 #else
--- xpcom/io/nsLocalFileUnix.h  2004-01-15 06:14:13.000000000 +0000
@@ -57,7 +57,7 @@
 #endif

 // so we can statfs on freebsd
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__DragonFly__)
     #define HAVE_SYS_STATFS_H
     #define STATFS statfs
     #include <sys/param.h>
--- xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h     
2004-01-08 18:17:07.000000000 +0000
@@ -77,7 +77,7 @@
 #define THUNK_BASED_THIS_ADJUST
 #endif

-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__DragonFly__)
 /* System versions of gcc on FreeBSD don't use thunks.  On 3.x, the system
  * compiler is gcc 2.7.2.3, which doesn't use thunks by default.  On 4.x and
  * 5.x, /usr/src/contrib/gcc/config/freebsd.h explicitly undef's
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
This bug has been automatically resolved after a period of inactivity (see above
comment). If anyone thinks this is incorrect, they should feel free to reopen it.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → EXPIRED
(Reporter)

Updated

12 years ago
Status: RESOLVED → UNCONFIRMED
Resolution: EXPIRED → ---
(Reporter)

Comment 4

12 years ago
reopened, please resolve!

Comment 5

12 years ago
Resolve how? If you want to see this bug fixed, it would be a start to add that
patch as an attachment and ask for review. See the FAQ if you don't know how:
http://www.mozilla.org/hacking/code-review-faq.html
(Reporter)

Comment 6

12 years ago
Created attachment 199593 [details] [diff] [review]
Needed to compile on DragonFly BSD (CCVER=gcc34)

How about just adding those 2 lines to the file? It's a trivial change.
http://ftp.fortunaty.net/DragonFly/inofficial/dfports/patch-xpcom::reflect::xptcall::src::md::unix::xptc_platforms_unixish_x86.h

Is it so difficult ? Do i have to invest serious time ?
Confirming this issue

Comment 8

12 years ago
Created attachment 211577 [details] [diff] [review]
Updated patch for Firefox 1.5 on DragonFly

Here's an updated patch, for Firefox 1.5 on DragonFly (patch-d* from pkgsrc/www/firefox/patches).

Comment 9

10 years ago
mass reassigning to nobody.
Assignee: dougt → nobody
Duplicate of this bug: 326884

Comment 11

9 years ago
I'd like to know why is this basically ignored about four years. What's the problem? I volunteer to update patches to latest versions, but only if someone will care.
Hasso:
If you are still interested you must request a review from soneone.
With review it can be pushed into hg.mozilla.org.
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 13

8 years ago
Someone? Who? How?
trying benjamin@smedbergs.us
Comment on attachment 211577 [details] [diff] [review]
Updated patch for Firefox 1.5 on DragonFly

The patch here covers several different projects. Please split the patch into the following pieces:

1) NSPR (nsprpub)
2) NSS (dbm/ security/coreconf security/nss)
3) mozilla-central
4) LDAP C SDK (directory/c-sdk)

After you attach these I can help you find the appropriate reviewer for each. Also please note that this patch is out of date since code like gc/boehm has not been part of our codebase for a year at least.
QA Contact: nobody → xpcom
Summary: [PATCH] Add support for DragonFly BSD → Add support for DragonFly BSD
You need to log in before you can comment on or make changes to this bug.