Re: [libvirt] [PATCH] Cygwin's GCC doesn't like this .sa_handler initialization for some reason

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

 



On Mon, Apr 26, 2010 at 06:46:31PM -0400, Stefan Berger wrote:
> libvir-list-bounces@xxxxxxxxxx wrote on 04/26/2010 03:20:47 PM:
> 
> 
> > > static struct sigaction zero_sigaction = {0};
> > > struct sigaction action_stop = zero_sigaction;
> > > action_stop.sa_handler = stop;
> > >
> > > But don't go changing this commit just for that theoretical platform.
> > >
> > 
> > Thanks, pushed.
> > 
> 
> Does it compile for you on cygwin?
> 
> I need to make the following changes just to get it to link properly:
> 
> 
> diff --git a/src/Makefile.am b/src/Makefile.am
> index fc64927..723d221 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -928,7 +928,7 @@ libvirt.def: libvirt.syms
>  libvirt_la_SOURCES =
>  libvirt_la_LIBADD += \
>                     $(CYGWIN_EXTRA_LIBADD) ../gnulib/lib/libgnu.la
> -libvirt_la_LDFLAGS = $(VERSION_SCRIPT_FLAGS)$(LIBVIRT_SYMBOL_FILE) \
> +libvirt_la_LDFLAGS = \
>                       -version-info $(LIBVIRT_VERSION_INFO) \
>                      $(COVERAGE_CFLAGS:-f%=-Wc,-f%) \
>                      $(LIBXML_LIBS) \
> diff --git a/src/remote/remote_protocol.c b/src/remote/remote_protocol.c
> index c9816dd..854b0fd 100644
> --- a/src/remote/remote_protocol.c
> +++ b/src/remote/remote_protocol.c
> @@ -413,12 +413,12 @@ xdr_remote_node_get_info_ret (XDR *xdrs, 
> remote_node_get_info_ret *objp)
>                           if (!xdr_int (xdrs, &objp->threads))
>                                   return FALSE;
>                  } else {
> -                        (void)IXDR_PUT_INT32(buf, objp->cpus);
> -                        (void)IXDR_PUT_INT32(buf, objp->mhz);
> -                        (void)IXDR_PUT_INT32(buf, objp->nodes);
> -                        (void)IXDR_PUT_INT32(buf, objp->sockets);
> -                        (void)IXDR_PUT_INT32(buf, objp->cores);
> -                        (void)IXDR_PUT_INT32(buf, objp->threads);
> +                        (void)IXDR_PUT_LONG(buf, objp->cpus);
> +                        (void)IXDR_PUT_LONG(buf, objp->mhz);
> +                        (void)IXDR_PUT_LONG(buf, objp->nodes);
> +                        (void)IXDR_PUT_LONG(buf, objp->sockets);
> +                        (void)IXDR_PUT_LONG(buf, objp->cores);
> +                        (void)IXDR_PUT_LONG(buf, objp->threads);
>                  }
>                  return TRUE;
>          } else if (xdrs->x_op == XDR_DECODE) {
> @@ -442,12 +442,12 @@ xdr_remote_node_get_info_ret (XDR *xdrs, 
> remote_node_get_info_ret *objp)
>                           if (!xdr_int (xdrs, &objp->threads))
>                                   return FALSE;
>                  } else {
> -                        objp->cpus = IXDR_GET_INT32(buf);
> -                        objp->mhz = IXDR_GET_INT32(buf);
> -                        objp->nodes = IXDR_GET_INT32(buf);
> -                        objp->sockets = IXDR_GET_INT32(buf);
> -                        objp->cores = IXDR_GET_INT32(buf);
> -                        objp->threads = IXDR_GET_INT32(buf);
> +                        objp->cpus = IXDR_GET_LONG(buf);
> +                        objp->mhz = IXDR_GET_LONG(buf);
> +                        objp->nodes = IXDR_GET_LONG(buf);
> +                        objp->sockets = IXDR_GET_LONG(buf);
> +                        objp->cores = IXDR_GET_LONG(buf);
> +                        objp->threads = IXDR_GET_LONG(buf);
>                  }
>           return TRUE;
>          }

NACK to this  change. It is reverting

  commit 9322b2e8617bf7f4a4d9b8a686dcf130efb2d652
  Author: Daniel P. Berrange <berrange@xxxxxxxxxx>
  Date:   Wed Jan 28 21:33:56 2009 +0000

     Solaris portability for RPC code data types


If the Cygwin XDR doesn't support this, then just build the portablexdr
library & use that instead, since that is 100% compatible with glibc.

  http://people.redhat.com/~rjones/portablexdr/

Daniel
-- 
|: Red Hat, Engineering, London    -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org        -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]