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 12:28, Aryabhata wrote:
The `limits.h` header file in C provides the necessary information about system limits, including `LONG_BIT`. You can write a small C program to print the value of `LONG_BIT`.

Create a simple C program that includes the `limits.h` header and prints the value of `LONG_BIT`.


#include <stdio.h>
#include <limits.h>

int main() {
     printf("LONG_BIT: %d\n", LONG_BIT);
     return 0;
}

This will output the number of bits in a "long" integer on your system.

Or use AC_COMPUTE_INT. You can do something like

AC_COMPUTE_INT([var], [LONG_BIT], [#include <limits.h>])


Home | Main Index | Thread Index | Old Index