[openbeos] Re: sys/stat.h and related commits

  • From: "Andrew Bachmann" <shatty@xxxxxxxxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Sun, 03 Aug 2003 12:05:45 -0700 PDT

On Sun, 03 Aug 2003 19:38:05 +0200 CEST "Axel Dörfler" 
<axeld@xxxxxxxxxxxxxxxx> wrote:
> "Andrew Bachmann" <shatty@xxxxxxxxxxxxx> wrote:
> > I would like to float a proposal to move some subparts of OS.h into 
> > separate files that can be included directly. (and would also be 
> > included 
> > by OS.h, of course)  For example, perhaps these could be together in 
> > a
> > header, (KernelTypes.h?) preferably defined in terms of <sys/types.h>
> >  
> > instead of SupportDefs.h:
> > 
> > typedef int32 area_id;
> > typedef int32 port_id;
> > typedef int32 sem_id;
> > typedef int32 team_id;
> > typedef int32 thread_id;
> 
> Dunno how useful that is - if you are going to have sems and ports in 
> your structures, you may want to use the corresponding functions as 
> well.

This is true to some extent.  If we wanted to use these types in the
posix headers we could have gotten away with just having the field
types included in the header, and then included the functions header
in the sources.  I also wouldn't have a problem with splitting off each
group of types and functions into their own header: (Semaphores.h,
Areas.h, etc.)  But that's based more on an aesthetic argument and
less of one motivated by todays concerns.

> Do we have to do this now? At least, I never had many issues with it 
> when porting software, only "bool" was problematic once (but that could 
> be solved as well).

Yeah I once had a problem with a program that #define'd bool
in _C++ code_.  And lots of auto-generated files did this before
including the system headers, which meant the prototypes were
different and it wouldn't link and... But that's a different story. :-)

Seeing as Philippe is aware of the issue with sys/socketvar,
presumably our need for doing anything like that is going
to depend on the outcome of moving those headers to private.

Andrew


Other related posts: