From nobody Sun May 5 21:49:29 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1566308717; cv=none; d=zoho.com; s=zohoarc; b=MPP+3OmZY0ufjxWtlnK0QqS5zBRbSt2MsPZZ4i2gXyEiQQipoYKemvV2Jvqsk4vyq42sthSQXmS2ktLpikL13bXGN5l/XX2nps7xZJWDLRxBvBQA49Sm3GIBzOtHu+5xf3KhhZB39jtrZDh/egS2GwFaUxEWtF/J4Eu07XzqTTs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566308717; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=i4L6bEniSKH2Q2uQ+oSexEshUg5fBEiILyDHiEQbfp8=; b=XctPkVBsf7hIys4Pu14FNjsKNMAtlLIcLOSMBL9Yw5aXAZPOENZcLR5GP0wRf8/GI7fCZQ76T/gHP/N8lUumJyVvDkINanF/3mcGmG68FQoLLThExg6I3p3mARM0F3ZhFAnuF0KiWYYWwuIqWmTyn5CtyjvKS3VFKvRZWkejIGw= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1566308717583188.10235477049252; Tue, 20 Aug 2019 06:45:17 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 292037F750; Tue, 20 Aug 2019 13:45:16 +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 E9FCF1715E; Tue, 20 Aug 2019 13:45:15 +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 98C2424F30; Tue, 20 Aug 2019 13:45:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x7KDjDhF025578 for ; Tue, 20 Aug 2019 09:45:13 -0400 Received: by smtp.corp.redhat.com (Postfix) id 13A7627CC0; Tue, 20 Aug 2019 13:45:13 +0000 (UTC) Received: from lindworm.usersys.redhat.com (unknown [10.43.2.5]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 67DBC2618A; Tue, 20 Aug 2019 13:45:12 +0000 (UTC) From: Pino Toscano To: libvir-list@redhat.com Date: Tue, 20 Aug 2019 15:44:54 +0200 Message-Id: <20190820134456.25560-2-ptoscano@redhat.com> In-Reply-To: <20190820134456.25560-1-ptoscano@redhat.com> References: <20190820134456.25560-1-ptoscano@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [ocaml PATCH 1/3] Synchronize Virterror with libvirt 5.6.0 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.71]); Tue, 20 Aug 2019 13:45:16 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Pino Toscano --- libvirt/libvirt.ml | 8 ++++++++ libvirt/libvirt.mli | 4 ++++ libvirt/libvirt_c_epilogue.c | 4 ++-- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/libvirt/libvirt.ml b/libvirt/libvirt.ml index d935bfc..03a5af8 100644 --- a/libvirt/libvirt.ml +++ b/libvirt/libvirt.ml @@ -251,6 +251,9 @@ struct | VIR_ERR_INVALID_DOMAIN_CHECKPOINT | VIR_ERR_NO_DOMAIN_CHECKPOINT | VIR_ERR_NO_DOMAIN_BACKUP + | VIR_ERR_INVALID_NETWORK_PORT + | VIR_ERR_NETWORK_PORT_EXIST + | VIR_ERR_NO_NETWORK_PORT | VIR_ERR_UNKNOWN of int =20 let string_of_code =3D function @@ -359,6 +362,9 @@ struct | VIR_ERR_INVALID_DOMAIN_CHECKPOINT -> "VIR_ERR_INVALID_DOMAIN_CHECKPO= INT" | VIR_ERR_NO_DOMAIN_CHECKPOINT -> "VIR_ERR_NO_DOMAIN_CHECKPOINT" | VIR_ERR_NO_DOMAIN_BACKUP -> "VIR_ERR_NO_DOMAIN_BACKUP" + | VIR_ERR_INVALID_NETWORK_PORT -> "VIR_ERR_INVALID_NETWORK_PORT" + | VIR_ERR_NETWORK_PORT_EXIST -> "VIR_ERR_NETWORK_PORT_EXIST" + | VIR_ERR_NO_NETWORK_PORT -> "VIR_ERR_NO_NETWORK_PORT" | VIR_ERR_UNKNOWN i -> "VIR_ERR_" ^ string_of_int i =20 type domain =3D @@ -432,6 +438,7 @@ struct | VIR_FROM_RESCTRL | VIR_FROM_FIREWALLD | VIR_FROM_DOMAIN_CHECKPOINT + | VIR_FROM_TPM | VIR_FROM_UNKNOWN of int =20 let string_of_domain =3D function @@ -505,6 +512,7 @@ struct | VIR_FROM_RESCTRL -> "VIR_FROM_RESCTRL" | VIR_FROM_FIREWALLD -> "VIR_FROM_FIREWALLD" | VIR_FROM_DOMAIN_CHECKPOINT -> "VIR_FROM_DOMAIN_CHECKPOINT" + | VIR_FROM_TPM -> "VIR_FROM_TPM" | VIR_FROM_UNKNOWN i -> "VIR_FROM_" ^ string_of_int i =20 type level =3D diff --git a/libvirt/libvirt.mli b/libvirt/libvirt.mli index fc5a1fc..72e83f9 100644 --- a/libvirt/libvirt.mli +++ b/libvirt/libvirt.mli @@ -1481,6 +1481,9 @@ sig | VIR_ERR_INVALID_DOMAIN_CHECKPOINT | VIR_ERR_NO_DOMAIN_CHECKPOINT | VIR_ERR_NO_DOMAIN_BACKUP + | VIR_ERR_INVALID_NETWORK_PORT + | VIR_ERR_NETWORK_PORT_EXIST + | VIR_ERR_NO_NETWORK_PORT (* ^^ NB: If you add a variant you MUST edit libvirt_c_epilogue.c:MAX_VIR_* *) | VIR_ERR_UNKNOWN of int (** Other error, not handled with existing va= lues. *) @@ -1559,6 +1562,7 @@ sig | VIR_FROM_RESCTRL | VIR_FROM_FIREWALLD | VIR_FROM_DOMAIN_CHECKPOINT + | VIR_FROM_TPM (* ^^ NB: If you add a variant you MUST edit libvirt_c_epilogue.c: MAX_VIR_* *) | VIR_FROM_UNKNOWN of int (** Other domain, not handled with existing = values. *) diff --git a/libvirt/libvirt_c_epilogue.c b/libvirt/libvirt_c_epilogue.c index 4d45629..37efc43 100644 --- a/libvirt/libvirt_c_epilogue.c +++ b/libvirt/libvirt_c_epilogue.c @@ -143,8 +143,8 @@ Val_virconnectcredential (const virConnectCredentialPtr= cred) * to convert it into VIR_*_UNKNOWN (code). */ =20 -#define MAX_VIR_CODE 104 /* VIR_ERR_NO_DOMAIN_BACKUP */ -#define MAX_VIR_DOMAIN 69 /* VIR_FROM_DOMAIN_CHECKPOINT */ +#define MAX_VIR_CODE 107 /* VIR_ERR_NO_NETWORK_PORT */ +#define MAX_VIR_DOMAIN 70 /* VIR_FROM_TPM */ #define MAX_VIR_LEVEL VIR_ERR_ERROR =20 static inline value --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 21:49:29 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1566308723; cv=none; d=zoho.com; s=zohoarc; b=Z6orzOJ9bdq9IENgLrGN4gncnioQruzR5YMB+GBdSKlblhaf6GjV+MYdgPQUORr8QmkcWtmfyh2JhvSGA/5TAl672RNkKGoIav1ruujTaixVM3hN6an5QbS3OFVjOhqYas++xi9psIw3Hsm6emfp4zQRs9o4DiTqYi32gUWcNSo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566308723; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=Q/KBUA4lS9bHoVu/X3SaGBHgGBayw0m7BMmVxrbG5ss=; b=f9WhyhZ2VTLrN8U4OEUCw6YzXJNhSd2Wwz9WdzYKrBhYpFiXshGFr/KshihEbQ1d1Syg5ULRYky3A006s16yacEgXraTCx0wbCjc9GMfmCxJYw1CMzc69Q+Rs7BekHywSlxZOAtdwNu2zAPEZtAFndCGlsR7D7OxtgId502bO2Q= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 156630872378237.838145305424746; Tue, 20 Aug 2019 06:45:23 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 375A110C052B; Tue, 20 Aug 2019 13:45:22 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0449818C4E; Tue, 20 Aug 2019 13:45:22 +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 AD289180BA9A; Tue, 20 Aug 2019 13:45:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x7KDjEVg025588 for ; Tue, 20 Aug 2019 09:45:14 -0400 Received: by smtp.corp.redhat.com (Postfix) id 59C7B7E54; Tue, 20 Aug 2019 13:45:14 +0000 (UTC) Received: from lindworm.usersys.redhat.com (unknown [10.43.2.5]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 61DB627CC0; Tue, 20 Aug 2019 13:45:13 +0000 (UTC) From: Pino Toscano To: libvir-list@redhat.com Date: Tue, 20 Aug 2019 15:44:55 +0200 Message-Id: <20190820134456.25560-3-ptoscano@redhat.com> In-Reply-To: <20190820134456.25560-1-ptoscano@redhat.com> References: <20190820134456.25560-1-ptoscano@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [ocaml PATCH 2/3] Update config.guess and config.sub 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.65]); Tue, 20 Aug 2019 13:45:22 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Pino Toscano --- config.guess | 284 +++++++++++++++++++++++++++++++++++++++++---------- config.sub | 69 +++++++------ 2 files changed, 266 insertions(+), 87 deletions(-) diff --git a/config.guess b/config.guess index b33c9e8..97ad073 100755 --- a/config.guess +++ b/config.guess @@ -1,8 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2018 Free Software Foundation, Inc. +# Copyright 1992-2019 Free Software Foundation, Inc. =20 -timestamp=3D'2018-08-29' +timestamp=3D'2019-07-24' =20 # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -50,7 +50,7 @@ version=3D"\ GNU config.guess ($timestamp) =20 Originally written by Per Bothner. -Copyright 1992-2018 Free Software Foundation, Inc. +Copyright 1992-2019 Free Software Foundation, Inc. =20 This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE= ." @@ -96,8 +96,7 @@ fi =20 tmp=3D # shellcheck disable=3DSC2172 -trap 'test -z "$tmp" || rm -fr "$tmp"' 1 2 13 15 -trap 'exitcode=3D$?; test -z "$tmp" || rm -fr "$tmp"; exit $exitcode' 0 +trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 =20 set_cc_for_build() { : "${TMPDIR=3D/tmp}" @@ -263,6 +262,9 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAM= E_VERSION" in *:SolidBSD:*:*) echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" exit ;; + *:OS108:*:*) + echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE" + exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd"$UNAME_RELEASE" exit ;; @@ -276,8 +278,8 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAM= E_VERSION" in echo "$UNAME_MACHINE"-unknown-redox exit ;; mips:OSF1:*.*) - echo mips-dec-osf1 - exit ;; + echo mips-dec-osf1 + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -392,15 +394,20 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UN= AME_VERSION" in echo i386-pc-auroraux"$UNAME_RELEASE" exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - UNAME_REL=3D"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" - case `isainfo -b` in - 32) - echo i386-pc-solaris2"$UNAME_REL" - ;; - 64) - echo x86_64-pc-solaris2"$UNAME_REL" - ;; - esac + set_cc_for_build + SUN_ARCH=3Di386 + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" !=3D no_compiler_found ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS=3D"" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH=3Dx86_64 + fi + fi + echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize @@ -890,7 +897,7 @@ EOF echo "$UNAME_MACHINE"-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin + echo x86_64-pc-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'= `" @@ -981,22 +988,50 @@ EOF exit ;; mips:Linux:*:* | mips64:Linux:*:*) set_cc_for_build + IS_GLIBC=3D0 + test x"${LIBC}" =3D xgnu && IS_GLIBC=3D1 sed 's/^ //' << EOF > "$dummy.c" #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el + #undef mips + #undef mipsel + #undef mips64 + #undef mips64el + #if ${IS_GLIBC} && defined(_ABI64) + LIBCABI=3Dgnuabi64 + #else + #if ${IS_GLIBC} && defined(_ABIN32) + LIBCABI=3Dgnuabin32 + #else + LIBCABI=3D${LIBC} + #endif + #endif + + #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips= _isa_rev>=3D6 + CPU=3Dmipsisa64r6 + #else + #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mip= s_isa_rev>=3D6 + CPU=3Dmipsisa32r6 + #else + #if defined(__mips64) + CPU=3Dmips64 + #else + CPU=3Dmips + #endif + #endif + #endif + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defin= ed(MIPSEL) - CPU=3D${UNAME_MACHINE}el + MIPS_ENDIAN=3Del #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defin= ed(MIPSEB) - CPU=3D${UNAME_MACHINE} + MIPS_ENDIAN=3D #else - CPU=3D + MIPS_ENDIAN=3D #endif #endif EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" - test "x$CPU" !=3D x && { echo "$CPU-unknown-linux-$LIBC"; exit; } + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN= \|^LIBCABI'`" + test "x$CPU" !=3D x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"= ; exit; } ;; mips64el:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" @@ -1109,7 +1144,7 @@ EOF *Pentium) UNAME_MACHINE=3Di586 ;; *Pent*|*Celeron) UNAME_MACHINE=3Di686 ;; esac - echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_V= ERSION}" + echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_V= ERSION}" exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then @@ -1293,38 +1328,39 @@ EOF echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" exit ;; *:Darwin:*:*) - UNAME_PROCESSOR=3D`uname -p` || UNAME_PROCESSOR=3Dunknown - set_cc_for_build - if test "$UNAME_PROCESSOR" =3D unknown ; then - UNAME_PROCESSOR=3Dpowerpc + UNAME_PROCESSOR=3D`uname -p` + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=3Dpowerpc ;; + esac + if command -v xcode-select > /dev/null 2> /dev/null && \ + ! xcode-select --print-path > /dev/null 2> /dev/null ; then + # Avoid executing cc if there is no toolchain installed as + # cc will be a stub that puts up a graphical alert + # prompting the user to install developer tools. + CC_FOR_BUILD=3Dno_compiler_found + else + set_cc_for_build fi - if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then - if [ "$CC_FOR_BUILD" !=3D no_compiler_found ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS=3D"" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - case $UNAME_PROCESSOR in - i386) UNAME_PROCESSOR=3Dx86_64 ;; - powerpc) UNAME_PROCESSOR=3Dpowerpc64 ;; - esac - fi - # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc - if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ - (CCOPTS=3D"" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_PPC >/dev/null - then - UNAME_PROCESSOR=3Dpowerpc - fi + if [ "$CC_FOR_BUILD" !=3D no_compiler_found ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS=3D"" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=3Dx86_64 ;; + powerpc) UNAME_PROCESSOR=3Dpowerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS=3D"" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=3Dpowerpc fi elif test "$UNAME_PROCESSOR" =3D i386 ; then - # Avoid executing cc on OS X 10.9, as it ships with a stub - # that puts up a graphical alert prompting to install - # developer tools. Any system running Mac OS X 10.7 or - # later (Darwin 11 and later) is required to have a 64-bit - # processor. This is not true of the ARM version of Darwin - # that Apple uses in portable devices. - UNAME_PROCESSOR=3Dx86_64 + # uname -m returns i386 or x86_64 + UNAME_PROCESSOR=3D$UNAME_MACHINE fi echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" exit ;; @@ -1424,8 +1460,148 @@ EOF amd64:Isilon\ OneFS:*:*) echo x86_64-unknown-onefs exit ;; + *:Unleashed:*:*) + echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE" + exit ;; esac =20 +# No uname command or uname output not recognized. +set_cc_for_build +cat > "$dummy.c" < +#include +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__= ultrix__) +#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips)= || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS= __) +#include +#if defined(_SIZE_T_) || defined(SIGLOST) +#include +#endif +#endif +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=3D`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/= null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + if (strncmp(un.version, "V2", 2) =3D=3D 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) =3D=3D 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); +#endif + +#if defined (vax) +#if !defined (ultrix) +#include +#if defined (BSD) +#if BSD =3D=3D 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +#else +#if BSD =3D=3D 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#endif +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#else +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname un; + uname (&un); + printf ("vax-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("vax-dec-ultrix\n"); exit (0); +#endif +#endif +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__= ultrix__) +#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS)= || defined(__MIPS__) +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname *un; + uname (&un); + printf ("mips-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("mips-dec-ultrix\n"); exit (0); +#endif +#endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=3D`$dummy`= && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. +test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } + echo "$0: unable to guess system type" >&2 =20 case "$UNAME_MACHINE:$UNAME_SYSTEM" in diff --git a/config.sub b/config.sub index b51fb8c..a318a46 100755 --- a/config.sub +++ b/config.sub @@ -1,8 +1,8 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2018 Free Software Foundation, Inc. +# Copyright 1992-2019 Free Software Foundation, Inc. =20 -timestamp=3D'2018-08-29' +timestamp=3D'2019-06-30' =20 # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -67,7 +67,7 @@ Report bugs and patches to ." version=3D"\ GNU config.sub ($timestamp) =20 -Copyright 1992-2018 Free Software Foundation, Inc. +Copyright 1992-2019 Free Software Foundation, Inc. =20 This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE= ." @@ -89,7 +89,7 @@ while test $# -gt 0 ; do - ) # Use stdin as input. break ;; -* ) - echo "$me: invalid option $1$help" + echo "$me: invalid option $1$help" >&2 exit 1 ;; =20 *local*) @@ -111,7 +111,8 @@ case $# in esac =20 # Split fields of configuration type -IFS=3D"-" read -r field1 field2 field3 field4 < (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1566308721632740.6674047919137; Tue, 20 Aug 2019 06:45:21 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 486A0A35FF3; Tue, 20 Aug 2019 13:45:20 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1736D5C8A6; Tue, 20 Aug 2019 13:45:20 +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 C85D31800B74; Tue, 20 Aug 2019 13:45:19 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x7KDjF8S025593 for ; Tue, 20 Aug 2019 09:45:15 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5392327CC8; Tue, 20 Aug 2019 13:45:15 +0000 (UTC) Received: from lindworm.usersys.redhat.com (unknown [10.43.2.5]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A861527CB9; Tue, 20 Aug 2019 13:45:14 +0000 (UTC) From: Pino Toscano To: libvir-list@redhat.com Date: Tue, 20 Aug 2019 15:44:56 +0200 Message-Id: <20190820134456.25560-4-ptoscano@redhat.com> In-Reply-To: <20190820134456.25560-1-ptoscano@redhat.com> References: <20190820134456.25560-1-ptoscano@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [ocaml PATCH 3/3] Fix shebang in perl scripts 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.68]); Tue, 20 Aug 2019 13:45:20 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Instead of hardcoding the location of perl (assuming it is installed in /usr), use /usr/bin/env to run it, and thus picking it from $PATH. This makes it possible to run these scripts also on installations with perl in a different prefix than /usr. Also, given that we want enable warnings on scripts, turn the -w previously in shebang to explicit "use warnings;" in scripts which didn't have it before. Signed-off-by: Pino Toscano --- libvirt/generator.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libvirt/generator.pl b/libvirt/generator.pl index 490ef9a..e850500 100755 --- a/libvirt/generator.pl +++ b/libvirt/generator.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # # OCaml bindings for libvirt. # (C) Copyright 2007-2015 Richard W.M. Jones, Red Hat Inc. @@ -26,6 +26,7 @@ # Please read libvirt/README. =20 use strict; +use warnings; =20 #---------------------------------------------------------------------- =20 --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list