[Top][All Lists]

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

Re: [PATCH] mountlist/ptsname_r: leverage AC_HEADER_MAJOR

From: Bruno Haible
Subject: Re: [PATCH] mountlist/ptsname_r: leverage AC_HEADER_MAJOR
Date: Sat, 16 Apr 2016 12:51:45 +0200
User-agent: KMail/4.8.5 (Linux/3.8.0-44-generic; KDE/4.8.5; x86_64; ; )

Hi Mike,

> These two modules use makedev/major/minor but don't have explicit
> checks for the functions.  Use the existing autoconf macro which
> will probe some headers for use and set up some defines.

Does this change fix a compilation problem? You did not say so.

Does this change make future maintenance easier? I don't think so.
mountlist.c and ptsname_r.c are quite special among Gnulib code:
they have #if sections for each particular platform. For example,
the ptsname_r.c file has
  - a code section for Solaris, that uses major, minor,
  - an #include section for Solaris, that includes the appropriate
  - a code section for AIX and OSF/1, that uses minor,
  - an #include section for AIX and OSF/1, that includes the appropriate
This is all consistent.

Solaris, AIX, OSF/1 won't change much in the future. I don't expect
that they will restructure their header files, in the way actively
developed platforms occasionally do.

There is also little chance that one will want to reuse the code for
Solaris, AIX, OSF/1 for any new platform. (GNU/Solaris? Not in

Similarly for mountlist.c.

So, all I can see is that your change will make configure times longer,
in particular on glibc and BSD systems, for no real purpose.

We have not split mountlist.c and ptsname_r.c into specific files, one
per platform:
because we thought that maintenance is easier with a single file. Maybe
we should have done it?


reply via email to

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