Re: Compiling amanda with std=C23

"Greg A. Woods" <[email protected]> Fri, 28 Feb 2025 10:41:14 -0800
Newsgroups gmane.comp.archivers.amanda.devel
Message-ID <[email protected]>
--pgp-sign-Multipart_Fri_Feb_28_10:40:58_2025-1
Content-Type: text/plain; charset=US-ASCII

At Fri, 28 Feb 2025 09:59:34 -0800, Lou Hafer <[email protected]> wrote:
Subject: Compiling amanda with std=C23
>
>     Jason Tibbitts' comment about amanda
> not compiling with std=c23 got me a bit
> worried about losing amanda as part of
> Fedora, so I thought I'd give a try at
> tweaking the code.

Lou this absolutely isn't targeted at you....  I'm more shouting out to
the world about an issue that shouldn't exist in the first place.

So, it's all well and good to try to migrate legacy code to newer
language standard levels.

However trying to compile legacy code at a newer language standard level
and then complaining that it won't is lame, at best.

Trying to force anyone to compile legacy code at a new language level is
very very bad, and ignorant (the literal definition of ignorant).  If
any package maintainers are doing that then they need to be re-taught
how to properly handle legacy code.

If code was working fine with, say, --std=c99 or --std=gnu99, etc.,
perhaps implied by the last compiler the developer used, then that's
what it _must_ be compiled with until such time someone goes through the
rather significant effort of upgrading it.

Modern compilers are not going to purposefully lose the ability to
compile legacy code at legacy language standard levels for many decades
to come.  I doubt there will even be any bitrot in legacy standard
support for decades to come.  I've successfully compiled and used plain
old K&R pre-standards code with modern GCC and Clang.

Don't be fooled into thinking it is somehow a good thing to migrate
legacy code to new language standard levels -- there's often zero
advantage and only headaches and maintenance nightmares.

The only thing to watch out for, and this is something package
maintainers really need to learn to do properly, is that build systems
for legacy code often don't yet know that they're building legacy code,
e.g. they don't already include an appropriate "--std=" option, so if
you get errors building something the first thing you must do is to see
if there was a "--std=" option supplied or not.  If not, then supply one
and try again!

--
					Greg A. Woods <[email protected]>

Kelowna, BC     +1 250 762-7675           RoboHack <[email protected]>
Planix, Inc. <[email protected]>     Avoncote Farms <[email protected]>

--pgp-sign-Multipart_Fri_Feb_28_10:40:58_2025-1
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit
Content-Description: OpenPGP Digital Signature

-----BEGIN PGP SIGNATURE-----

iF0EABECAB0WIQTWEnAIIlcZX4oAawJie18UwlnHhQUCZ8IDPAAKCRBie18UwlnH
hVtlAJ9rl01FVMruXxaRp72YEpP5cWi5VQCeKNQm+uwhsyb5DWUI+EwgpBANdFs=
=/kW9
-----END PGP SIGNATURE-----

--pgp-sign-Multipart_Fri_Feb_28_10:40:58_2025-1--