You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ben Laurie <be...@algroup.co.uk> on 2000/01/24 16:15:22 UTC

Re: cvs commit: apache-2.0/src/lib/apr/locks/unix locks.h

rbb@hyperreal.org wrote:
>   1.10      +1 -4      apache-2.0/src/lib/apr/locks/unix/locks.h
> 
>   Index: locks.h
>   ===================================================================
>   RCS file: /home/cvs/apache-2.0/src/lib/apr/locks/unix/locks.h,v
>   retrieving revision 1.9
>   retrieving revision 1.10
>   diff -u -r1.9 -r1.10
>   --- locks.h   2000/01/23 01:13:47     1.9
>   +++ locks.h   2000/01/24 13:59:02     1.10
>   @@ -88,9 +88,6 @@
>    #if HAVE_FCNTL_H
>    #include <fcntl.h>
>    #endif
>   -#ifdef HAVE_STRUCT_UNION_SEMUN
>   -#include <sys/sem.h>
>   -#endif
> 
>    #if APR_HAS_THREADS
>    #if HAVE_PTHREAD_H
>   @@ -99,7 +96,7 @@
>    #endif
>    /* End System Headers */
> 
>   -#ifndef HAVE_STRUCT_UNION_SEMUN
>   +#if !APR_HAVE_UNION_SEMUN && APR_USE_SYSVSEM_SERIALIZE
>    /* it makes no sense, but this isn't defined on solaris */
>    union semun {
>        long val;

Que? If you don't include sys/sem.h, then this doesn't compile - why did
you remove it?

BTW, why are these structures included in the locking structure at all?
They're essentially constant static structures, but they currently exist
in each lock.

Cheers,

Ben.

--
SECURE HOSTING AT THE BUNKER! http://www.thebunker.net/hosting.htm

http://www.apache-ssl.org/ben.html

Y19100 no-prize winner!
http://www.ntk.net/index.cgi?back=2000/now0121.txt

Re: cvs commit: apache-2.0/src/lib/apr/locks/unix locks.h

Posted by Ben Laurie <be...@algroup.co.uk>.
rbb@apache.org wrote:
> 
> > >   -#ifdef HAVE_STRUCT_UNION_SEMUN
> > >   -#include <sys/sem.h>
> > >   -#endif
> > >
> > >    #if APR_HAS_THREADS
> > >    #if HAVE_PTHREAD_H
> > >   @@ -99,7 +96,7 @@
> > >    #endif
> > >    /* End System Headers */
> > >
> > >   -#ifndef HAVE_STRUCT_UNION_SEMUN
> > >   +#if !APR_HAVE_UNION_SEMUN && APR_USE_SYSVSEM_SERIALIZE
> > >    /* it makes no sense, but this isn't defined on solaris */
> > >    union semun {
> > >        long val;
> >
> > Que? If you don't include sys/sem.h, then this doesn't compile - why did
> > you remove it?
> 
> If you look about four lines above this,. we include sys/sem.h if it is on
> the system.  The problem was we weren't checking for it.  I put the check
> into configure.in, so we should be including it.  I just didn't see a need
> for sys/sem.h to be included twice.  :-)

Aha! :-)

In which case, it'd make sense to use HAVE_SYS_SEM_H for the other one,
too.

> > BTW, why are these structures included in the locking structure at all?
> > They're essentially constant static structures, but they currently exist
> > in each lock.
> >
> 
> I have no good answer for this.  I'll look into it though.

:-)

Cheers,

Ben.

--
SECURE HOSTING AT THE BUNKER! http://www.thebunker.net/hosting.htm

http://www.apache-ssl.org/ben.html

Y19100 no-prize winner!
http://www.ntk.net/index.cgi?back=2000/now0121.txt

Re: cvs commit: apache-2.0/src/lib/apr/locks/unix locks.h

Posted by Ben Laurie <be...@algroup.co.uk>.
rbb@apache.org wrote:
> 
> > >   -#ifdef HAVE_STRUCT_UNION_SEMUN
> > >   -#include <sys/sem.h>
> > >   -#endif
> > >
> > >    #if APR_HAS_THREADS
> > >    #if HAVE_PTHREAD_H
> > >   @@ -99,7 +96,7 @@
> > >    #endif
> > >    /* End System Headers */
> > >
> > >   -#ifndef HAVE_STRUCT_UNION_SEMUN
> > >   +#if !APR_HAVE_UNION_SEMUN && APR_USE_SYSVSEM_SERIALIZE
> > >    /* it makes no sense, but this isn't defined on solaris */
> > >    union semun {
> > >        long val;
> >
> > Que? If you don't include sys/sem.h, then this doesn't compile - why did
> > you remove it?
> 
> If you look about four lines above this,. we include sys/sem.h if it is on
> the system.  The problem was we weren't checking for it.  I put the check
> into configure.in, so we should be including it.  I just didn't see a need
> for sys/sem.h to be included twice.  :-)

