[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] Avoid pthread_sigmask on Win32 platforms



On Thu, Feb 10, 2011 at 03:38:08PM +0100, Matthias Bolte wrote:
> 2011/2/10 Daniel P. Berrange <berrange redhat com>:
> > On Thu, Feb 10, 2011 at 03:20:37PM +0100, Matthias Bolte wrote:
> >> 2011/2/10 Daniel P. Berrange <berrange redhat com>:
> >> > Win32 doesn't have a concept of signal masks so disable that
> >> > code. It is unclear how SIGINT is delivered (if at all) on
> >> > Win32, so this might further work to provide an alternative
> >> > to pthread_sigmask
> >> >
> >> > * tools/virsh.c: Avoid pthread_sigmask on Win32
> >> > ---
> >>
> >> ACK. This fixes one of the current problems on Win32.
> >
> > This was the only problem I see with Win32. What others do you see ?
> >
> > Regards,
> > Daniel
> 
> I get errors like this related to %lld in format strings:
> 
> virsh.c: In function 'cmdDomblkstat':
> virsh.c:990:9: warning: unknown conversion type character 'l' in
> format [-Wformat]
> 
> The problem goes away when I replace the define for vshPrint
> 
> #define vshPrint(ctl, ...) fprintf(stdout, __VA_ARGS__)
> 
> by this function
> 
> static void
> vshPrint(vshControl *ctl ATTRIBUTE_UNUSED, const char *format, ...)

I'm surprised you didn't need to annotate this
with ATTRIBUTE_FMT_PRINTF, otherwise gcc would
assume win32 printf style, rather than gnu IIUC.

> {
>     va_list ap;
> 
>     va_start(ap, format);
>     vfprintf(stdout, format, ap);
>     va_end(ap);
> }
> 
> I'm not sure why this became a problem now, as vshPrint is a define
> since 2006 and virsh used to compile before. Maybe this is an issue
> with gnulib in the current libvirt-0.8.8-rc1 tarball, as I'm testing
> based on this tarball it.
> 
> Are you compiling this from a git checkout or a tarball?

I'm using GIT.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]