Date: Fri, 24 Mar 2023 03:36:50 -0600 From: Warner Losh <imp@bsdimp.com> To: "Floyd, Paul" <paulf2718@gmail.com> Cc: freebsd-current@freebsd.org Subject: Re: byteswap.h not found on 12 and 13 Message-ID: <CANCZdfo_okhWq_fks3=s4xYMWc_QcKqxvRgT2ogWsqMZpF25oQ@mail.gmail.com> In-Reply-To: <1aa553c9-79b9-30a0-e4ca-95b1057f1d80@gmail.com> References: <CAFDf7UKq3bMgd3XA0=U10%2BLhOCY7fZCHds9DdBcrSuNidOityw@mail.gmail.com> <CANCZdfpT3nbZ%2BzHHtdsMDa88JsWr7Frw%2BRPGcy6B=P60DZL2_g@mail.gmail.com> <CAFDf7UL=av0KDAw2O3Fmf=x5wThezBokCQ2KHtW6wOZnn43bxQ@mail.gmail.com> <ef18fee5-358b-3c19-467b-2fd980dff797@aetern.org> <CANCZdfrvHQTZqgGdZjm5Z_fa53g92c_6EHtKZpyRAsKwRsDcLw@mail.gmail.com> <CANCZdfp=zTD5ctpjcQhDBexWP40d=z0GAd09Qa9eFM4yxXq9RQ@mail.gmail.com> <CANCZdfq2nLt1Bq2Jzn=ivvqaOvF9=y8j=ChZzy6TrE5zAzeFiw@mail.gmail.com> <13BBF767-6CBB-41D5-AD93-6ADD9C417811@FreeBSD.org> <1aa553c9-79b9-30a0-e4ca-95b1057f1d80@gmail.com>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] On Fri, Mar 24, 2023 at 3:23 AM Floyd, Paul <paulf2718@gmail.com> 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 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 > > > > > [-- Attachment #2 --] <div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 24, 2023 at 3:23 AM Floyd, Paul <<a href="mailto:paulf2718@gmail.com">paulf2718@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br> A modern and standard solution is std::byteswap.<br> <br> <a href="https://en.cppreference.com/w/cpp/numeric/byteswap" rel="noreferrer" target="_blank">https://en.cppreference.com/w/cpp/numeric/byteswap</a><br> <br> According to this <br> <a href="https://en.cppreference.com/w/cpp/compiler_support#C.2B.2B23_library_features" rel="noreferrer" target="_blank">https://en.cppreference.com/w/cpp/compiler_support#C.2B.2B23_library_features</a><br> <br> you will need llvm 14 for that.<br></blockquote><div><br></div><div>Which doesn't help OP since they needed 12 and 13 support for existing software.</div><div>Also, that's C++ only, which I don't think helps either.</div><div><br></div><div>I'm glad to see some articulated standards here because when I did endian.h</div><div>and byteswap.h, it was a minefield of what can or can't be defined in the face</div><div>of existing use.</div><div><br></div><div>Warner</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> A+<br> <br> Paul<br> <br> <br> <br> <br> </blockquote></div></div>help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfo_okhWq_fks3=s4xYMWc_QcKqxvRgT2ogWsqMZpF25oQ>
