Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Nov 2023 12:59:41 -0500
From:      "Jonathan T. Looney" <jtl@freebsd.org>
To:        Warner Losh <imp@bsdimp.com>, Jessica Clarke <jrtc27@freebsd.org>
Cc:        "src-committers@freebsd.org" <src-committers@freebsd.org>,  "dev-commits-src-all@freebsd.org" <dev-commits-src-all@freebsd.org>,  "dev-commits-src-main@freebsd.org" <dev-commits-src-main@freebsd.org>
Subject:   Re: git: accfb4cc9346 - main - genoffset.sh: stop using a temporary file
Message-ID:  <CADrOrmvTx=nK3ZSbDByBDfyD3KwidjoCUPPOn=9TkAJEXnk9Cw@mail.gmail.com>
In-Reply-To: <CANCZdfr9G_jttwu8G85%2Bvcodf6SNnmt7WPhp8-M10vDrEroP2A@mail.gmail.com>
References:  <202311161507.3AGF7kgx070201@gitrepo.freebsd.org> <39921E4A-4C15-4D8F-BA9F-D0C53AD62CD1@freebsd.org> <CANCZdfr9G_jttwu8G85%2Bvcodf6SNnmt7WPhp8-M10vDrEroP2A@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000005c148f060a48c906
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Thu, Nov 16, 2023 at 11:23=E2=80=AFAM Warner Losh <imp@bsdimp.com> wrote=
:

>
>
> On Thu, Nov 16, 2023 at 9:07=E2=80=AFAM Jessica Clarke <jrtc27@freebsd.or=
g> wrote:
>
>> On 16 Nov 2023, at 15:07, Jonathan T. Looney <jtl@FreeBSD.org> wrote:
>>
>> > -    cat "$temp/asserts"
>> > +    echo -e "${asserts}\c"
>>
>> This isn=E2=80=99t POSIX, and isn=E2=80=99t supported by macOS=E2=80=99s=
 sh, so breaks the
>> build there. Please fix or revert promptly.
>>
>
> echo "${asserts}"
>
> is semantically the same for C. A stray newline doesn't matter in this
> context. It's not worth the effort to remove it.
>
> Sadly, echo -n doesn't work (it's not posix, and posix defines it
> specifically as implementation defined). `echo "fred\c"' works on macos,
> but not FreeBSD's shell echo built-in (but somehow does for /bin/echo).
> macos doesn't implement -e at all (it's also not posix). FreeBSD's shell
> echo build-in is not posix compliant. So, to be portable, just echo it, a=
nd
> cope with the extra newline.
>
> That's what I'd do :)
>

Thanks for the report and suggestions. I've committed a fix
in 884eeff20ce9. Please let me know if there are further concerns which I
should address.

Jonathan

--0000000000005c148f060a48c906
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr">On Thu, Nov 16, 2023 at 11:23=E2=80=AFAM =
Warner Losh &lt;<a href=3D"mailto:imp@bsdimp.com">imp@bsdimp.com</a>&gt; wr=
ote:<br></div><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" =
style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);pa=
dding-left:1ex"><div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=
=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Thu, Nov 16, 2023=
 at 9:07=E2=80=AFAM Jessica Clarke &lt;<a href=3D"mailto:jrtc27@freebsd.org=
" target=3D"_blank">jrtc27@freebsd.org</a>&gt; wrote:<br></div><blockquote =
class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px sol=
id rgb(204,204,204);padding-left:1ex">On 16 Nov 2023, at 15:07, Jonathan T.=
 Looney &lt;jtl@FreeBSD.org&gt; wrote:<br><br>
&gt; -=C2=A0 =C2=A0 cat &quot;$temp/asserts&quot;<br>
&gt; +=C2=A0 =C2=A0 echo -e &quot;${asserts}\c&quot;<br>
<br>
This isn=E2=80=99t POSIX, and isn=E2=80=99t supported by macOS=E2=80=99s sh=
, so breaks the<br>
build there. Please fix or revert promptly.<br></blockquote><div><br></div>=
<div>echo &quot;${asserts}&quot;</div><div><br></div><div>is semantically t=
he same for C. A stray newline doesn&#39;t matter in this context. It&#39;s=
 not worth the effort to remove it.</div><div><br></div><div>Sadly, echo -n=
 doesn&#39;t work (it&#39;s not posix, and posix defines it specifically as=
 implementation defined). `echo &quot;fred\c&quot;&#39; works on macos, but=
 not FreeBSD&#39;s shell echo built-in (but somehow does for /bin/echo). ma=
cos doesn&#39;t implement -e at all (it&#39;s also not posix). FreeBSD&#39;=
s shell echo build-in is not posix compliant. So, to be portable, just echo=
 it, and cope with the extra newline.</div><div><br></div><div>That&#39;s w=
hat I&#39;d do :)</div></div></div></blockquote><div><br>Thanks for the rep=
ort and suggestions. I&#39;ve committed a fix in=C2=A0884eeff20ce9. Please =
let me know if there are further concerns which I should address.</div><div=
><br></div><div>Jonathan=C2=A0</div></div></div>

--0000000000005c148f060a48c906--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADrOrmvTx=nK3ZSbDByBDfyD3KwidjoCUPPOn=9TkAJEXnk9Cw>