From nobody Fri Mar 24 09:36:50 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 4PjcYV2VL5z41LWV for ; Fri, 24 Mar 2023 09:37:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) (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)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PjcYV237fz3k18 for ; Fri, 24 Mar 2023 09:37:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x534.google.com with SMTP id ek18so5382223edb.6 for ; Fri, 24 Mar 2023 02:37:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; t=1679650621; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=8xdELVLFr2/sDQe3WqIhsfgCK5AK7vP6ZJTXAlbSvIw=; b=qcBDrzUmaN+z2Sy/okx3ULbNq0fFDod+bGBQLJogeCNcFuM6kEJ3Yz4f4TilCFWM2x IbfV+N4vVqCr7SUtiKukreZADNiEIjNtqobSJK+uoUFzD44Q80WUW3MKv+KcLfIadAe5 zjV4wdzMmqiKLi8cII3KBxNttA17xPIzv6iaRzvcjPWHo/RHHyEKKscbENq9R8w6ckBd 8DpBxxTzBjb2Qb3v5PHV9Fwq01xUXAl/z+ZcoK6n+99cy8hhCy1G5wbHW8nSowFPmM50 q5WMmwhkZ1q/OirHb6vyGmv1nk1W9F71cWVZ5JNLmSEolK8wvFC3lpibEcFBt/ZI7i3d LJOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679650621; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8xdELVLFr2/sDQe3WqIhsfgCK5AK7vP6ZJTXAlbSvIw=; b=N1ejFZPMu6cAmfvIM86LcHTjr84zBhoZHeeVFgnh8VDr6VbbYUgAk06y+/vfc838z1 VOyf101T/9CZ6CQnfu8PmgkErGVJUJVuZm0JypAZfnha75H7i356uTjvOevK+wOxgn2S sMu/TCQirCrFs3l+CIQN64Tw06OjS3yFCyBkF4zhSagXyohm//Labhqr++0WHGfG/gsq 0WjaLYoIZQFXuM9BsAEt5kokl6LFSWrhxK7nU68s9BS40LcqyJiWOKXGolW5KPgIYMqi tY7X8grPDN6bLPJWx/Gi1pBcTj9gdNxaINrJ0HT/HXnbmCNlsBEXofK8umBpi+cccOD2 pNmw== X-Gm-Message-State: AAQBX9flPqNhJKQKvC6LqSzRzPn/ccZKSd+mqGIXyl/E8HtkO/AOQMlf 7J0wqn07VlFdGUs/Cm2w8BcZCKvm3/8NuoeHsi76Gg== X-Google-Smtp-Source: AKy350awv6LypTZhbgnfW8+Ww3gYKXyyIGwIPWsn6n6un/T4lpROgf3EJiw67d5MGew8xedbdSbmVSyN5cwKRRm5yfw= X-Received: by 2002:a50:bac7:0:b0:4ad:6052:ee90 with SMTP id x65-20020a50bac7000000b004ad6052ee90mr1124769ede.7.1679650620950; Fri, 24 Mar 2023 02:37:00 -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: <1aa553c9-79b9-30a0-e4ca-95b1057f1d80@gmail.com> From: Warner Losh Date: Fri, 24 Mar 2023 03:36:50 -0600 Message-ID: Subject: Re: byteswap.h not found on 12 and 13 To: "Floyd, Paul" Cc: freebsd-current@freebsd.org Content-Type: multipart/alternative; boundary="0000000000009bdbc205f7a22221" X-Rspamd-Queue-Id: 4PjcYV237fz3k18 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --0000000000009bdbc205f7a22221 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Mar 24, 2023 at 3:23=E2=80=AFAM Floyd, Paul w= rote: > > 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_feat= ures > > 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 > > > > > --0000000000009bdbc205f7a22221 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Fri, Mar 24, 2023 at 3:23=E2=80=AF= AM Floyd, Paul <paulf2718@gmail.c= om> wrote:
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




--0000000000009bdbc205f7a22221--