I want to import some constants from Linux C headers, so I write code like this: var SYS_read {.importc, header: "<sys/syscall.h>".}: clong SYS_write {.importc, header: "<sys/syscall.h>".}: clong SYS_open {.importc, header: "<sys/syscall.h>".}: clong SYS_close {.importc, header: "<sys/syscall.h>".}: clong SYS_stat {.importc, header: "<sys/syscall.h>".}: clong ... Run
Good, but too repetitive. I want to reduce verbosity, like: var {.importc, header: "<sys/syscall.h>".} SYS_read : clong SYS_write : clong SYS_open : clong SYS_close : clong SYS_stat : clong ... Run or var {.importc, header: "<sys/syscall.h>".} SYS_read : clong SYS_write : clong SYS_open : clong SYS_close : clong SYS_stat : clong ... Run ? Last 2 variations are not working, so is it possible to somehow apply `{.importc...}` to all underlying identifiers?