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/dir.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/dir.h')
-rw-r--r-- | include/sqfs/dir.h | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/include/sqfs/dir.h b/include/sqfs/dir.h index c57831c..3a65102 100644 --- a/include/sqfs/dir.h +++ b/include/sqfs/dir.h @@ -9,6 +9,7 @@ #include "config.h" +#include "sqfs/predef.h" #include "sqfs/meta_reader.h" #include "sqfs/meta_writer.h" @@ -44,33 +45,34 @@ extern "C" { #endif /* Returns 0 on success. Internally prints to stderr on failure */ -int sqfs_meta_reader_read_dir_header(sqfs_meta_reader_t *m, - sqfs_dir_header_t *hdr); +SQFS_API int sqfs_meta_reader_read_dir_header(sqfs_meta_reader_t *m, + sqfs_dir_header_t *hdr); /* Entry can be freed with a single free() call. The function internally prints to stderr on failure */ -sqfs_dir_entry_t *sqfs_meta_reader_read_dir_ent(sqfs_meta_reader_t *m); +SQFS_API sqfs_dir_entry_t *sqfs_meta_reader_read_dir_ent(sqfs_meta_reader_t *m); -sqfs_dir_writer_t *sqfs_dir_writer_create(sqfs_meta_writer_t *dm); +SQFS_API sqfs_dir_writer_t *sqfs_dir_writer_create(sqfs_meta_writer_t *dm); -void sqfs_dir_writer_destroy(sqfs_dir_writer_t *writer); +SQFS_API void sqfs_dir_writer_destroy(sqfs_dir_writer_t *writer); -int sqfs_dir_writer_begin(sqfs_dir_writer_t *writer); +SQFS_API int sqfs_dir_writer_begin(sqfs_dir_writer_t *writer); -int sqfs_dir_writer_add_entry(sqfs_dir_writer_t *writer, const char *name, - uint32_t inode_num, uint64_t inode_ref, - mode_t mode); +SQFS_API int sqfs_dir_writer_add_entry(sqfs_dir_writer_t *writer, + const char *name, + uint32_t inode_num, uint64_t inode_ref, + mode_t mode); -int sqfs_dir_writer_end(sqfs_dir_writer_t *writer); +SQFS_API int sqfs_dir_writer_end(sqfs_dir_writer_t *writer); -size_t sqfs_dir_writer_get_size(sqfs_dir_writer_t *writer); +SQFS_API size_t sqfs_dir_writer_get_size(sqfs_dir_writer_t *writer); -uint64_t sqfs_dir_writer_get_dir_reference(sqfs_dir_writer_t *writer); +SQFS_API uint64_t sqfs_dir_writer_get_dir_reference(sqfs_dir_writer_t *writer); -size_t sqfs_dir_writer_get_index_size(sqfs_dir_writer_t *writer); +SQFS_API size_t sqfs_dir_writer_get_index_size(sqfs_dir_writer_t *writer); -int sqfs_dir_writer_write_index(sqfs_dir_writer_t *writer, - sqfs_meta_writer_t *im); +SQFS_API int sqfs_dir_writer_write_index(sqfs_dir_writer_t *writer, + sqfs_meta_writer_t *im); #ifdef __cplusplus } |