lib/file: move macros to the light FFI