Aha! :-)

In which case, it'd make sense to use HAVE_SYS_SEM_H for the other one,
too.

> > BTW, why are these structures included in the locking structure at all?
> > They're essentially constant static structures, but they currently exist
> > in each lock.
> >
> 
> I have no good answer for this.  I'll look into it though.

:-)

Cheers,

Ben.

--
SECURE HOSTING AT THE BUNKER! http://www.thebunker.net/hosting.htm

http://www.apache-ssl.org/ben.html

Y19100 no-prize winner!
http://www.ntk.net/index.cgi?back=2000/now0121.txt

Re: cvs commit: apache-2.0/src/lib/apr/locks/unix locks.h

Posted by rb...@apache.org.
> >   -#ifdef HAVE_STRUCT_UNION_SEMUN
> >   -#include <sys/sem.h>
> >   -#endif
> > 
> >    #if APR_HAS_THREADS
> >    #if HAVE_PTHREAD_H
> >   @@ -99,7 +96,7 @@
> >    #endif
> >    /* End System Headers */
> > 
> >   -#ifndef HAVE_STRUCT_UNION_SEMUN
> >   +#if !APR_HAVE_UNION_SEMUN && APR_USE_SYSVSEM_SERIALIZE
> >    /* it makes no sense, but this isn't defined on solaris */
> >    union semun {
> >        long val;
> 
> Que? If you don't include sys/sem.h, then this doesn't compile - why did
> you remove it?

If you look about four lines above this,. we include sys/sem.h if it is on
the system.  The problem was we weren't checking for it.  I put the check
into configure.in, so we should be including it.  I just didn't see a need
for sys/sem.h to be included twice.  :-)

> 
> BTW, why are these structures included in the locking structure at all?
> They're essentially constant static structures, but they currently exist
> in each lock.
> 

I have no good answer for this.  I'll look into it though.

Ryan


Come to the first official Apache Software Foundation
Conference!!!   <http://ApacheCon.Com/>

_______________________________________________________________________________
Ryan Bloom                        	rbb@ntrnet.net
2121 Stonehenge Dr. Apt #3
Raleigh, NC 27615		Ryan Bloom -- thinker, adventurer, artist,
				     writer, but mostly, friend.
-------------------------------------------------------------------------------


Re: cvs commit: apache-2.0/src/lib/apr/locks/unix locks.h

Posted by rb...@apache.org.
> >   -#ifdef HAVE_STRUCT_UNION_SEMUN
> >   -#include <sys/sem.h>
> >   -#endif
> > 
> >    #if APR_HAS_THREADS
> >    #if HAVE_PTHREAD_H
> >   @@ -99,7 +96,7 @@
> >    #endif
> >    /* End System Headers */
> > 
> >   -#ifndef HAVE_STRUCT_UNION_SEMUN
> >   +#if !APR_HAVE_UNION_SEMUN && APR_USE_SYSVSEM_SERIALIZE
> >    /* it makes no sense, but this isn't defined on solaris */
> >    union semun {
> >        long val;
> 
> Que? If you don't include sys/sem.h, then this doesn't compile - why did
> you remove it?

If you look about four lines above this,. we include sys/sem.h if it is on
the system.  The problem was we weren't checking for it.  I put the check
into configure.in, so we should be including it.  I just didn't see a need
for sys/sem.h to be included twice.  :-)

> 
> BTW, why are these structures included in the locking structure at all?
> They're essentially constant static structures, but they currently exist
> in each lock.
> 

I have no good answer for this.  I'll look into it though.

Ryan


Come to the first official Apache Software Foundation
Conference!!!   <http://ApacheCon.Com/>

_______________________________________________________________________________
Ryan Bloom                        	rbb@ntrnet.net
2121 Stonehenge Dr. Apt #3
Raleigh, NC 27615		Ryan Bloom -- thinker, adventurer, artist,
				     writer, but mostly, friend.
-------------------------------------------------------------------------------