| 1 |
project('trivial test', 'c') |
| 2 |
|
| 3 |
if host_machine.system() == 'cygwin' |
| 4 |
error('MESON_SKIP_TEST _FILE_OFFSET_BITS not yet supported on Cygwin.') |
| 5 |
endif |
| 6 |
|
| 7 |
cc = meson.get_compiler('c') |
| 8 |
|
| 9 |
size = cc.sizeof('off_t') |
| 10 |
assert(size == 8, 'off_t size is @0@ bytes instead of 8'.format(size)) |
| 11 |
|
| 12 |
code = '''#if !defined(_FILE_OFFSET_BITS) || (_FILE_OFFSET_BITS != 64) |
| 13 |
#error "Large-file support was not enabled" |
| 14 |
#endif''' |
| 15 |
|
| 16 |
assert(cc.compiles(code, name : 'checking for LFS'), 'Large file support was not enabled') |