From nobody Fri Mar 24 11:15:54 2023 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Pjfln4l46z41RRq for ; Fri, 24 Mar 2023 11:16:05 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Pjfln45ctz3rlV for ; Fri, 24 Mar 2023 11:16:05 +0000 (UTC) (envelope-from eduardo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679656565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=kCsU2CYmpyk3VJnhSm8q93vmW0woSJGudM8Y8kNCIuU=; b=YOIag/5VL+tWr/FlZP29nPoF1aFkt7Kw5XylPHqMWX9n/n73M57JNph1klIF4TXQIGDLWN 0GauZLWXKZULhnu1FExMwYRCFxXeibV7g3R8pNHUcqJDvm9Kyg5GcGhrK1kSfDs7XH2gzr E3bwwgefatGQtcaxKnH8hkwn1jWq+Cw1eCSSKEXy8qUf0RkLbbE3gPiumfX2s+KOPLwiEe 6cpisky9NghZf6BxVlLhew/3MHAjKnLs4dxiGlIbFJEAVaPYTeaxgarVy81BS++X/wRItb Kuw9uztuYVXPoBzINrValD7hLAAZrt5xtb3vV47DIdUc6yepmIXjEKenZz50+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679656565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=kCsU2CYmpyk3VJnhSm8q93vmW0woSJGudM8Y8kNCIuU=; b=KZboZ7tkkzk6Yf2XMJMqL9jtoSqCdAAL+qrQK/hGTV/e8K6EKmo10JjbwA/QztR8kh3FZF dPJz4LXmKRd8ggyUriu54dESN5KMk3yOsl1Hyio1hlAUrt101V6ocDYt/7HxgPBJP7EloI sRRezTPCXfacJilC7nWciL8PEiGEB8o8pfQQpE1vbwnwzffobPwOoCPy00RxgTMZd8H+Fw IYBDrwzVtet0+IWMLbFB+J7BYOgUtKKlb7ZQPcTJ/V+2QmqvAcDuySi6cEy2n0QDFuwBuB t+23/NTUgYwY2TASRYtlMkTB55UMJi9SsvntVf5HQjXNCLSgXR9D/VHdLyP7Bw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1679656565; a=rsa-sha256; cv=none; b=cyGE1eqDtoldmqpPRGcllwksllS3wMVgVkBqH5u3PAhUR0aCjZACtnerNGmX+9wRficTwt AwstzLUNxIzOmFCTZgmegAes/DByr03ehymPmcm+s8WpGXGLLFWYEG4qo3sJmAv8zICd3p BK2JhTDpjT1ZmbHNIkrsTcy13ztPjkcuwuS4OQ9EixHG51yalCKLY3ybB0rj3Pgm/endUP r9OyTlu6Kwk4azfpr3RmBUEvPFSR2j1t9FTIIXyxM1lIjzVdF/PFJtz57MkIppv7H5rvM7 LdagWyxqiGrbZE4Tsv/Kyv+SqhGU7i/B3VDlM0PNnSbHj8JzHAsvA9IvyDfbug== Received: from mail-ua1-f53.google.com (mail-ua1-f53.google.com [209.85.222.53]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: eduardo) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Pjfln335yz10Yp for ; Fri, 24 Mar 2023 11:16:05 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: by mail-ua1-f53.google.com with SMTP id n17so1130053uaj.10 for ; Fri, 24 Mar 2023 04:16:05 -0700 (PDT) X-Gm-Message-State: AAQBX9csQPcAGr4Stenq0+Vt32jT+496Ybkw8ajtCd6aeIXt15u6h5Lb 8lFK4KUoKN72NCcshM92qq5xdxnl57YkD3i6XMs= X-Google-Smtp-Source: AKy350a2kj4FyNcANbkK2zag3UrDmL8AkOcEyZTOOhXAh9JdcN8Ts6bjAUsvTF03f0yhO5MAL2IgfsVFAZmSlIQPjho= X-Received: by 2002:ab0:6ecb:0:b0:68b:9eed:1c7d with SMTP id c11-20020ab06ecb000000b0068b9eed1c7dmr1794232uav.0.1679656565044; Fri, 24 Mar 2023 04:16:05 -0700 (PDT) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 References: <13BBF767-6CBB-41D5-AD93-6ADD9C417811@FreeBSD.org> <1aa553c9-79b9-30a0-e4ca-95b1057f1d80@gmail.com> In-Reply-To: From: Nuno Teixeira Date: Fri, 24 Mar 2023 11:15:54 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: byteswap.h not found on 12 and 13 To: Warner Losh Cc: "Floyd, Paul" , freebsd-current@freebsd.org Content-Type: multipart/alternative; boundary="000000000000e77c0605f7a384c9" X-ThisMailContainsUnwantedMimeParts: N --000000000000e77c0605f7a384c9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I'm thinking in the best plan to patch port. What about patch it for OSVERSION < 14 that will fix 12 and 13 and when 13.2 is out patching it only for 12. Any thoughts? Warner Losh escreveu no dia sexta, 24/03/2023 =C3=A0(s) 09= :37: > > > On Fri, Mar 24, 2023 at 3:23=E2=80=AFAM Floyd, Paul = wrote: > >> >> A modern and standard solution is std::byteswap. >> >> https://en.cppreference.com/w/cpp/numeric/byteswap >> >> According to this >> >> https://en.cppreference.com/w/cpp/compiler_support#C.2B.2B23_library_fea= tures >> >> you will need llvm 14 for that. >> > > Which doesn't help OP since they needed 12 and 13 support for existing > software. > Also, that's C++ only, which I don't think helps either. > > I'm glad to see some articulated standards here because when I did endian= .h > and byteswap.h, it was a minefield of what can or can't be defined in the > face > of existing use. > > Warner > > >> A+ >> >> Paul >> >> >> >> >> --=20 Nuno Teixeira FreeBSD Committer (ports) --000000000000e77c0605f7a384c9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I'm thinking in the best plan to patch port.
What about patch it for OSVERSION < 14 that will fix 12 and 13 and= when 13.2 is out patching it only for 12.

Any tho= ughts?

Warner Losh <imp@bsdim= p.com> escreveu no dia sexta, 24/03/2023 =C3=A0(s) 09:37:
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">


On Fri, Mar 24, 2023 at 3:23=E2=80=AFAM Floyd, Paul <paulf2718@gmail.com&= gt; wrote:

A modern and standard solution is std::byteswap.

https://en.cppreference.com/w/cpp/numeric/byteswap=

According to this
https://en.cppreference= .com/w/cpp/compiler_support#C.2B.2B23_library_features

you will need llvm 14 for that.

Which d= oesn't help OP since they needed 12 and 13 support for existing softwar= e.
Also, that's C++ only, which I don't think helps eithe= r.

I'm glad to see some articulated standards = here because when I did endian.h
and byteswap.h, it was a minefie= ld of what can or can't be defined in the face
of existing us= e.

Warner
=C2=A0
A+

Paul






--
Nuno Teixeira
FreeBSD Committ= er (ports)
--000000000000e77c0605f7a384c9--