aboutsummaryrefslogtreecommitdiffstats
path: root/meson/test cases/common/30 sizeof/prog.c.in
blob: 44918ecc473a684da8e2c92c3c43b540103a9dd7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "@CONFIG@"
#include <stdio.h>
#include <wchar.h>

int main(void) {
    if(INTSIZE != sizeof(int)) {
        fprintf(stderr, "Mismatch: detected int size %d, actual size %d.\n", INTSIZE, (int)sizeof(int));
        return 1;
    }
    if(WCHARSIZE != sizeof(wchar_t)) {
        fprintf(stderr, "Mismatch: detected wchar size %d, actual size %d.\n", WCHARSIZE, (int)sizeof(wchar_t));
        return 1;
    }
    return 0;
}