summaryrefslogtreecommitdiff
path: root/include/sqfs/super.h
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-05 19:08:10 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-05 19:08:10 +0200
commitf8a92529ec04b560b5b9e647b976892412f78134 (patch)
tree5308d7f500df46ef64423708ed40a37675f4020c /include/sqfs/super.h
parent320ae4f8e752f6652c7b5c8201d7267cd4de17c1 (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/super.h')
-rw-r--r--include/sqfs/super.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/include/sqfs/super.h b/include/sqfs/super.h
index 0df1691..6593555 100644
--- a/include/sqfs/super.h
+++ b/include/sqfs/super.h
@@ -9,6 +9,8 @@
#include "config.h"
+#include "sqfs/predef.h"
+
#include <stdint.h>
#include <stddef.h>
@@ -71,14 +73,15 @@ extern "C" {
#endif
/* Returns 0 on success. Prints error messages to stderr on failure. */
-int sqfs_super_init(sqfs_super_t *super, size_t block_size, uint32_t mtime,
- E_SQFS_COMPRESSOR compressor);
+SQFS_API int sqfs_super_init(sqfs_super_t *super, size_t block_size,
+ uint32_t mtime,
+ E_SQFS_COMPRESSOR compressor);
/* Returns 0 on success. Prints error messages to stderr on failure. */
-int sqfs_super_write(sqfs_super_t *super, int fd);
+SQFS_API int sqfs_super_write(sqfs_super_t *super, int fd);
/* Returns 0 on success. Prints error messages to stderr on failure. */
-int sqfs_super_read(sqfs_super_t *super, int fd);
+SQFS_API int sqfs_super_read(sqfs_super_t *super, int fd);
#ifdef __cplusplus
}