Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Sep 2023 16:18:10 +0100
From:      Warner Losh <imp@bsdimp.com>
To:        Warner Losh <imp@freebsd.org>
Cc:        src-committers@freebsd.org, dev-commits-src-all@freebsd.org,  dev-commits-src-main@freebsd.org
Subject:   Re: git: 5d51862412a8 - main - Restrict the glibc compat cookie open functions to __BSD_VISIBLE
Message-ID:  <CANCZdfqPw%2BshYjifpNQSS8%2BcbKx3GLQvoaHXVQVCP3iZA6tYHw@mail.gmail.com>
In-Reply-To: <202309171516.38HFGUnx089987@gitrepo.freebsd.org>
References:  <202309171516.38HFGUnx089987@gitrepo.freebsd.org>

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

On Sun, Sep 17, 2023 at 4:16=E2=80=AFPM Warner Losh <imp@freebsd.org> wrote=
:

> The branch main has been updated by imp:
>
> URL:
> https://cgit.FreeBSD.org/src/commit/?id=3D5d51862412a8ad246f414c7071999b6=
815080884
>
> commit 5d51862412a8ad246f414c7071999b6815080884
> Author:     Warner Losh <imp@FreeBSD.org>
> AuthorDate: 2023-09-15 16:13:11 +0000
> Commit:     Warner Losh <imp@FreeBSD.org>
> CommitDate: 2023-09-17 15:11:57 +0000
>
>     Restrict the glibc compat cookie open functions to __BSD_VISIBLE
>
>     Sponsored by:           Netflix
>

Reviewed by: kib@
Differential Revision: https://reviews.freebsd.org/D41878


> ---
>  include/stdio.h | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/include/stdio.h b/include/stdio.h
> index b7c412c81da7..9881b3f07329 100644
> --- a/include/stdio.h
> +++ b/include/stdio.h
> @@ -415,6 +415,7 @@ FILE        *funopen(const void *,
>  #define        fropen(cookie, fn) funopen(cookie, fn, 0, 0, 0)
>  #define        fwopen(cookie, fn) funopen(cookie, 0, fn, 0, 0)
>
> +#if __BSD_VISIBLE
>  typedef __ssize_t cookie_read_function_t(void *, char *, size_t);
>  typedef __ssize_t cookie_write_function_t(void *, const char *, size_t);
>  typedef int cookie_seek_function_t(void *, off64_t *, int);
> @@ -426,6 +427,7 @@ typedef struct {
>         cookie_close_function_t *close;
>  } cookie_io_functions_t;
>  FILE   *fopencookie(void *, const char *, cookie_io_functions_t);
> +#endif
>
>  /*
>   * Portability hacks.  See <sys/types.h>.
>

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

<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 Sun, Sep 17, 2023 at 4:16=E2=80=AF=
PM Warner Losh &lt;<a href=3D"mailto:imp@freebsd.org">imp@freebsd.org</a>&g=
t; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0p=
x 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The br=
anch main has been updated by imp:<br>
<br>
URL: <a href=3D"https://cgit.FreeBSD.org/src/commit/?id=3D5d51862412a8ad246=
f414c7071999b6815080884" rel=3D"noreferrer" target=3D"_blank">https://cgit.=
FreeBSD.org/src/commit/?id=3D5d51862412a8ad246f414c7071999b6815080884</a><b=
r>
<br>
commit 5d51862412a8ad246f414c7071999b6815080884<br>
Author:=C2=A0 =C2=A0 =C2=A0Warner Losh &lt;imp@FreeBSD.org&gt;<br>
AuthorDate: 2023-09-15 16:13:11 +0000<br>
Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh &lt;imp@FreeBSD.org&gt;<br>
CommitDate: 2023-09-17 15:11:57 +0000<br>
<br>
=C2=A0 =C2=A0 Restrict the glibc compat cookie open functions to __BSD_VISI=
BLE<br>
<br>
=C2=A0 =C2=A0 Sponsored by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Netflix=
<br></blockquote><div><br></div><div>Reviewed by: kib@</div><div>Differenti=
al Revision:=C2=A0<a href=3D"https://reviews.freebsd.org/D41878">https://re=
views.freebsd.org/D41878</a></div><div>=C2=A0</div><blockquote class=3D"gma=
il_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,2=
04,204);padding-left:1ex">
---<br>
=C2=A0include/stdio.h | 2 ++<br>
=C2=A01 file changed, 2 insertions(+)<br>
<br>
diff --git a/include/stdio.h b/include/stdio.h<br>
index b7c412c81da7..9881b3f07329 100644<br>
--- a/include/stdio.h<br>
+++ b/include/stdio.h<br>
@@ -415,6 +415,7 @@ FILE=C2=A0 =C2=A0 =C2=A0 =C2=A0 *funopen(const void *,<=
br>
=C2=A0#define=C2=A0 =C2=A0 =C2=A0 =C2=A0 fropen(cookie, fn) funopen(cookie,=
 fn, 0, 0, 0)<br>
=C2=A0#define=C2=A0 =C2=A0 =C2=A0 =C2=A0 fwopen(cookie, fn) funopen(cookie,=
 0, fn, 0, 0)<br>
<br>
+#if __BSD_VISIBLE<br>
=C2=A0typedef __ssize_t cookie_read_function_t(void *, char *, size_t);<br>
=C2=A0typedef __ssize_t cookie_write_function_t(void *, const char *, size_=
t);<br>
=C2=A0typedef int cookie_seek_function_t(void *, off64_t *, int);<br>
@@ -426,6 +427,7 @@ typedef struct {<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 cookie_close_function_t *close;<br>
=C2=A0} cookie_io_functions_t;<br>
=C2=A0FILE=C2=A0 =C2=A0*fopencookie(void *, const char *, cookie_io_functio=
ns_t);<br>
+#endif<br>
<br>
=C2=A0/*<br>
=C2=A0 * Portability hacks.=C2=A0 See &lt;sys/types.h&gt;.<br>
</blockquote></div></div>

--0000000000003d6fa906058f8971--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfqPw%2BshYjifpNQSS8%2BcbKx3GLQvoaHXVQVCP3iZA6tYHw>