I modified ow_dir.c to use the NO_NESTED_FUNCTIONS macro instead of
the __MacOS__ macro. The change has been check into CVS.

- Peter


On 10/9/06, Paul Alfille <[EMAIL PROTECTED]> wrote:
> So you want to keep the nested function and force nested with a command line
> switch? Sounds good to me. I found extensive discussions about executable
> stacks, trampolines, etc.
>
> Otherwise the CVS has a work-around for Mac in ow_dir.c using a mutex and
> global variable.
>
> Paul Alfille
>
>
> On 10/9/06, Peter Kropf <[EMAIL PROTECTED]> wrote:
> >
> > Things are progressing. I've just committed a couple of changes that
> > will allow for testing the compiler for nested function support during
> > the initial bootstrap / configure steps. See acinclude.m4 and
> > configure.ac for the changes. And the ow_dir.c module has been updated
> > to use the new NO_NESTED_FUNCTIONS macro to determine which way to go.
> > I thought this might be a better way to support nested functions
> > instead of making it platform specific.
> >
> > With the new code in place, the ow_dir.c module compiles. But the
> > build craps out on the ow_fake.c module. There's another nested
> > function there. I haven't fixed it yet but should get to it tomorrow.
> >
> > I would appreciate another pair of eyes looking over the changes I've
> > made to make sure they're sane and that I haven't snafued any other
> > platforms.
> >
> > Thanks.
> >
> > - Peter
> >
> >
> > On 10/8/06, Paul Alfille < [EMAIL PROTECTED]> wrote:
> > > Ok, I think the fix is in, though I can't test it without the correct
> target
> > > platform.
> > >
> > > Basically, I made global variables for the information we were tacitly
> > > passing, and put in a lock to protect them. Should be a big performance
> > > problem -- these directories are being pulled from RAM, not the 1-wire
> bus.
> > > Made the changes __MacOSX__ specific.
> > >
> > >
> > > On 10/8/06, Paul Alfille <[EMAIL PROTECTED]> wrote:
> > > > I can see why you hesitated with the nested function. There is no
> place to
> > > pass data into the function. Our choices are:
> > > > 1. Write our own "twalk"
> > > > 2. Use global variables and a mutex.
> > > >
> > > > I guess I'll do the later for the Mac. What's the "#define" for Mac?
> > > >
> > > > Paul
> > > >
> > > >
> > > >
> > > > On 10/8/06, Peter Kropf < [EMAIL PROTECTED]> wrote:
> > > > > Ok, I've fixed the makefile problem - there was an extra space after
> a
> > > > > backslash.
> > > > >
> > > > > The nested function seems to be a bit over my head right now. I'm
> not
> > > > > seeing a reasonable way to pass the pn2 variable to the action
> > > > > function. But I will take another shot at it tomorrow evening unless
> > > > > someone else gets there first ;-)
> > > > >
> > > > > - Peter
> > > > >
> > > > >
> > > > > On 10/7/06, Peter Kropf < [EMAIL PROTECTED] > wrote:
> > > > > > I'll start looking into it tonight but I'm not going to be able to
> > > > > > spend too much time on it. Getting late here and I need to be up &
> out
> > > > > > early tomorrow morning. Worst case, I'll start on it again
> tomorrow
> > > > > > evening.
> > > > > >
> > > > > > - Peter
> > > > > >
> > > > > >
> > > > > > On 10/7/06, Paul Alfille < [EMAIL PROTECTED] > wrote:
> > > > > > > Hi Peter,
> > > > > > >
> > > > > > > In the first instance, the tab was probably added automatically
> by
> > > the
> > > > > > > editor. Tabs are handled specially in makefiles, and if you can
> fix
> > > it, I'd
> > > > > > > be pleased.
> > > > > > >
> > > > > > > Nested functions: They are there only for convenience. All the
> ones
> > > dealing
> > > > > > > with threads were removed because of changes in recent linux
> kernels
> > > -- a
> > > > > > > security risk. Removing them involves some work with packing the
> > > relevant
> > > > > > > shared variables in a structure, and allocating memory if the
> > > subroutine is
> > > > > > > in a separate thread (so heap variables in one thread don't get
> > > reclaimed
> > > > > > > before the other thread is done with them).
> > > > > > >
> > > > > > > Again, if you want to tackle this, I'd be pleased. Otherwise
> I'll
> > > look at it
> > > > > > > tomorrow.
> > > > > > >
> > > > > > > A new release for the Mac platform would be great. The owshell
> > > functions
> > > > > > > would be especially useful there since FUSE is not supported as
> far
> > > as I
> > > > > > > know making shell access to the 1-wire bus is difficult.
> > > > > > >
> > > > > > > Paul Alfille
> > > > > > >
> > > > > > >
> > > > > > > On 10/8/06, Peter Kropf <[EMAIL PROTECTED]> wrote:
> > > > > > > >
> > > > > > > > Hi -
> > > > > > > >
> > > > > > > > Due to the recent demise of my Thinkpad, I'm not working on a
> > > MacBook
> > > > > > > > Pro. Things here are different but still very similar. But
> pretty
> > > fun.
> > > > > > > >
> > > > > > > > I'm just getting around to building owfs for the first time on
> > > MacOSX
> > > > > > > > and have run into a couple of problems. I would like to know
> if
> > > anyone
> > > > > > > > else is using MacOSX for their development. There's at least
> one
> > > > > > > > outstanding fix needed for the Python module and I'd like to
> get
> > > > > > > > moving on getting it done.
> > > > > > > >
> > > > > > > > The first problem is pretty minor but I'm not sure why it's
> > > happening.
> > > > > > > > The generated src/man/Makefile, there's a problem:
> > > > > > > >
> > > > > > > > fog:~/src/owfs peter$ make
> > > > > > > > Making all in src
> > > > > > > > Making all in include
> > > > > > > > make  all-am
> > > > > > > > Making all in man
> > > > > > > > Makefile:531: *** missing separator (did you mean TAB instead
> of 8
> > > > > > > > spaces?).  Stop.
> > > > > > > > make[1]: *** [all-recursive] Error 1
> > > > > > > > make: *** [all-recursive] Error 1
> > > > > > > > fog:~/src/owfs peter$
> > > > > > > >
> > > > > > > > Looking at the Makefile, the owtcl.n is on a line all by
> itself
> > > > > > > > preceeded by 8 spaces. Very strange but I should be able to
> figure
> > > out
> > > > > > > > why and fix it.
> > > > > > > >
> > > > > > > > The second problem is a bit more involved. The
> > > > > > > > module/owlib/src/c/ow_dir.c file contains a nested function in
> > > > > > > > FS_typedir around line 441. Nested functions aren't supported
> on
> > > > > > > > MacOSX. Before I make changes to this file and possibly screw
> > > things
> > > > > > > > up, I wanted to find out if nested functions are needed for a
> > > > > > > > particular reason. And if the solution is as simple as moving
> the
> > > > > > > > action function outside the scope of the FS_typedir function.
> Let
> > > me
> > > > > > > > know...
> > > > > > > >
> > > > > > > > Thanks!
> > > > > > > >
> > > > > > > > - Peter
> > > > > > > >
> > > > > > > >
> > > > > > >
> > >
> -------------------------------------------------------------------------
> > > > > > > > Take Surveys. Earn Cash. Influence the Future of IT
> > > > > > > > Join SourceForge.net's Techsay panel and you'll get the chance
> to
> > > share
> > > > > > > your
> > > > > > > > opinions on IT & business topics through brief surveys -- and
> earn
> > > cash
> > > > > > > >
> > > > > > >
> > >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > > > > > > >
> _______________________________________________
> > > > > > > > Owfs-developers mailing list
> > > > > > > > Owfs-developers@lists.sourceforge.net
> > > > > > > >
> > > > > > >
> > >
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > >
> -------------------------------------------------------------------------
> > > > > > > Take Surveys. Earn Cash. Influence the Future of IT
> > > > > > > Join SourceForge.net's Techsay panel and you'll get the chance
> to
> > > share your
> > > > > > > opinions on IT & business topics through brief surveys -- and
> earn
> > > cash
> > > > > > >
> > >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > > > > > >
> > > > > > > _______________________________________________
> > > > > > > Owfs-developers mailing list
> > > > > > > Owfs-developers@lists.sourceforge.net
> > > > > > >
> > >
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > >
> -------------------------------------------------------------------------
> > > > > Take Surveys. Earn Cash. Influence the Future of IT
> > > > > Join SourceForge.net's Techsay panel and you'll get the chance to
> share
> > > your
> > > > > opinions on IT & business topics through brief surveys -- and earn
> cash
> > > > >
> > >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > > > > _______________________________________________
> > > > > Owfs-developers mailing list
> > > > > Owfs-developers@lists.sourceforge.net
> > > > >
> > >
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
> > > > >
> > > >
> > > >
> > >
> > >
> > >
> -------------------------------------------------------------------------
> > > Take Surveys. Earn Cash. Influence the Future of IT
> > > Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> > > opinions on IT & business topics through brief surveys -- and earn cash
> > >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > >
> > > _______________________________________________
> > > Owfs-developers mailing list
> > > Owfs-developers@lists.sourceforge.net
> > >
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
> > >
> > >
> > >
> >
> >
> -------------------------------------------------------------------------
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> > opinions on IT & business topics through brief surveys -- and earn cash
> >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > _______________________________________________
> > Owfs-developers mailing list
> > Owfs-developers@lists.sourceforge.net
> >
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
> >
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
> _______________________________________________
> Owfs-developers mailing list
> Owfs-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>
>
>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to