Re: [PATCH] AC_HEADER_MAJOR: port to glibc 2.25

Nick Bowler <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.patches
Message-ID <CADyTPEzR_AjOzoogyWY6gR3PZZZRGrNT46dOaOeok26RK4wMew@mail.gmail.com>
Hi Eric,

On 2016-09-14, Eric Blake <[email protected]> wrote:
[...]
> * lib/autoconf/headers.m4 (AC_HEADER_MAJOR): Check for sysmacros.h
> first, rather than after determining if sys/types.h pollutes the
> namespace.
> * doc/autoconf.texi (Particular Headers) <AC_HEADER_MAJOR>: Expand
> details on usage, and on workarounds for non-updated projects.
[...]
> diff --git a/doc/autoconf.texi b/doc/autoconf.texi
> index 029ddd6..f2494d8 100644
> --- a/doc/autoconf.texi
> +++ b/doc/autoconf.texi
> @@ -5977,6 +5977,27 @@ Particular Headers
>  @code{makedev}, but @file{sys/mkdev.h} does, define
>  @code{MAJOR_IN_MKDEV}; otherwise, if @file{sys/sysmacros.h} does, define
>  @code{MAJOR_IN_SYSMACROS}.

I think this text above should also be updated for clarity.  From the
current text one might reasonably infer that the MAJOR_IN_xxx macros are
defined only if <sys/types.h> does not define major, minor and makedev,
which is true originally but no longer the case with this patch.

Perhaps something like this:

  If <sys/sysmacros.h> is required (possibly in addition to
  <sys/types.h>) for the definitions of major, minor and makedev,
  define MAJOR_IN_SYSMACROS.  Otherwise, if <sys/mkdev.h> is
  required, define MAJOR_IN_MKDEV.

Followed by the example usage.  I left it vague about <sys/types.h>
because I don't know whether any systems require explicitly including
<sys/types.h> in addition to either <sys/sysmacros.h> or <sys/mkdev.h>.

> +To properly use any of these three functions, your code should contain
> +something like:
[...]

Cheers,
  Nick
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.