svn commit: r355747 - in head: . include lib/libc/stdlib lib/libxo

Warner Losh imp at bsdimp.com
Sat Dec 14 19:28:14 UTC 2019


On Sat, Dec 14, 2019 at 12:22 PM Pedro Giffuni <pfg at freebsd.org> wrote:

>
> On 14/12/2019 13:20, Ryan Libby wrote:
> > On Sat, Dec 14, 2019 at 12:28 AM Conrad Meyer <cem at freebsd.org> wrote:
> >> Author: cem
> >> Date: Sat Dec 14 08:28:10 2019
> >> New Revision: 355747
> >> URL: https://svnweb.freebsd.org/changeset/base/355747
> >>
> >> Log:
> >>    Deprecate sranddev(3) API
> >>
> >>    It serves no useful purpose and wasn't as popular as its equally
> meritless
> >>    cousin, srandomdev(3).
> >>
> >> .. (cut unrelated code)
> >>
> >> Modified: head/include/stdlib.h
> >>
> ==============================================================================
> >> --- head/include/stdlib.h       Sat Dec 14 05:21:56 2019
> (r355746)
> >> +++ head/include/stdlib.h       Sat Dec 14 08:28:10 2019
> (r355747)
> >> @@ -309,12 +309,17 @@ int        rpmatch(const char *);
> >>   void    setprogname(const char *);
> >>   int     sradixsort(const unsigned char **, int, const unsigned char *,
> >>              unsigned);
> >> -void    sranddev(void);
> >>   void    srandomdev(void);
> >>   long long
> >>          strtonum(const char *, long long, long long, const char **);
> >>
> >>   /* Deprecated interfaces, to be removed. */
> >> +static inline void
> >> +__attribute__((__deprecated__("sranddev to be removed in FreeBSD 13")))
> >> +sranddev(void)
> >> +{
> >> +}
> >> +
> > This broke some gcc builds in ci.  It looks like older versions of gcc
> > don't like having an argument to deprecated.
>
> FWIW, the msg argument for __deprecated__ appeared in GCC 4.5.
>

Maybe sys/cdefs.h should define a __DEPRECATED for such differences? It's
not like __attribute__ is a standard thing anyway...

Warner


More information about the svn-src-head mailing list