Re: [PATCH v2 2/4] Remove windows thread implementation in favour of pthreads

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

 



On Tue, Jan 28, 2014 at 08:12:35AM -0700, Eric Blake wrote:
> On 01/28/2014 08:10 AM, Daniel P. Berrange wrote:
> > On Mon, Jan 27, 2014 at 03:47:19PM -0700, Eric Blake wrote:
> >> On 01/27/2014 10:18 AM, Daniel P. Berrange wrote:
> >>> There are a number of pthreads impls available on Win32
> >>> these days, in particular the mingw64 project has a good
> >>> impl. Delete the native windows thread implementation and
> >>> rely on using pthreads everywhere.
> >>>
> >>> Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
> >>> ---
> >>
> >> I'm still a bit worried about alienating F19 or RHEL.
> > 
> > So I tested on F19 with this series applied and hit a small problem
> > 
> >   CC       util/libvirt_util_la-viraudit.lo
> > In file included from util/virstoragefile.h:28:0,
> >                  from util/virfile.h:32,
> >                  from util/viraudit.c:33:
> > util/virutil.h:118:19: error: conflicting types for 'pthread_sigmask'
> >  static inline int pthread_sigmask(int how,
> >                    ^
> > In file included from util/viraudit.c:27:0:
> > ../gnulib/lib/signal.h:451:1: note: previous declaration of 'pthread_sigmask' was here
> >  _GL_FUNCDECL_SYS (pthread_sigmask, int,
> >  ^
> > 
> 
> Okay, I'll fire up my F19 vm and resolve the issue (not sure yet if the
> solution will require another gnulib submodule update...)

Actually I think it is easy to fix - we just look at ac_cv_func_pthread_sigmask
which gnulib will have already set ie


@@ -288,18 +288,21 @@ fi
 dnl At least mingw64-winpthreads #defines pthread_sigmask to 0,
 dnl which in turn causes compilation to complain about unused variables.
 dnl Expose this broken implementation, so we can work around it.
-AC_CACHE_CHECK([whether pthread_sigmask does anything],
-  [lv_cv_pthread_sigmask_works],
-  [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-    #include <sys/types.h>
-    #include <signal.h>
-  ]], [[
-   int (*foo)(int, const sigset_t *, sigset_t *) = &pthread_sigmask;
-   return !foo;
-  ]])], [lv_cv_pthread_sigmask_works=yes], [lv_cv_pthread_sigmask_works=no])])
-if test "x$lv_cv_pthread_sigmask_works" != xyes; then
+if test $ac_cv_func_pthread_sigmask = yes
+then
+  AC_CACHE_CHECK([whether pthread_sigmask does anything],
+    [lv_cv_pthread_sigmask_works],
+    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+      #include <sys/types.h>
+      #include <signal.h>
+    ]], [[
+     int (*foo)(int, const sigset_t *, sigset_t *) = &pthread_sigmask;
+     return !foo;
+    ]])], [lv_cv_pthread_sigmask_works=yes], [lv_cv_pthread_sigmask_works=no])])
+  if test "x$lv_cv_pthread_sigmask_works" != xyes; then
   AC_DEFINE([FUNC_PTHREAD_SIGMASK_BROKEN], [1],
     [Define to 1 if pthread_sigmask is not a real function])
+  fi
 fi
 LIBS=$old_libs
 
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 :|

--
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]