gpsd-dev
[Top][All Lists]
Advanced

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

Re: [gpsd-dev] [PATCH] include sys/sysmacros.h for major


From: Mike Frysinger
Subject: Re: [gpsd-dev] [PATCH] include sys/sysmacros.h for major
Date: Tue, 10 May 2016 16:29:07 -0400

On 10 May 2016 10:58, Gary E. Miller wrote:
> On Mon, 9 May 2016 22:04:19 -0400 Mike Frysinger wrote:
> > On 09 May 2016 13:46, Gary E. Miller wrote:
> > > On Mon,  9 May 2016 14:44:48 -0400 Mike Frysinger wrote:  
> > > > These functions are not part of any official spec, and Linux C
> > > > libs have always kept them in sys/sysmacros.h.  Include the header
> > > > directly to fix builds w/alternative C libs, and to work with
> > > > future glibc versions. ---  
> > > 
> > > Can you be specific on what distro or version this may fix?  
> > 
> > it isn't deployed yet.  gpsd can wait for newer C lib releases to
> > break its build, or it can get ahead like every other project i've
> > sent patches to and fix their source trees now.
> 
> I do not find 'because everyone else does' a compelling reason.  Can
> you point to a single thing released, beta or even git head, that
> needs this?  Or some statement from glibc of future direction?

i linked to the glibc list with the initial discussion on the topic.
patches are in dev now to start throwing warnings before we change it
to a fatal error.  everyone is onboard with making the change ... the
question now is how to refactor the headers to make it happen.

> We need a little bit more than "Mike said so".

i'm just presenting the facts.  if you guys want to let gpsd break,
that's certainly your choice.  musl/uClibc will change as soon as
glibc does if not sooner.  maintainers for both projects have already
stated as much.

> > this isn't specific to Linux either.  it's long been an issue for
> > other OS's which is why autoconf has had a macro for this for more
> > than a decade.  see AC_HEADER_MAJOR:
> >     
> > https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Particular-Headers.html
> 
> If autoconfuse does it I find that somewhat compelling.  But all they
> do is set MAJOR_IN_SYSMACROS.

right, so C files can test it and include the sysmacros.h header.  it's
the same as doing AC_CHECK_HEADER([unistd.h]) -- all that does is create
a define HAVE_UNISTD_H.  it's still up to code to check the define and
include the header or change its behavior.

some projects have opted to use AC_CHECK_HEADER(sys/sysmacros.h)
instead and not bother supporting other OS's that AC_HEADER_MAJOR
does.  it's akin to AC_HEADER_TIME and dealing with the different
sys/time.h & time.h possibilities.

> Do we know of any cases that use that define?

i imagine googling for the define will find you some source trees.
-mike

Attachment: signature.asc
Description: Digital signature


reply via email to

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