diff options
Diffstat (limited to 'src/util/file/file.h')
| -rw-r--r-- | src/util/file/file.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/util/file/file.h b/src/util/file/file.h index 4df4c96..77344f8 100644 --- a/src/util/file/file.h +++ b/src/util/file/file.h @@ -3,6 +3,15 @@ #include <al/str.h> #include <al/lib.h> +/* +#if defined NAUNET_ON_WINDOWS && defined AL_WE_32BIT +AL_ASSERT_TYPE_SIZE(off_t, 4); +#else +AL_ASSERT_TYPE_SIZE(off_t, 8); +#endif +*/ +AL_ASSERT_TYPE_SIZE(off_t, 8); + #ifdef NAUNET_NEEDS_STDIO_ASSIST // It seems meson adds _FILE_OFFSET_BITS=64 on all "linuxlike" compilers even MinGW. // https://github.com/mesonbuild/meson/commit/853634a48da025c59eef70161dba0d150833f60d @@ -52,7 +61,7 @@ struct nn_file { #endif #endif str path; - size_t size; + off_t size; }; struct nn_dir { @@ -77,7 +86,11 @@ struct nn_dir_entry { #endif }; +void nn_path_append(str *path, str *part); +void nn_path_prepend(str *path, str *part); + bool nn_file_open(struct nn_file *file, str *path, s32 flags); +bool nn_file_wrap_fd(struct nn_file *file, s32 fd); bool nn_file_exists(str *path); bool nn_file_create(str *path); bool nn_file_truncate(struct nn_file *file, off_t size); |