Bug 29858 - Add support for DragonFly BSD
Summary: Add support for DragonFly BSD
Status: RESOLVED FIXED
Alias: None
Product: APR
Classification: Unclassified
Component: APR (show other bugs)
Version: HEAD
Hardware: PC other
: P3 enhancement (vote)
Target Milestone: ---
Assignee: Apache Portable Runtime bugs mailinglist
URL: http://www.dragonflybsd.org/
Keywords:
Depends on: 25718
Blocks:
  Show dependency tree
 
Reported: 2004-06-29 10:01 UTC by Jeroen Ruigrok
Modified: 2005-01-20 19:51 UTC (History)
0 users



Attachments
sendrecv.c patch for supporting DragonFly's sendfile() (4.44 KB, patch)
2004-06-29 10:02 UTC, Jeroen Ruigrok
Details | Diff
sendrecv.c patch against HEAD (apr-APR_0_9_BRANCH_20040629043529) (4.44 KB, patch)
2004-06-29 11:19 UTC, Jeroen Ruigrok
Details | Diff
sendrecv.c patch for DragonFly sendfile() support against rev 125405 (1.07 KB, patch)
2005-01-17 12:10 UTC, Jeroen Ruigrok
Details | Diff
patch to properly use dlopen() in dso.c against rev 125405 (470 bytes, patch)
2005-01-17 12:23 UTC, Jeroen Ruigrok
Details | Diff
patch to get DLSYM_NEEDS_UNDERSCORE defined, against rev 125407 (377 bytes, patch)
2005-01-17 12:27 UTC, Jeroen Ruigrok
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeroen Ruigrok 2004-06-29 10:01:35 UTC
Placeholder for DragonFly BSD support patches for APR.
Comment 1 Jeroen Ruigrok 2004-06-29 10:02:40 UTC
Created attachment 11992 [details]
sendrecv.c patch for supporting DragonFly's sendfile()
Comment 2 Jeroen Ruigrok 2004-06-29 10:25:34 UTC
Please also update config.guess and config.sub in build with the new versions 
from the config project (http://savannah.gnu.org/projects/config/).  This goes 
for both APR and APR-util.
Comment 3 Jeroen Ruigrok 2004-06-29 11:19:16 UTC
Created attachment 11993 [details]
sendrecv.c patch against HEAD (apr-APR_0_9_BRANCH_20040629043529)
Comment 4 Paul Querna 2004-06-29 15:43:15 UTC
Why can't you modify the existing FreeBSD Sendfile function?

From the patch, the DragonFly and FreeBSD sendfile functions look nearly the
same.  Is there any reason you couldn't combine them into one?
Comment 5 Paul Querna 2004-07-09 07:45:08 UTC
Jeroen, Feedback Please.

Why can't you use the FreeBSD function?  Why do you need to copy and paste the
entire freebsd function in the patch?

Im about to just mark this as invalid.

-Paul Querna

Comment 6 Jeroen Ruigrok 2004-07-09 08:12:32 UTC
Paul,

we do not carry FreeBSD's historical bagage, nor do we keep the version numbers 
FreeBSD uses.

Furthermore, we have been diverting API/ABI wise from FreeBSD on some levels 
already and I am just trying to be ahead of the curve of having to redo this at 
near point in time.
Comment 7 Jeroen Ruigrok 2004-07-09 08:19:40 UTC
This snippet is especially crucial:

#define KERNEL_WITH_SENDFILE_LENGTH_FIX 460001

[snip]

    kernel_version = 0;    /* silence compiler warning */
    kernel_version_size = sizeof(kernel_version);
    if (sysctlbyname("kern.osreldate", &kernel_version,
                     &kernel_version_size, NULL, NULL) == 0 &&
        kernel_version < KERNEL_WITH_SENDFILE_LENGTH_FIX) {
        api = OLD;
        return 1;
    }

$ sysctl kern.osreldate 
kern.osreldate: 100000
Comment 8 Paul Querna 2004-07-09 08:30:22 UTC
That code is bogus, and already has a bug against it w/ a Patch to remove it.

See Bug #25718

If the patch there was applied, is there any other parts of the FreeBSD function
that would not work on DragonFly?

-Paul
Comment 9 Jeroen Ruigrok 2004-07-09 08:47:00 UTC
If and when said patch is applied it would seem that you could collapse both 
DragonFly and FreeBSD together for now.  So no, 't would work.
Comment 10 Jeroen Ruigrok 2005-01-17 12:10:01 UTC
Created attachment 14031 [details]
sendrecv.c patch for DragonFly sendfile() support against rev 125405
Comment 11 Jeroen Ruigrok 2005-01-17 12:23:45 UTC
Created attachment 14032 [details]
patch to properly use dlopen() in dso.c against rev 125405
Comment 12 Jeroen Ruigrok 2005-01-17 12:27:30 UTC
Created attachment 14033 [details]
patch to get DLSYM_NEEDS_UNDERSCORE defined, against rev 125407
Comment 13 Jeroen Ruigrok 2005-01-19 16:57:21 UTC
These are all the patches DragonFly needs at this time.  Just to be absolutely
clear on the issue. : )
Comment 14 Paul Querna 2005-01-19 18:33:33 UTC
Thanks, I will try to commit them in the next few days before 1.1.0.
Comment 15 Paul Querna 2005-01-21 04:51:15 UTC
Commited to trunk in r125880.