Re: a question about style(9) and inline

From: Steve Kargl <sgk_at_troutmask.apl.washington.edu>
Date: Wed, 13 Aug 2025 18:11:39 UTC
On Wed, Aug 13, 2025 at 07:48:00PM +0200, Dimitry Andric wrote:
> On 13 Aug 2025, at 19:31, Steve Kargl <sgk@troutmask.apl.washington.edu> wrote:
> > 
> > In looking at lib/msun/math_private, one finds
> > 
> > static __inline float complex
> > static __inline double complex
> > static __inline long double complex
> > static inline double
> > static inline float
> > static inline long double
> > static __inline int
> > static __inline int
> > static __inline int
> > static inline int32_t
> > static inline int32_t
> > 
> > style(9) seems to not contain any preference with respect
> > to __inline versus inline.  As a matter of consistency,
> > I would like to use whatever is the preferred keyword.
> > So, which should be used?
> 
> In <sys/cdefs.h>, __inline is defined such that the keyword is removed
> if the compiler doesn't support it. I doubt it is possible to compile
> FreeBSD which such a compiler, so the whole __inline define now seems
> only necessary for backwards compatibility's sake. Since plain inline is
> already used in libm, it does not really make sense to use __inline
> anymore, in my opinion.

cdefs.h was removed from all msun sources except x86/fenv.h 
(circa 2024).  AFAICT, cdefs.h is not needed in x86/fenv.h.  
Following Warner's email, I'll use inline and clean up 
math_private.h.

-- 
Steve