Hey Max,
Thanks for taking a look!
----- "Max Matveev" <makc@xxxxxxxxx> wrote:
> >>>>> "nscott" == Nathan Scott <nscott@xxxxxxxxxx> writes:
>
> nscott> commit e199ed1bf99e785d37375499303966613c9c4920
> nscott> Author: Nathan Scott <nathans@xxxxxxxxxx>
> nscott> Date: Wed Apr 1 16:27:51 2009 +1100
>
> nscott> Changes to get MMV PMDA and library to build on Windows.
>
> nscott> In particular:
> nscott> - Use Win32 memory mapping routines on win32, mmap on
> POSIX.
> nscott> - Use lseek+write instead of pwrite
> nscott> - Dont initialise global variables to zero/null
> (cleanup)
> nscott> - use system instead of fork+exec+waitpid
> nscott> - use nanosleep instead of select-for-short-sleep
>
> nscott> Also fix gcc warning about unhandled MMV_ENTRY_NOSUPPORT
> case.
> I thought I've fixed that...
Guess not mate, I got a warning "unhandled case in switch" or some such.
> nscott> Some path issues remain however, need to discuss how to
> fix up
> nscott> those, esp in the ("standalone") library.
> I've going to ask about including pcp headers in mmv_stats.c: why? Is
> it just to get HAVE_XXX defined?
Yes. I noticed we include pmapi.h from mmv_stats.h already too, so
didn't seem like a big deal.
We need to talk about this not-linking-with-libpcp issue (and re-writing
pmGetConfig() as a result) ... whats the goal there? (i.e. under what
siuations would someone have libpcp_mmv but not libpcp available). Not
clear we're solving a real problem there (we jumped through similar hoops
for libpcp_trace and I'm unconvinced it was worth it, or anyone cared.
Its going to be a problem on Windows as we'll need the magic pixie dust
for path translation in some places, and probably other things. That
mmap abstraction should probably go in libpcp too, and be used throughout
the pcp code, instead of having that ifdef'ery spread throughout.
We have a similar problem with libpcp_trace, but worse ... that code (the
protocol level stuff in particular) was forked from libpcp ages back in
order to have the same "you don't need to link with libpcp" property, but
I'm regretting it now. At some point I think I'll need to revist that, to
get the trace stuff working on Windows (all the pmmoreinput changes were
not made to libpcp_trace, for example...).
cheers.
--
Nathan
|