Issue 403 - BeOS build broken for 2.0-devel tree.
Summary: BeOS build broken for 2.0-devel tree.
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1999-12-17 17:25 UTC by allen@driversoft.com
Modified: 2014-08-01 21:06 UTC (History)
0 users

See Also:


Attachments
initgroups_option.1.patch (320 bytes, text/plain)
1999-12-17 21:10 UTC, allen@driversoft.com
Details
initgroups_option.2.patch (452 bytes, text/plain)
1999-12-17 21:10 UTC, allen@driversoft.com
Details

Note You need to log in before you can comment on or make changes to this issue.
Description allen@driversoft.com 1999-12-17 17:25:40 UTC
Full_Name: Allen Reese
Version: 2.0-devel
OS: BeOS R4.5
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (207.135.128.3)


There are minor problems building under BeOS.

Files are not file descriptors.  I have added tcp_read/write/close defines for
BeOS to include/ac/socket.h

initgroups(u,g) is missing.  I have added an initgroups define to
include/portable.h.in to fix this for BeOS.

back-ldbm won't compile with gdbm, because gdbm.h doesn't have GDBM_NOLOCK
defined in it so LDBM_NOLOCKING never gets defined in include/ldbm.h  the fix is
defining LDBM_NOLOCKING to 0 if GDBM_NOLOCK isn't defined.

I will upload 3 patches:  use patch -p0
allen_reese.121799.ac_socket.patch
allen_reese.121799.portable.patch
allen_reese.121799.ldbm.patch
Comment 1 Kurt Zeilenga 1999-12-17 18:20:57 UTC
At 05:25 PM 12/17/99 GMT, allen@driversoft.com wrote:
>Full_Name: Allen Reese
>Version: 2.0-devel
>OS: BeOS R4.5
>URL: ftp://ftp.openldap.org/incoming/
>Submission from: (NULL) (207.135.128.3)
>
>
>There are minor problems building under BeOS.

In general, platform specific tests (such as for -D_BeOS_) are
to be avoided as the behavior of even to R4.5 systems may not
be consistent (in the fact of 3rd party C translators and libraries).
Instead, we rely on configure to test for specific behavior
requirements and to define define appropriate defines for
conditional compilation.

>Files are not file descriptors.  I have added tcp_read/write/close defines for
>BeOS to include/ac/socket.h

We need to sort out a reasonable autoconf test for this.
We likely should discuss how to implement such a test on the
devel list.

>initgroups(u,g) is missing.  I have added an initgroups define to
>include/portable.h.in to fix this for BeOS.

HAVE_INITGROUPS should be used to control behavior. This can
either be localized in <ac/unistd.h> or in the particular
.c file which called initgroups().

>back-ldbm won't compile with gdbm, because gdbm.h doesn't have GDBM_NOLOCK
>defined in it so LDBM_NOLOCKING never gets defined in include/ldbm.h  the fix is
>defining LDBM_NOLOCKING to 0 if GDBM_NOLOCK isn't defined.

This change is fine and has been committed.  Thanks.



----
Kurt D. Zeilenga		<kurt@boolean.net>
Net Boolean Incorporated	<http://www.boolean.net/>
Comment 2 allen@driversoft.com 1999-12-17 18:42:37 UTC
On Fri, 17 Dec 1999, Kurt D. Zeilenga wrote:

> At 05:25 PM 12/17/99 GMT, allen@driversoft.com wrote:
> >Full_Name: Allen Reese
> >Version: 2.0-devel
> >OS: BeOS R4.5
> >URL: ftp://ftp.openldap.org/incoming/
> >Submission from: (NULL) (207.135.128.3)
> >
> >
> >There are minor problems building under BeOS.
> 
> In general, platform specific tests (such as for -D_BeOS_) are
> to be avoided as the behavior of even to R4.5 systems may not
> be consistent (in the fact of 3rd party C translators and libraries).
> Instead, we rely on configure to test for specific behavior
> requirements and to define define appropriate defines for
> conditional compilation.

Yes that is true.  
 
> >Files are not file descriptors.  I have added tcp_read/write/close defines for
> >BeOS to include/ac/socket.h
> 
> We need to sort out a reasonable autoconf test for this.
> We likely should discuss how to implement such a test on the
> devel list.

The only workable test I can think of is test the OS version.  If you open
a socket and try and use read/write on it, the results are unpredicatable.

I know for a fact that any version of BeOS >=4.5 sockets are not
file descriptors.
 
> >initgroups(u,g) is missing.  I have added an initgroups define to
> >include/portable.h.in to fix this for BeOS.
> 
> HAVE_INITGROUPS should be used to control behavior. This can
> either be localized in <ac/unistd.h> or in the particular
> .c file which called initgroups().

ac/unistd.h   servers/slapd/daemon.c is the only place I can find calling
it.  I'll look at writing an autoconf test for it.
 
> >back-ldbm won't compile with gdbm, because gdbm.h doesn't have GDBM_NOLOCK
> >defined in it so LDBM_NOLOCKING never gets defined in include/ldbm.h  the fix is
> >defining LDBM_NOLOCKING to 0 if GDBM_NOLOCK isn't defined.
> 
> This change is fine and has been committed.  Thanks.

Cool.
 
