diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-09-05 19:08:10 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-09-05 19:08:10 +0200 |
commit | f8a92529ec04b560b5b9e647b976892412f78134 (patch) | |
tree | 5308d7f500df46ef64423708ed40a37675f4020c /include/sqfs/meta_reader.h | |
parent | 320ae4f8e752f6652c7b5c8201d7267cd4de17c1 (diff) |
Fix API visibility for libsquashfs.so
This commit adds a "predef.h" header to libsquashfs that exposes two
macros, SQFS_API and SQFS_INTERNAL that are used to explicilty set
the visibiliy of stuff that ends up in libsquashfs to default or
hidden.
For compatibillity with Windows which may at some point eventually be
considered, the SQFS_API define is set to dllexport IF the cpp symbol
SQFS_BUILDING_DLL is defined and set to import otherwise.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include/sqfs/meta_reader.h')
-rw-r--r-- | include/sqfs/meta_reader.h | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/include/sqfs/meta_reader.h b/include/sqfs/meta_reader.h index 6f0d184..1e5e027 100644 --- a/include/sqfs/meta_reader.h +++ b/include/sqfs/meta_reader.h @@ -9,6 +9,7 @@ #include "config.h" +#include "sqfs/predef.h" #include "sqfs/compress.h" #include "sqfs/data.h" @@ -24,21 +25,24 @@ extern "C" { Start offset and limit can be specified to do bounds checking against a subregion of the filesystem image. */ -sqfs_meta_reader_t *sqfs_meta_reader_create(int fd, sqfs_compressor_t *cmp, - uint64_t start, uint64_t limit); +SQFS_API sqfs_meta_reader_t *sqfs_meta_reader_create(int fd, + sqfs_compressor_t *cmp, + uint64_t start, + uint64_t limit); -void sqfs_meta_reader_destroy(sqfs_meta_reader_t *m); +SQFS_API void sqfs_meta_reader_destroy(sqfs_meta_reader_t *m); /* Returns 0 on success. Internally prints to stderr on failure */ -int sqfs_meta_reader_seek(sqfs_meta_reader_t *m, uint64_t block_start, - size_t offset); +SQFS_API int sqfs_meta_reader_seek(sqfs_meta_reader_t *m, uint64_t block_start, + size_t offset); -void sqfs_meta_reader_get_position(sqfs_meta_reader_t *m, - uint64_t *block_start, - size_t *offset); +SQFS_API void sqfs_meta_reader_get_position(sqfs_meta_reader_t *m, + uint64_t *block_start, + size_t *offset); /* Returns 0 on success. Internally prints to stderr on failure */ -int sqfs_meta_reader_read(sqfs_meta_reader_t *m, void *data, size_t size); +SQFS_API int sqfs_meta_reader_read(sqfs_meta_reader_t *m, void *data, + size_t size); #ifdef __cplusplus } |