meson.build 493 B

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