Re: pthread.h and unistd.h

2000-02-17 Thread Jason Evans

On Thu, Feb 17, 2000 at 11:29:57AM -0500, Daniel Eischen wrote:
> 
> How about we remove the #if defined()s for:
> 
>   _POSIX_THREAD_PROCESS_SHARED
>   _POSIX_THREAD_PRIO_PROTECT
>   _POSIX_THREAD_PRIO_INHERIT
>   _POSIX_THREAD_PRIORITY_SCHEDULING
> 
> from our ?

Yes, it looks like use of the last three should be removed from pthread.h.
I'll submit a patch to Jordan.

Thanks,
Jason


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: pthread.h and unistd.h

2000-02-17 Thread Bruce Evans

On Thu, 17 Feb 2000, Daniel Eischen wrote:

> How about we remove the #if defined()s for:
> 
>   _POSIX_THREAD_PROCESS_SHARED
>   _POSIX_THREAD_PRIO_PROTECT
>   _POSIX_THREAD_PRIO_INHERIT
>   _POSIX_THREAD_PRIORITY_SCHEDULING
> 
> from our ?

Except for the first, which is left undefined in  because
it is not implemented.

Bruce



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: pthread.h and unistd.h

2000-02-17 Thread Daniel Eischen

On Fri, 18 Feb 2000, Bruce Evans wrote:

> On Thu, 17 Feb 2000, Daniel Eischen wrote:
> 
> > On Thu, 17 Feb 2000, Thimble Smith wrote:
> > 
> > > Hi.  I recently updated from -stable to -current.  I notice now that
> > > pthread.h relies on #defines that are in unistd.h; so in order to use
> > > pthread_attr_setscope you have to include unistd.h before pthread.h.
> > > 
> > > Is this standard behaviour?  I'm working with MySQL, and unistd.h is
> > > included after pthread.h; should I have that code changed, or should
> > > FreeBSD somehow compensate for this?
> > 
> > I've read the POSIX spec, and it looks like pthread.h should include
> > unistd.h so that the #defines you refer to are properly defined. 
> 
> It can't include  or even , at least in
> POSX.1-1996, because even the latter defines names that are not reserved
> for .  E.g.,  defines SEEK_SET, but the only
> non-implementation reserved for  are ones beginning with
> pthread_ or PTHREAD_, or ending with _t.
> 
> However, including  wouldn't add much to the existing
> namespace violation from including , ,
> ,  and .
> 
> > Solaris 2.5.1 pthread.h doesn't include  directly, but does
> > include  which includes .
> 
> This seems to be a bug Solaris 2.5.1.  Our  avoids
> including  by including  to get more
> fundamental feature test macros for the visibility of the POSIX.1b
> extensions.

It seems to be fixed under Solaris 2.7.

How about we remove the #if defined()s for:

  _POSIX_THREAD_PROCESS_SHARED
  _POSIX_THREAD_PRIO_PROTECT
  _POSIX_THREAD_PRIO_INHERIT
  _POSIX_THREAD_PRIORITY_SCHEDULING

from our ?

Dan Eischen
[EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: pthread.h and unistd.h

2000-02-17 Thread Bruce Evans

On Thu, 17 Feb 2000, Daniel Eischen wrote:

> On Thu, 17 Feb 2000, Thimble Smith wrote:
> 
> > Hi.  I recently updated from -stable to -current.  I notice now that
> > pthread.h relies on #defines that are in unistd.h; so in order to use
> > pthread_attr_setscope you have to include unistd.h before pthread.h.
> > 
> > Is this standard behaviour?  I'm working with MySQL, and unistd.h is
> > included after pthread.h; should I have that code changed, or should
> > FreeBSD somehow compensate for this?
> 
> I've read the POSIX spec, and it looks like pthread.h should include
> unistd.h so that the #defines you refer to are properly defined. 

It can't include  or even , at least in
POSX.1-1996, because even the latter defines names that are not reserved
for .  E.g.,  defines SEEK_SET, but the only
non-implementation reserved for  are ones beginning with
pthread_ or PTHREAD_, or ending with _t.

However, including  wouldn't add much to the existing
namespace violation from including , ,
,  and .

> Solaris 2.5.1 pthread.h doesn't include  directly, but does
> include  which includes .

This seems to be a bug Solaris 2.5.1.  Our  avoids
including  by including  to get more
fundamental feature test macros for the visibility of the POSIX.1b
extensions.

Bruce



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: pthread.h and unistd.h

2000-02-17 Thread Daniel Eischen

On Thu, 17 Feb 2000, Thimble Smith wrote:

> Hi.  I recently updated from -stable to -current.  I notice now that
> pthread.h relies on #defines that are in unistd.h; so in order to use
> pthread_attr_setscope you have to include unistd.h before pthread.h.
> 
> Is this standard behaviour?  I'm working with MySQL, and unistd.h is
> included after pthread.h; should I have that code changed, or should
> FreeBSD somehow compensate for this?

I've read the POSIX spec, and it looks like pthread.h should include
unistd.h so that the #defines you refer to are properly defined. 

Solaris 2.5.1 pthread.h doesn't include  directly, but does
include  which includes .

I think our pthread.h should include , but don't know if
it should be directly included or not.

Jason, what do you think?

Dan Eischen
[EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



pthread.h and unistd.h

2000-02-17 Thread Thimble Smith

Hi.  I recently updated from -stable to -current.  I notice now that
pthread.h relies on #defines that are in unistd.h; so in order to use
pthread_attr_setscope you have to include unistd.h before pthread.h.

Is this standard behaviour?  I'm working with MySQL, and unistd.h is
included after pthread.h; should I have that code changed, or should
FreeBSD somehow compensate for this?

Thanks,

Tim


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message