[Nut-upsdev] windows_port NUT branch

Arnaud Quette aquette.dev at gmail.com
Thu Dec 16 15:20:54 UTC 2010


Hi Paul,

2010/12/16 Paul Fertser

> On Thu, Dec 16, 2010 at 01:16:33PM +0100, Frédéric Bohé wrote:
> > > This adds defines for usleep (windows lacks that) and also missing
> > > define for SVC_EVENT.
> >
> > I have no problem compiling with usleep here. Can you give me the error
> > string you get on this ?
>
> Undefined reference of course. Ok, where does your usleep implementation
> come
> from? In fact i tried to google about it but wasn't convinced that newer
> mingw
> has that. Is it really available from mingw or do i need some additional
> library?
>
> > As a side note, beware that your implementation of usleep could lead to
> > call Sleep(0) (immediate return) if n<1000. usleep is supposed to round
> > up the time spent depending on system activity and timers granularity.
>
> Indeed :)
>
> > Concerning SVC_EVENT, it is declared in winevent.h which is a generated
> > file from winevent.mc as well as a DLL required for the Windows Event
> > log. Here is how it works:
> >
> > windmc winevent.mc
> > windres winevent.rc winevent.o
> > dllwrap --output-lib=libwinevent.a --dllname=winevent.dll
> > --driver-name=gcc winevent.o
> >
> > Note that this should be automated soon in the Makefile.
>
> Ah, ok, i had no idea about these complicated moves, so i was rather
> puzzled :)
>

this is now available in r2743.


>  > > Thanks again and happy hacking :)
> >
> > Thanks for your interest and do not hesitate to send your feedback on
> > working or non working drivers.
>
> Will do soon with serial megatec, thanks.
>

prefer to test using blazer_ser since it will replace the megatec drivers by
2.6.0 (so very soon!)

cheers,
Arnaud
-- 
Linux / Unix Expert R&D - Eaton - http://powerquality.eaton.com
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.free.fr/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20101216/c19a6568/attachment.htm>


More information about the Nut-upsdev mailing list