> 
> 
> ----
> Kurt D. Zeilenga		<kurt@boolean.net>
> Net Boolean Incorporated	<http://www.boolean.net/>
> 


Allen Reese
Senior Software Engineer
Driversoft, Inc.
allen@driversoft.com
Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread



Comment 3 Ben Collins 1999-12-17 18:45:26 UTC
> >Files are not file descriptors.  I have added tcp_read/write/close defines for
> >BeOS to include/ac/socket.h

I thought I had worked this out before? BeOS can use the same defines as
Win32 does in that sense. Have the defines for this changed in the -devel
branch (I do recall that this was the only place I know of where OS
specific defines were used for windows beos and unix)?

-- 
 -----------=======-=-======-=========-----------=====------------=-=------
/  Ben Collins  --  ...on that fantastic voyage...  --  Debian GNU/Linux   \
`     bcollins@debian.org  -  collinbm@djj.state.va.us  -  bmc@visi.net    '
 `---=========------=======-------------=-=-----=-===-======-------=--=---'
Comment 4 Kurt Zeilenga 1999-12-17 19:51:48 UTC
Allen Reese wrote:
> I know for a fact that any version of BeOS >=4.5 sockets are not
> file descriptors.

No, you have no clue what unreleased versions of BeOS will be like.
And you don't know for a fact that the installer has linked in some
socket library which resolves the issue.

(this is not to say that we should or should use a platform test
in this case, that should be discussed)

> > >initgroups(u,g) is missing.  I have added an initgroups define to
> > >include/portable.h.in to fix this for BeOS.
> >
> > HAVE_INITGROUPS should be used to control behavior. This can
> > either be localized in <ac/unistd.h> or in the particular
> > .c file which called initgroups().
> 
> ac/unistd.h   servers/slapd/daemon.c is the only place I can find calling
> it.  I'll look at writing an autoconf test for it.

The initgroups is already detected and HAVE_INITGROUPS is available.
It just need to be properly used.
Comment 5 Kurt Zeilenga 1999-12-17 20:10:00 UTC
At 06:43 PM 12/17/99 GMT, bcollins@debian.org wrote:
>> >Files are not file descriptors.  I have added tcp_read/write/close defines for
>> >BeOS to include/ac/socket.h
>
>I thought I had worked this out before?

It was... but then someone added a call used tcp_read/tcp_write
in slapd (the wake pipe).  This code just needs to be fixed
to use the stream_read/write routines.

----
Kurt D. Zeilenga		<kurt@boolean.net>
Net Boolean Incorporated	<http://www.boolean.net/>
Comment 6 Kurt Zeilenga 1999-12-17 20:28:32 UTC
I committed a temporary fix, slapd shouldn't use tcp_read/write.
It's actually likely incomplete.  That is I suspect we may be
incorrectly using ioctl() or fcntl() on sockets under BeOS.
Someone in the know should look into this.

At 08:17 PM 12/17/99 GMT, kurt@boolean.net wrote:
>
>At 06:43 PM 12/17/99 GMT, bcollins@debian.org wrote:
>>> >Files are not file descriptors.  I have added tcp_read/write/close defines for
>>> >BeOS to include/ac/socket.h
>>
>>I thought I had worked this out before?
>
>It was... but then someone added a call used tcp_read/tcp_write
>in slapd (the wake pipe).  This code just needs to be fixed
>to use the stream_read/write routines.
>
>----
>Kurt D. Zeilenga		<kurt@boolean.net>
>Net Boolean Incorporated	<http://www.boolean.net/>
>
>

----
Kurt D. Zeilenga		<kurt@boolean.net>
Net Boolean Incorporated	<http://www.boolean.net/>
Comment 7 allen@driversoft.com 1999-12-17 21:10:38 UTC
On Fri, 17 Dec 1999, Kurt D. Zeilenga wrote:

> Allen Reese wrote:
> > I know for a fact that any version of BeOS >=4.5 sockets are not
> > file descriptors.
> 
> No, you have no clue what unreleased versions of BeOS will be like.
> And you don't know for a fact that the installer has linked in some
> socket library which resolves the issue.
That should be <= not >=.
As far as some library resolving the issue, that is possible.
 
> (this is not to say that we should or should use a platform test
> in this case, that should be discussed)
> 
> > > >initgroups(u,g) is missing.  I have added an initgroups define to
> > > >include/portable.h.in to fix this for BeOS.
> > >
> > > HAVE_INITGROUPS should be used to control behavior. This can
> > > either be localized in <ac/unistd.h> or in the particular
> > > .c file which called initgroups().
> > 
> > ac/unistd.h   servers/slapd/daemon.c is the only place I can find calling
> > it.  I'll look at writing an autoconf test for it.
> 
> The initgroups is already detected and HAVE_INITGROUPS is available.
> It just need to be properly used.
> 

Here are 2 patches that fix it in different manners.  the second is
probably better to use.

Allen Reese
Senior Software Engineer
Driversoft, Inc.
allen@driversoft.com
Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread


Comment 8 Kurt Zeilenga 1999-12-21 23:59:18 UTC
changed notes
changed state Open to Closed
Comment 9 OpenLDAP project 2014-08-01 21:06:09 UTC
Short term solution applied.
Devel issue.