[Nut-upsdev] windows_port NUT branch
Paul Fertser
fercerpav at gmail.com
Thu Dec 16 13:47:01 UTC 2010
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 :)
> > 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.
--
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav at gmail.com
More information about the Nut-upsdev
mailing list