From nobody Sat Feb 7 08:23:34 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1580217147073338.3277024121546; Tue, 28 Jan 2020 05:12:27 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-320-lCqzS5KvOZC7jxXWTM4WjA-1; Tue, 28 Jan 2020 08:12:23 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0557B8017CC; Tue, 28 Jan 2020 13:12:18 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D427887043; Tue, 28 Jan 2020 13:12:17 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 9119885E4C; Tue, 28 Jan 2020 13:12:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 00SDCEhr019246 for ; Tue, 28 Jan 2020 08:12:14 -0500 Received: by smtp.corp.redhat.com (Postfix) id 2CBF11001DE1; Tue, 28 Jan 2020 13:12:14 +0000 (UTC) Received: from domokun.gsslab.fab.redhat.com (unknown [10.33.8.110]) by smtp.corp.redhat.com (Postfix) with ESMTP id 571441001DD8; Tue, 28 Jan 2020 13:12:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580217145; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=CQ+aerEDa14EFZsv3orUvDQPr6FQWgfC7oJtOldByZI=; b=CBHEXFCOSybpVqbJ+AjihUqctfkPWBcxf4NPCG42wd0c+8l+2BS1Se/OTkxc9tnICiKR5f jW27ctLvHyfB8x+/xYYGGTSJWgObg3kHTUoDZnTbnQDBkYKcMra6jNX5RiYj0EMnvdjRTN 0n+985EPDmON4CNJs7iiFdeZiTdtsCM= From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH v2 17/56] src: remove all traces of Cygwin support Date: Tue, 28 Jan 2020 13:10:58 +0000 Message-Id: <20200128131137.1762449-18-berrange@redhat.com> In-Reply-To: <20200128131137.1762449-1-berrange@redhat.com> References: <20200128131137.1762449-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: lCqzS5KvOZC7jxXWTM4WjA-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" 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. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Pavel Hrdina --- configure.ac | 11 ++--------- m4/virt-compile-pie.m4 | 2 +- m4/virt-win-common.m4 | 8 +++----- m4/virt-win-cygwin.m4 | 32 -------------------------------- m4/virt-win-symbols.m4 | 4 ++-- m4/virt-win-windres.m4 | 4 ++-- m4/virt-xdr.m4 | 9 +++------ src/Makefile.am | 8 +++----- src/admin/Makefile.inc.am | 1 - src/locking/Makefile.inc.am | 1 - src/logging/Makefile.inc.am | 1 - src/rpc/Makefile.inc.am | 3 --- src/rpc/genprotocol.pl | 2 +- src/util/virsocketaddr.h | 10 ---------- src/util/virxdrdefs.h | 12 +----------- 15 files changed, 18 insertions(+), 90 deletions(-) delete mode 100644 m4/virt-win-cygwin.m4 diff --git a/configure.ac b/configure.ac index f0d79b95d4..855654c75d 100644 --- a/configure.ac +++ b/configure.ac @@ -181,8 +181,6 @@ case "$host" in # mingw's ld has the --version-script parameter, but it requires a .de= f file # instead to work properly, therefore clear --version-script here and = use # -Wl, to pass the .def file to the linker - # cygwin's ld has the --version-script parameter too, but for some rea= son - # it's working there as expected VERSION_SCRIPT_FLAGS=3D"-Wl," ;; * ) @@ -204,13 +202,12 @@ dnl are also linux specific. The "network" and stora= ge_fs drivers are known dnl to not work on macOS presently, so we also make a note if compiling dnl for that =20 -with_linux=3Dno with_macos=3Dno with_freebsd=3Dno with_win=3Dno with_cygwi= n=3Dno +with_linux=3Dno with_macos=3Dno with_freebsd=3Dno with_win=3Dno case $host in *-*-linux*) with_linux=3Dyes ;; *-*-darwin*) with_macos=3Dyes ;; *-*-freebsd*) with_freebsd=3Dyes ;; *-*-mingw* | *-*-msvc* ) with_win=3Dyes ;; - *-*-cygwin*) with_cygwin=3Dyes ;; esac =20 if test $with_linux =3D no; then @@ -227,9 +224,6 @@ if test $with_freebsd =3D yes; then with_firewalld=3Dno fi =20 -if test $with_cygwin =3D yes; then - with_vbox=3Dno -fi =20 AM_CONDITIONAL([WITH_LINUX], [test "$with_linux" =3D "yes"]) AM_CONDITIONAL([WITH_FREEBSD], [test "$with_freebsd" =3D "yes"]) @@ -778,9 +772,8 @@ if test "$enable_test_coverage" =3D yes; then WARN_CFLAGS=3D$save_WARN_CFLAGS fi =20 -dnl Cygwin, MinGW and MSVC checks +dnl MinGW checks LIBVIRT_WIN_CHECK_COMMON -LIBVIRT_WIN_CHECK_CYGWIN LIBVIRT_WIN_CHECK_MINGW LIBVIRT_WIN_CHECK_SYMBOLS LIBVIRT_WIN_CHECK_WINDRES diff --git a/m4/virt-compile-pie.m4 b/m4/virt-compile-pie.m4 index a2df38ea72..da5cdf57b7 100644 --- a/m4/virt-compile-pie.m4 +++ b/m4/virt-compile-pie.m4 @@ -22,7 +22,7 @@ AC_DEFUN([LIBVIRT_COMPILE_PIE],[ PIE_CFLAGS=3D PIE_LDFLAGS=3D case "$host" in - *-*-mingw* | *-*-msvc* | *-*-cygwin* ) + *-*-mingw* ) ;; dnl All code is position independent on Win32 target *) gl_COMPILER_OPTION_IF([-fPIE -DPIE -pie], [ diff --git a/m4/virt-win-common.m4 b/m4/virt-win-common.m4 index b639866e64..ebc9d0836e 100644 --- a/m4/virt-win-common.m4 +++ b/m4/virt-win-common.m4 @@ -1,4 +1,4 @@ -dnl The Cygwin, MinGW and MSVC common checks +dnl The MinGW common checks dnl dnl Copyright (C) 2016 Red Hat, Inc. dnl @@ -22,7 +22,7 @@ AC_DEFUN([LIBVIRT_WIN_CHECK_COMMON], [ WIN32_EXTRA_LIBS=3D =20 case "$host" in - *-*-mingw* | *-*-cygwin* | *-*-msvc* ) + *-*-mingw* ) WIN32_EXTRA_LIBS=3D"-lole32 -loleaut32" # If the host is Windows, and shared libraries are disabled, we # need to add -DLIBVIRT_STATIC to the CFLAGS for proper linking @@ -38,7 +38,5 @@ AC_DEFUN([LIBVIRT_WIN_CHECK_COMMON], [ =20 AC_DEFUN([LIBVIRT_WIN_RESULT_COMMON], [ details=3D"CFLAGS=3D'$WIN32_EXTRA_CFLAGS' LIBS=3D'$WIN32_EXTRA_LIBS'" - LIBVIRT_RESULT([Cygwin], [$with_cygwin], [$details]) - LIBVIRT_RESULT([MinGW], [$with_cygwin], [$details]) - LIBVIRT_RESULT([MSVC], [$with_cygwin], [$details]) + LIBVIRT_RESULT([MinGW], [$with_win], [$details]) ]) diff --git a/m4/virt-win-cygwin.m4 b/m4/virt-win-cygwin.m4 deleted file mode 100644 index 211b3c2b7b..0000000000 --- a/m4/virt-win-cygwin.m4 +++ /dev/null @@ -1,32 +0,0 @@ -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 . -dnl - -AC_DEFUN([LIBVIRT_WIN_CHECK_CYGWIN], [ - CYGWIN_EXTRA_LDFLAGS=3D - CYGWIN_EXTRA_LIBADD=3D - case "$host" in - *-*-cygwin*) - CYGWIN_EXTRA_LDFLAGS=3D"-no-undefined" - CYGWIN_EXTRA_LIBADD=3D"${INTLLIBS}" - ;; - esac - - AC_SUBST([CYGWIN_EXTRA_LDFLAGS]) - AC_SUBST([CYGWIN_EXTRA_LIBADD]) -]) diff --git a/m4/virt-win-symbols.m4 b/m4/virt-win-symbols.m4 index 66dd3b7b1c..eba5596e4b 100644 --- a/m4/virt-win-symbols.m4 +++ b/m4/virt-win-symbols.m4 @@ -1,4 +1,4 @@ -dnl The Cygwin, MinGW and MSVC symbols checks +dnl The MinGW symbols checks dnl dnl Copyright (C) 2016 Red Hat, Inc. dnl @@ -23,7 +23,7 @@ AC_DEFUN([LIBVIRT_WIN_CHECK_SYMBOLS], [ LIBVIRT_LXC_SYMBOL_FILE=3D'$(srcdir)/libvirt_lxc.syms' LIBVIRT_QEMU_SYMBOL_FILE=3D'$(srcdir)/libvirt_qemu.syms' case "$host" in - *-*-mingw* | *-*-msvc* ) + *-*-mingw* ) # Also set the symbol file to .def, so src/Makefile generates libvir= t.def # from libvirt.syms and passes libvirt.def instead of libvirt.syms t= o the # linker diff --git a/m4/virt-win-windres.m4 b/m4/virt-win-windres.m4 index af27f231b4..e913eb48b8 100644 --- a/m4/virt-win-windres.m4 +++ b/m4/virt-win-windres.m4 @@ -1,4 +1,4 @@ -dnl The Cygwin, MinGW and MSVC windres checks +dnl The MinGW windres checks dnl dnl Copyright (C) 2016 Red Hat, Inc. dnl @@ -21,7 +21,7 @@ AC_DEFUN([LIBVIRT_WIN_CHECK_WINDRES], [ dnl Look for windres to build a Windows icon resource. with_windres=3Dno case "$host" in - *-*-mingw* | *-*-cygwin* | *-*-msvc* ) + *-*-mingw* ) AC_CHECK_TOOL([WINDRES], [windres], []) if test "x$WINDRES" !=3D "x"; then with_windres=3Dyes diff --git a/m4/virt-xdr.m4 b/m4/virt-xdr.m4 index a65407d955..83754157d9 100644 --- a/m4/virt-xdr.m4 +++ b/m4/virt-xdr.m4 @@ -22,18 +22,15 @@ AC_DEFUN([LIBVIRT_CHECK_XDR], [ if test x"$with_remote" =3D x"yes" || test x"$with_libvirtd" =3D x"yes";= then dnl Where are the XDR functions? 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) 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])]) ]) with_xdr=3D"yes" =20 - dnl check for cygwin's variation in xdr function names - AC_CHECK_FUNCS([xdr_u_int64_t],[],[],[#include ]) - - dnl Cygwin/recent glibc requires -I/usr/include/tirpc for + dnl Recent glibc requires -I/usr/include/tirpc for old_CFLAGS=3D$CFLAGS AC_CACHE_CHECK([where to find ], [lv_cv_xdr_cflags], [ for add_CFLAGS in '' '-I/usr/include/tirpc' 'missing'; do diff --git a/src/Makefile.am b/src/Makefile.am index d4042cf7ba..58355c5337 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -42,7 +42,6 @@ AM_LDFLAGS =3D $(DRIVER_MODULES_LDFLAGS) \ $(COVERAGE_LDFLAGS) \ $(RELRO_LDFLAGS) \ $(NO_INDIRECT_LDFLAGS) \ - $(CYGWIN_EXTRA_LDFLAGS) \ $(MINGW_EXTRA_LDFLAGS) \ $(NULL) AM_LDFLAGS_MOD =3D \ @@ -450,8 +449,7 @@ endif WITH_MACOS libvirt_la_LDFLAGS +=3D $(NULL) libvirt_la_BUILT_LIBADD +=3D ../gnulib/lib/libgnu.la libvirt_la_LIBADD +=3D \ - $(DRIVER_MODULES_LIBS) \ - $(CYGWIN_EXTRA_LIBADD) + $(DRIVER_MODULES_LIBS) libvirt_la_CFLAGS =3D -DIN_LIBVIRT $(AM_CFLAGS) # Because we specify libvirt_la_DEPENDENCIES for $(LIBVIRT_SYMBOL_FILE), we # lose automake's automatic dependencies on an appropriate subset of @@ -518,7 +516,7 @@ libvirt_qemu_la_LDFLAGS =3D \ $(AM_LDFLAGS) \ $(NULL) libvirt_qemu_la_CFLAGS =3D $(AM_CFLAGS) -libvirt_qemu_la_LIBADD =3D libvirt.la $(CYGWIN_EXTRA_LIBADD) +libvirt_qemu_la_LIBADD =3D libvirt.la =20 libvirt_lxc_la_SOURCES =3D libvirt-lxc.c libvirt_lxc_la_LDFLAGS =3D \ @@ -528,7 +526,7 @@ libvirt_lxc_la_LDFLAGS =3D \ $(AM_LDFLAGS) \ $(NULL) libvirt_lxc_la_CFLAGS =3D $(AM_CFLAGS) -libvirt_lxc_la_LIBADD =3D libvirt.la $(CYGWIN_EXTRA_LIBADD) +libvirt_lxc_la_LIBADD =3D libvirt.la =20 EXTRA_DIST +=3D \ $(SYSCONF_FILES) \ diff --git a/src/admin/Makefile.inc.am b/src/admin/Makefile.inc.am index 7ceccafa8e..b4e2f1f2d3 100644 --- a/src/admin/Makefile.inc.am +++ b/src/admin/Makefile.inc.am @@ -73,7 +73,6 @@ libvirt_admin_la_LDFLAGS =3D \ =20 libvirt_admin_la_LIBADD =3D \ libvirt.la \ - $(CYGWIN_EXTRA_LIBADD) \ $(CAPNG_LIBS) \ $(YAJL_LIBS) \ $(DEVMAPPER_LIBS) \ diff --git a/src/locking/Makefile.inc.am b/src/locking/Makefile.inc.am index 65b46ad5f3..d49383d9d7 100644 --- a/src/locking/Makefile.inc.am +++ b/src/locking/Makefile.inc.am @@ -162,7 +162,6 @@ virtlockd_LDADD =3D \ libvirt_driver_admin.la \ $(GLIB_LIBS) \ ../gnulib/lib/libgnu.la \ - $(CYGWIN_EXTRA_LIBADD) \ $(NULL) if WITH_DTRACE_PROBES virtlockd_LDADD +=3D libvirt_probes.lo diff --git a/src/logging/Makefile.inc.am b/src/logging/Makefile.inc.am index 0f7ffa73b3..e8240fa5c4 100644 --- a/src/logging/Makefile.inc.am +++ b/src/logging/Makefile.inc.am @@ -99,7 +99,6 @@ virtlogd_LDADD =3D \ libvirt.la \ $(GLIB_LIBS) \ ../gnulib/lib/libgnu.la \ - $(CYGWIN_EXTRA_LIBADD) \ $(NULL) if WITH_DTRACE_PROBES virtlogd_LDADD +=3D libvirt_probes.lo diff --git a/src/rpc/Makefile.inc.am b/src/rpc/Makefile.inc.am index 11920b3270..0e154d9c69 100644 --- a/src/rpc/Makefile.inc.am +++ b/src/rpc/Makefile.inc.am @@ -97,7 +97,6 @@ libvirt_net_rpc_la_LDFLAGS =3D \ $(SECDRIVER_LIBS) \ $(AM_LDFLAGS) \ $(NULL) -libvirt_net_rpc_la_LIBADD =3D $(CYGWIN_EXTRA_LIBADD) =20 libvirt_net_rpc_server_la_SOURCES =3D \ rpc/virnetserverprogram.h \ @@ -122,7 +121,6 @@ libvirt_net_rpc_server_la_LDFLAGS =3D \ $(AM_LDFLAGS) \ $(DBUS_LIBS) \ $(NULL) -libvirt_net_rpc_server_la_LIBADD =3D $(CYGWIN_EXTRA_LIBADD) =20 libvirt_net_rpc_client_la_SOURCES =3D \ rpc/virnetclientprogram.h \ @@ -138,7 +136,6 @@ libvirt_net_rpc_client_la_CFLAGS =3D \ $(XDR_CFLAGS) \ $(NULL) libvirt_net_rpc_client_la_LDFLAGS =3D $(AM_LDFLAGS) -libvirt_net_rpc_client_la_LIBADD =3D $(CYGWIN_EXTRA_LIBADD) =20 if WITH_SASL libvirt_net_rpc_client_la_CFLAGS +=3D \ diff --git a/src/rpc/genprotocol.pl b/src/rpc/genprotocol.pl index 6baa4f22d5..f567260588 100755 --- a/src/rpc/genprotocol.pl +++ b/src/rpc/genprotocol.pl @@ -47,7 +47,7 @@ open RPCGEN, "-|", "$rpcgen $mode $xdrdef" open TARGET, ">$target" or die "cannot create $target: $!"; =20 -my $fixup =3D $^O eq "linux" || $^O eq "cygwin" || $^O eq "gnukfreebsd" ||= $^O eq "freebsd" || $^O eq "darwin"; +my $fixup =3D $^O eq "linux" || $^O eq "gnukfreebsd" || $^O eq "freebsd" |= | $^O eq "darwin"; =20 if ($mode eq "-c") { print TARGET "#include \n"; diff --git a/src/util/virsocketaddr.h b/src/util/virsocketaddr.h index 1180864f06..66aee2abcd 100644 --- a/src/util/virsocketaddr.h +++ b/src/util/virsocketaddr.h @@ -26,16 +26,6 @@ =20 #include "internal.h" =20 -/* 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" =20 typedef struct { diff --git a/src/util/virxdrdefs.h b/src/util/virxdrdefs.h index 264d02e7cd..b6f6ad5a4d 100644 --- a/src/util/virxdrdefs.h +++ b/src/util/virxdrdefs.h @@ -20,18 +20,8 @@ =20 #pragma once =20 -/* cygwin's xdr implementation defines xdr_u_int64_t instead of xdr_uint64= _t - * and lacks IXDR_PUT_INT32 and IXDR_GET_INT32 +/* The portablexdr implementation lacks IXDR_PUT_U_INT32 and IXDR_GET_U_IN= T32 */ -#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 # define IXDR_PUT_U_INT32 IXDR_PUT_U_LONG #endif --=20 2.24.1