Re: namespace.h

2011-04-21 Thread David Coppa
On Wed, Apr 20, 2011 at 9:19 PM, Amit Kulkarni amitk...@gmail.com wrote:
 Hi,
 Then I think its better to work on lldb on FreeBSD because I can't
 figure out the header issues right now. I will install qemu and try it out. 
 Sorry
 for the bother. Whenever lldb is working on fbsd then soem experts can
 come in and get it working for obsd!

FreeBSD supports POSIX shared memory, while OpenBSD does not.
I think implementing shm_open, shm_unlink is not a trivial task, nor
modifying lldb code to work around the missing functions...

ciao,
david



Re: namespace.h

2011-04-21 Thread Matthew Dempsky
On Thu, Apr 21, 2011 at 11:14 AM, Matthew Dempsky matt...@dempsky.org
wrote:
 We do have shmat(2) and shmdt(2).  Can't you just use
 open(2)/unlink(2) instead of shm_open()/shm_unlink()?

Bah, ignore that.



Re: namespace.h

2011-04-21 Thread Matthew Dempsky
On Thu, Apr 21, 2011 at 12:49 AM, David Coppa dco...@gmail.com wrote:
 FreeBSD supports POSIX shared memory, while OpenBSD does not.
 I think implementing shm_open, shm_unlink is not a trivial task, nor
 modifying lldb code to work around the missing functions...

We do have shmat(2) and shmdt(2).  Can't you just use
open(2)/unlink(2) instead of shm_open()/shm_unlink()?



Re: namespace.h

2011-04-21 Thread Amit Kulkarni
Just commented out that shm_open/unlink portion, yes yes I know its
bad. But spawn.h + posix_spawn.c is absolutely needed for lldb, and it
will need heavy commentary from the header guys just like the recent
fenv.h changes. Otherwise, the alternative is ugly and a patch set for
lldb which is more of a pain to maintain in years ahead.

Its much easier to see if FreeBSD can work as close to unmodified
before I revisit this issue back on tech@ to see how to bring initial
support lldb in OpenBSD. Will have gained some more experience then.

On Thu, Apr 21, 2011 at 1:15 PM, Matthew Dempsky matt...@dempsky.org wrote:
 On Thu, Apr 21, 2011 at 11:14 AM, Matthew Dempsky matt...@dempsky.org
wrote:
 We do have shmat(2) and shmdt(2).  Can't you just use
 open(2)/unlink(2) instead of shm_open()/shm_unlink()?

 Bah, ignore that.



Re: namespace.h

2011-04-20 Thread Philip Guenther
On Tue, Apr 19, 2011 at 9:15 PM, Amit Kulkarni amitk...@gmail.com wrote:
 where is a listing of all functions implemented in openbsd's libc?

nm /usr/lib/libc.a ?  What's the question that you're *really*
trying to answer?


 Is src/lib/libc/include/namespace.h consist of functions not implemented or
 its a relic?

Neither.


 i was looking for the equivalent of FreeBSD's file of the same name and
 location but in OpenBSD.

Our file serves the same purpose as FreeBSD's, it's just incomplete.
What do you think FreeBSD is for/does?


Philip Guenther



Re: namespace.h

2011-04-20 Thread Amit Kulkarni
 where is a listing of all functions implemented in openbsd's libc?

 nm /usr/lib/libc.a ?  What's the question that you're *really*
 trying to answer?

Just trying to see how far llvm+lldb goes in compilation. Right now
its stuck because of missing spawn.h in OpenBSD. And also stuck in
shm_open, shm_unlink, all of which Posix states is optional.

Is it then okay for me to update namespace.h to what I can glean from
/usr/src?

 Is src/lib/libc/include/namespace.h consist of functions not implemented
or
 its a relic?

 Neither.


 i was looking for the equivalent of FreeBSD's file of the same name and
 location but in OpenBSD.

 Our file serves the same purpose as FreeBSD's, it's just incomplete.
 What do you think FreeBSD is for/does?

I think FreeBSD's file is present so it can handle posix compatibility
by undef all of the namespace functionality in un-namespace.h. Beyond
that I haven't looked.

Thanks



Re: namespace.h

2011-04-20 Thread Joerg Sonnenberger
On Tue, Apr 19, 2011 at 11:15:49PM -0500, Amit Kulkarni wrote:
 where is a listing of all functions implemented in openbsd's libc? Is 
 src/lib/libc/include/namespace.h consist of functions not implemented or 
 its a relic?

namespace.h is used for protecting the libc namespace. A library may
overwrite many of the libc entry points and the header is used to
prevent that. It is not a full enumeration of the functions implemented
in libc.

Joerg



namespace.h

2011-04-19 Thread Amit Kulkarni
hi,

where is a listing of all functions implemented in openbsd's libc? Is 
src/lib/libc/include/namespace.h consist of functions not implemented or 
its a relic?

i was looking for the equivalent of FreeBSD's file of the same name and 
location but in OpenBSD.

thanks,
amit