NetBSD-Users archive

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

Re: getconf LONG_BIT in NetBSD





On 5/20/24 00:27, Greg Troxel wrote:
Not that this is super helpful, but posix says:

   https://pubs.opengroup.org/onlinepubs/9699919799/

   All of the following variables shall be supported:

     The names of the symbolic constants listed under the headings
     ``Maximum Values'' and ``Minimum Values'' in the description of the
     <limits.h> header in the Base Definitions volume of POSIX.1-2017,
     without the enclosing braces.


and, in limits.h:

   https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html

   LONG_BIT appears under "Numerical Limits", not max or min.

and therefore, your friendly but unhelpful language lawyer says that
NetBSD's behavior is not improper.

LONG_BIT is defined in limits.h.  It is straightforward to write a
program to print it, and run that from configure (at the expense of
cross).  It's also straightforward to add it to the getconf sources, and
rebuild, but that doesn't help packaging.

You could also insert a bit of shell that if uname is netbsd, looks at
uname -p and has a table.  gross, but pretty easy.

Maybe somebody else knows a better way

Hello Greg,

Many thanks for the explanation about LONG_BIT. It makes sense.

Regards.


Home | Main Index | Thread Index | Old Index