21.6. Checking the size of a datatype
Prev | Chapter 21. Multi-Platform Configuration (Autoconf Functionality) | Next

## 21.6. Checking the size of a datatype

Check the size of a datatype by using the `CheckTypeSize` method:

    env = Environment()
    conf = Configure(env)
    int_size = conf.CheckTypeSize('unsigned int')
    print('sizeof unsigned int is', int_size)
    env = conf.Finish()

    % scons -Q
    sizeof unsigned int is 4
    scons: `.' is up to date.

Prev | Up | Next
21.5. Checking for the Availability of a `typedef` | Home | 21.7. Checking for the Presence of a program