gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ✘gpsd .23.2~rc1


From: Gary E. Miller
Subject: Re: ✘gpsd .23.2~rc1
Date: Sat, 9 Apr 2022 17:52:02 -0700

Yo Greg!

On Sat, 09 Apr 2022 20:44:32 -0400
Greg Troxel <gdt@lexort.com> wrote:

> "Gary E. Miller" <gem@rellim.com> writes:
> 
> > AFAIK gpsd has never tested for what a function returns before.  But
> > I see no other path forward given the musl breakage.  
> 
> Is it musl or glibc that's broken, with broken == not following POSIX.

glibc documents that strerror_t() returns int if _GNU_SOURCE not defined.
glibc documents that strerror_t() returns char * if _GNU_SOURCE defined.

glibc was first.  Then POSIX followed but changed.  So glibc used the
_GNU_SOURCE hack to choose which flavor.

musl documents that alos use _GNU_SOURCE in exactly the same way that
glibc dies.

But, musl fails to do so with strerror_t().

So, if the definition of "broken" is failure to follow your doc, then
musl is the broken one.

> But with two return types, it seems easy to write a test program that
> will fail to build with -Wall when coded to POSIX and you could use
> that failing to  switch on the non-posix behavior.

I keep hearing it is easy, but no one has done it yet.

"-Wall" by itself never causes a failure to compile on a warning.  This
is a warning.  Make it "-Wall -Werror", then yes, it fails, but not
portably.

We need a portable solution.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        gem@rellim.com  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

Attachment: pgpg6aoabbZK0.pgp
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]