提交 32fe3864 编写于 作者: D Daniel P. Berrangé

src: remove all traces of Cygwin support

Cygwin is not a supported build platform for libvirt and
has no testing coverage in our CI systems. Stop pretending
the code is usable and remove it so there is less to port
to Meson.
Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 19ae6465
...@@ -181,8 +181,6 @@ case "$host" in ...@@ -181,8 +181,6 @@ case "$host" in
# mingw's ld has the --version-script parameter, but it requires a .def file # mingw's ld has the --version-script parameter, but it requires a .def file
# instead to work properly, therefore clear --version-script here and use # instead to work properly, therefore clear --version-script here and use
# -Wl, to pass the .def file to the linker # -Wl, to pass the .def file to the linker
# cygwin's ld has the --version-script parameter too, but for some reason
# it's working there as expected
VERSION_SCRIPT_FLAGS="-Wl," VERSION_SCRIPT_FLAGS="-Wl,"
;; ;;
* ) * )
...@@ -204,13 +202,12 @@ dnl are also linux specific. The "network" and storage_fs drivers are known ...@@ -204,13 +202,12 @@ dnl are also linux specific. The "network" and storage_fs drivers are known
dnl to not work on macOS presently, so we also make a note if compiling dnl to not work on macOS presently, so we also make a note if compiling
dnl for that dnl for that
with_linux=no with_macos=no with_freebsd=no with_win=no with_cygwin=no with_linux=no with_macos=no with_freebsd=no with_win=no
case $host in case $host in
*-*-linux*) with_linux=yes ;; *-*-linux*) with_linux=yes ;;
*-*-darwin*) with_macos=yes ;; *-*-darwin*) with_macos=yes ;;
*-*-freebsd*) with_freebsd=yes ;; *-*-freebsd*) with_freebsd=yes ;;
*-*-mingw* | *-*-msvc* ) with_win=yes ;; *-*-mingw* | *-*-msvc* ) with_win=yes ;;
*-*-cygwin*) with_cygwin=yes ;;
esac esac
if test $with_linux = no; then if test $with_linux = no; then
...@@ -227,9 +224,6 @@ if test $with_freebsd = yes; then ...@@ -227,9 +224,6 @@ if test $with_freebsd = yes; then
with_firewalld=no with_firewalld=no
fi fi
if test $with_cygwin = yes; then
with_vbox=no
fi
AM_CONDITIONAL([WITH_LINUX], [test "$with_linux" = "yes"]) AM_CONDITIONAL([WITH_LINUX], [test "$with_linux" = "yes"])
AM_CONDITIONAL([WITH_FREEBSD], [test "$with_freebsd" = "yes"]) AM_CONDITIONAL([WITH_FREEBSD], [test "$with_freebsd" = "yes"])
...@@ -778,9 +772,8 @@ if test "$enable_test_coverage" = yes; then ...@@ -778,9 +772,8 @@ if test "$enable_test_coverage" = yes; then
WARN_CFLAGS=$save_WARN_CFLAGS WARN_CFLAGS=$save_WARN_CFLAGS
fi fi
dnl Cygwin, MinGW and MSVC checks dnl MinGW checks
LIBVIRT_WIN_CHECK_COMMON LIBVIRT_WIN_CHECK_COMMON
LIBVIRT_WIN_CHECK_CYGWIN
LIBVIRT_WIN_CHECK_MINGW LIBVIRT_WIN_CHECK_MINGW
LIBVIRT_WIN_CHECK_SYMBOLS LIBVIRT_WIN_CHECK_SYMBOLS
LIBVIRT_WIN_CHECK_WINDRES LIBVIRT_WIN_CHECK_WINDRES
......
...@@ -22,7 +22,7 @@ AC_DEFUN([LIBVIRT_COMPILE_PIE],[ ...@@ -22,7 +22,7 @@ AC_DEFUN([LIBVIRT_COMPILE_PIE],[
PIE_CFLAGS= PIE_CFLAGS=
PIE_LDFLAGS= PIE_LDFLAGS=
case "$host" in case "$host" in
*-*-mingw* | *-*-msvc* | *-*-cygwin* ) *-*-mingw* )
;; dnl All code is position independent on Win32 target ;; dnl All code is position independent on Win32 target
*) *)
gl_COMPILER_OPTION_IF([-fPIE -DPIE -pie], [ gl_COMPILER_OPTION_IF([-fPIE -DPIE -pie], [
......
dnl The Cygwin, MinGW and MSVC common checks dnl The MinGW common checks
dnl dnl
dnl Copyright (C) 2016 Red Hat, Inc. dnl Copyright (C) 2016 Red Hat, Inc.
dnl dnl
...@@ -22,7 +22,7 @@ AC_DEFUN([LIBVIRT_WIN_CHECK_COMMON], [ ...@@ -22,7 +22,7 @@ AC_DEFUN([LIBVIRT_WIN_CHECK_COMMON], [
WIN32_EXTRA_LIBS= WIN32_EXTRA_LIBS=
case "$host" in case "$host" in
*-*-mingw* | *-*-cygwin* | *-*-msvc* ) *-*-mingw* )
WIN32_EXTRA_LIBS="-lole32 -loleaut32" WIN32_EXTRA_LIBS="-lole32 -loleaut32"
# If the host is Windows, and shared libraries are disabled, we # If the host is Windows, and shared libraries are disabled, we
# need to add -DLIBVIRT_STATIC to the CFLAGS for proper linking # need to add -DLIBVIRT_STATIC to the CFLAGS for proper linking
...@@ -38,7 +38,5 @@ AC_DEFUN([LIBVIRT_WIN_CHECK_COMMON], [ ...@@ -38,7 +38,5 @@ AC_DEFUN([LIBVIRT_WIN_CHECK_COMMON], [
AC_DEFUN([LIBVIRT_WIN_RESULT_COMMON], [ AC_DEFUN([LIBVIRT_WIN_RESULT_COMMON], [
details="CFLAGS='$WIN32_EXTRA_CFLAGS' LIBS='$WIN32_EXTRA_LIBS'" details="CFLAGS='$WIN32_EXTRA_CFLAGS' LIBS='$WIN32_EXTRA_LIBS'"
LIBVIRT_RESULT([Cygwin], [$with_cygwin], [$details]) LIBVIRT_RESULT([MinGW], [$with_win], [$details])
LIBVIRT_RESULT([MinGW], [$with_cygwin], [$details])
LIBVIRT_RESULT([MSVC], [$with_cygwin], [$details])
]) ])
dnl The Cygwin check
dnl
dnl Copyright (C) 2016 Red Hat, Inc.
dnl
dnl This library is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Lesser General Public
dnl License as published by the Free Software Foundation; either
dnl version 2.1 of the License, or (at your option) any later version.
dnl
dnl This library is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl Lesser General Public License for more details.
dnl
dnl You should have received a copy of the GNU Lesser General Public
dnl License along with this library. If not, see
dnl <http://www.gnu.org/licenses/>.
dnl
AC_DEFUN([LIBVIRT_WIN_CHECK_CYGWIN], [
CYGWIN_EXTRA_LDFLAGS=
CYGWIN_EXTRA_LIBADD=
case "$host" in
*-*-cygwin*)
CYGWIN_EXTRA_LDFLAGS="-no-undefined"
CYGWIN_EXTRA_LIBADD="${INTLLIBS}"
;;
esac
AC_SUBST([CYGWIN_EXTRA_LDFLAGS])
AC_SUBST([CYGWIN_EXTRA_LIBADD])
])
dnl The Cygwin, MinGW and MSVC symbols checks dnl The MinGW symbols checks
dnl dnl
dnl Copyright (C) 2016 Red Hat, Inc. dnl Copyright (C) 2016 Red Hat, Inc.
dnl dnl
...@@ -23,7 +23,7 @@ AC_DEFUN([LIBVIRT_WIN_CHECK_SYMBOLS], [ ...@@ -23,7 +23,7 @@ AC_DEFUN([LIBVIRT_WIN_CHECK_SYMBOLS], [
LIBVIRT_LXC_SYMBOL_FILE='$(srcdir)/libvirt_lxc.syms' LIBVIRT_LXC_SYMBOL_FILE='$(srcdir)/libvirt_lxc.syms'
LIBVIRT_QEMU_SYMBOL_FILE='$(srcdir)/libvirt_qemu.syms' LIBVIRT_QEMU_SYMBOL_FILE='$(srcdir)/libvirt_qemu.syms'
case "$host" in case "$host" in
*-*-mingw* | *-*-msvc* ) *-*-mingw* )
# Also set the symbol file to .def, so src/Makefile generates libvirt.def # Also set the symbol file to .def, so src/Makefile generates libvirt.def
# from libvirt.syms and passes libvirt.def instead of libvirt.syms to the # from libvirt.syms and passes libvirt.def instead of libvirt.syms to the
# linker # linker
......
dnl The Cygwin, MinGW and MSVC windres checks dnl The MinGW windres checks
dnl dnl
dnl Copyright (C) 2016 Red Hat, Inc. dnl Copyright (C) 2016 Red Hat, Inc.
dnl dnl
...@@ -21,7 +21,7 @@ AC_DEFUN([LIBVIRT_WIN_CHECK_WINDRES], [ ...@@ -21,7 +21,7 @@ AC_DEFUN([LIBVIRT_WIN_CHECK_WINDRES], [
dnl Look for windres to build a Windows icon resource. dnl Look for windres to build a Windows icon resource.
with_windres=no with_windres=no
case "$host" in case "$host" in
*-*-mingw* | *-*-cygwin* | *-*-msvc* ) *-*-mingw* )
AC_CHECK_TOOL([WINDRES], [windres], []) AC_CHECK_TOOL([WINDRES], [windres], [])
if test "x$WINDRES" != "x"; then if test "x$WINDRES" != "x"; then
with_windres=yes with_windres=yes
......
...@@ -22,18 +22,15 @@ AC_DEFUN([LIBVIRT_CHECK_XDR], [ ...@@ -22,18 +22,15 @@ AC_DEFUN([LIBVIRT_CHECK_XDR], [
if test x"$with_remote" = x"yes" || test x"$with_libvirtd" = x"yes"; then if test x"$with_remote" = x"yes" || test x"$with_libvirtd" = x"yes"; then
dnl Where are the XDR functions? dnl Where are the XDR functions?
dnl If portablexdr is installed, prefer that. dnl If portablexdr is installed, prefer that.
dnl Otherwise try -lrpc (Cygwin) -lxdr (some MinGW), -lnsl (Solaris) dnl Otherwise try -lxdr (some MinGW)
dnl -ltirpc (glibc 2.13.90 or newer) or none (most Unix) dnl -ltirpc (glibc 2.13.90 or newer) or none (most Unix)
AC_CHECK_LIB([portablexdr],[xdrmem_create],[],[ AC_CHECK_LIB([portablexdr],[xdrmem_create],[],[
AC_SEARCH_LIBS([xdrmem_create],[rpc xdr nsl tirpc],[], AC_SEARCH_LIBS([xdrmem_create],[xdr tirpc],[],
[AC_MSG_ERROR([Cannot find a XDR library])]) [AC_MSG_ERROR([Cannot find a XDR library])])
]) ])
with_xdr="yes" with_xdr="yes"
dnl check for cygwin's variation in xdr function names dnl Recent glibc requires -I/usr/include/tirpc for <rpc/rpc.h>
AC_CHECK_FUNCS([xdr_u_int64_t],[],[],[#include <rpc/xdr.h>])
dnl Cygwin/recent glibc requires -I/usr/include/tirpc for <rpc/rpc.h>
old_CFLAGS=$CFLAGS old_CFLAGS=$CFLAGS
AC_CACHE_CHECK([where to find <rpc/rpc.h>], [lv_cv_xdr_cflags], [ AC_CACHE_CHECK([where to find <rpc/rpc.h>], [lv_cv_xdr_cflags], [
for add_CFLAGS in '' '-I/usr/include/tirpc' 'missing'; do for add_CFLAGS in '' '-I/usr/include/tirpc' 'missing'; do
......
...@@ -42,7 +42,6 @@ AM_LDFLAGS = $(DRIVER_MODULES_LDFLAGS) \ ...@@ -42,7 +42,6 @@ AM_LDFLAGS = $(DRIVER_MODULES_LDFLAGS) \
$(COVERAGE_LDFLAGS) \ $(COVERAGE_LDFLAGS) \
$(RELRO_LDFLAGS) \ $(RELRO_LDFLAGS) \
$(NO_INDIRECT_LDFLAGS) \ $(NO_INDIRECT_LDFLAGS) \
$(CYGWIN_EXTRA_LDFLAGS) \
$(MINGW_EXTRA_LDFLAGS) \ $(MINGW_EXTRA_LDFLAGS) \
$(NULL) $(NULL)
AM_LDFLAGS_MOD = \ AM_LDFLAGS_MOD = \
...@@ -450,8 +449,7 @@ endif WITH_MACOS ...@@ -450,8 +449,7 @@ endif WITH_MACOS
libvirt_la_LDFLAGS += $(NULL) libvirt_la_LDFLAGS += $(NULL)
libvirt_la_BUILT_LIBADD += ../gnulib/lib/libgnu.la libvirt_la_BUILT_LIBADD += ../gnulib/lib/libgnu.la
libvirt_la_LIBADD += \ libvirt_la_LIBADD += \
$(DRIVER_MODULES_LIBS) \ $(DRIVER_MODULES_LIBS)
$(CYGWIN_EXTRA_LIBADD)
libvirt_la_CFLAGS = -DIN_LIBVIRT $(AM_CFLAGS) libvirt_la_CFLAGS = -DIN_LIBVIRT $(AM_CFLAGS)
# Because we specify libvirt_la_DEPENDENCIES for $(LIBVIRT_SYMBOL_FILE), we # Because we specify libvirt_la_DEPENDENCIES for $(LIBVIRT_SYMBOL_FILE), we
# lose automake's automatic dependencies on an appropriate subset of # lose automake's automatic dependencies on an appropriate subset of
...@@ -518,7 +516,7 @@ libvirt_qemu_la_LDFLAGS = \ ...@@ -518,7 +516,7 @@ libvirt_qemu_la_LDFLAGS = \
$(AM_LDFLAGS) \ $(AM_LDFLAGS) \
$(NULL) $(NULL)
libvirt_qemu_la_CFLAGS = $(AM_CFLAGS) libvirt_qemu_la_CFLAGS = $(AM_CFLAGS)
libvirt_qemu_la_LIBADD = libvirt.la $(CYGWIN_EXTRA_LIBADD) libvirt_qemu_la_LIBADD = libvirt.la
libvirt_lxc_la_SOURCES = libvirt-lxc.c libvirt_lxc_la_SOURCES = libvirt-lxc.c
libvirt_lxc_la_LDFLAGS = \ libvirt_lxc_la_LDFLAGS = \
...@@ -528,7 +526,7 @@ libvirt_lxc_la_LDFLAGS = \ ...@@ -528,7 +526,7 @@ libvirt_lxc_la_LDFLAGS = \
$(AM_LDFLAGS) \ $(AM_LDFLAGS) \
$(NULL) $(NULL)
libvirt_lxc_la_CFLAGS = $(AM_CFLAGS) libvirt_lxc_la_CFLAGS = $(AM_CFLAGS)
libvirt_lxc_la_LIBADD = libvirt.la $(CYGWIN_EXTRA_LIBADD) libvirt_lxc_la_LIBADD = libvirt.la
EXTRA_DIST += \ EXTRA_DIST += \
$(SYSCONF_FILES) \ $(SYSCONF_FILES) \
......
...@@ -73,7 +73,6 @@ libvirt_admin_la_LDFLAGS = \ ...@@ -73,7 +73,6 @@ libvirt_admin_la_LDFLAGS = \
libvirt_admin_la_LIBADD = \ libvirt_admin_la_LIBADD = \
libvirt.la \ libvirt.la \
$(CYGWIN_EXTRA_LIBADD) \
$(CAPNG_LIBS) \ $(CAPNG_LIBS) \
$(YAJL_LIBS) \ $(YAJL_LIBS) \
$(DEVMAPPER_LIBS) \ $(DEVMAPPER_LIBS) \
......
...@@ -162,7 +162,6 @@ virtlockd_LDADD = \ ...@@ -162,7 +162,6 @@ virtlockd_LDADD = \
libvirt_driver_admin.la \ libvirt_driver_admin.la \
$(GLIB_LIBS) \ $(GLIB_LIBS) \
../gnulib/lib/libgnu.la \ ../gnulib/lib/libgnu.la \
$(CYGWIN_EXTRA_LIBADD) \
$(NULL) $(NULL)
if WITH_DTRACE_PROBES if WITH_DTRACE_PROBES
virtlockd_LDADD += libvirt_probes.lo virtlockd_LDADD += libvirt_probes.lo
......
...@@ -99,7 +99,6 @@ virtlogd_LDADD = \ ...@@ -99,7 +99,6 @@ virtlogd_LDADD = \
libvirt.la \ libvirt.la \
$(GLIB_LIBS) \ $(GLIB_LIBS) \
../gnulib/lib/libgnu.la \ ../gnulib/lib/libgnu.la \
$(CYGWIN_EXTRA_LIBADD) \
$(NULL) $(NULL)
if WITH_DTRACE_PROBES if WITH_DTRACE_PROBES
virtlogd_LDADD += libvirt_probes.lo virtlogd_LDADD += libvirt_probes.lo
......
...@@ -97,7 +97,6 @@ libvirt_net_rpc_la_LDFLAGS = \ ...@@ -97,7 +97,6 @@ libvirt_net_rpc_la_LDFLAGS = \
$(SECDRIVER_LIBS) \ $(SECDRIVER_LIBS) \
$(AM_LDFLAGS) \ $(AM_LDFLAGS) \
$(NULL) $(NULL)
libvirt_net_rpc_la_LIBADD = $(CYGWIN_EXTRA_LIBADD)
libvirt_net_rpc_server_la_SOURCES = \ libvirt_net_rpc_server_la_SOURCES = \
rpc/virnetserverprogram.h \ rpc/virnetserverprogram.h \
...@@ -122,7 +121,6 @@ libvirt_net_rpc_server_la_LDFLAGS = \ ...@@ -122,7 +121,6 @@ libvirt_net_rpc_server_la_LDFLAGS = \
$(AM_LDFLAGS) \ $(AM_LDFLAGS) \
$(DBUS_LIBS) \ $(DBUS_LIBS) \
$(NULL) $(NULL)
libvirt_net_rpc_server_la_LIBADD = $(CYGWIN_EXTRA_LIBADD)
libvirt_net_rpc_client_la_SOURCES = \ libvirt_net_rpc_client_la_SOURCES = \
rpc/virnetclientprogram.h \ rpc/virnetclientprogram.h \
...@@ -138,7 +136,6 @@ libvirt_net_rpc_client_la_CFLAGS = \ ...@@ -138,7 +136,6 @@ libvirt_net_rpc_client_la_CFLAGS = \
$(XDR_CFLAGS) \ $(XDR_CFLAGS) \
$(NULL) $(NULL)
libvirt_net_rpc_client_la_LDFLAGS = $(AM_LDFLAGS) libvirt_net_rpc_client_la_LDFLAGS = $(AM_LDFLAGS)
libvirt_net_rpc_client_la_LIBADD = $(CYGWIN_EXTRA_LIBADD)
if WITH_SASL if WITH_SASL
libvirt_net_rpc_client_la_CFLAGS += \ libvirt_net_rpc_client_la_CFLAGS += \
......
...@@ -47,7 +47,7 @@ open RPCGEN, "-|", "$rpcgen $mode $xdrdef" ...@@ -47,7 +47,7 @@ open RPCGEN, "-|", "$rpcgen $mode $xdrdef"
open TARGET, ">$target" open TARGET, ">$target"
or die "cannot create $target: $!"; or die "cannot create $target: $!";
my $fixup = $^O eq "linux" || $^O eq "cygwin" || $^O eq "gnukfreebsd" || $^O eq "freebsd" || $^O eq "darwin"; my $fixup = $^O eq "linux" || $^O eq "gnukfreebsd" || $^O eq "freebsd" || $^O eq "darwin";
if ($mode eq "-c") { if ($mode eq "-c") {
print TARGET "#include <config.h>\n"; print TARGET "#include <config.h>\n";
......
...@@ -26,16 +26,6 @@ ...@@ -26,16 +26,6 @@
#include "internal.h" #include "internal.h"
/* On architectures which lack these limits, define them (ie. Cygwin).
* Note that the libvirt code should be robust enough to handle the
* case where actual value is longer than these limits (eg. by setting
* length correctly in second argument to gethostname and by always
* using strncpy instead of strcpy).
*/
#ifndef INET_ADDRSTRLEN
# define INET_ADDRSTRLEN 16
#endif
#define VIR_LOOPBACK_IPV4_ADDR "127.0.0.1" #define VIR_LOOPBACK_IPV4_ADDR "127.0.0.1"
typedef struct { typedef struct {
......
...@@ -20,18 +20,8 @@ ...@@ -20,18 +20,8 @@
#pragma once #pragma once
/* cygwin's xdr implementation defines xdr_u_int64_t instead of xdr_uint64_t /* The portablexdr implementation lacks IXDR_PUT_U_INT32 and IXDR_GET_U_INT32
* and lacks IXDR_PUT_INT32 and IXDR_GET_INT32
*/ */
#ifdef HAVE_XDR_U_INT64_T
# define xdr_uint64_t xdr_u_int64_t
#endif
#ifndef IXDR_PUT_INT32
# define IXDR_PUT_INT32 IXDR_PUT_LONG
#endif
#ifndef IXDR_GET_INT32
# define IXDR_GET_INT32 IXDR_GET_LONG
#endif
#ifndef IXDR_PUT_U_INT32 #ifndef IXDR_PUT_U_INT32
# define IXDR_PUT_U_INT32 IXDR_PUT_U_LONG # define IXDR_PUT_U_INT32 IXDR_PUT_U_LONG
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册