summaryrefslogtreecommitdiff
path: root/include/sqfs/compress.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/compress.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/compress.h')
-rw-r--r--include/sqfs/compress.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/include/sqfs/compress.h b/include/sqfs/compress.h
index c826c84..27c603d 100644
--- a/include/sqfs/compress.h
+++ b/include/sqfs/compress.h
@@ -14,6 +14,7 @@
#include <stddef.h>
#include <stdint.h>
+#include "sqfs/predef.h"
#include "sqfs/super.h"
typedef struct sqfs_compressor_t sqfs_compressor_t;
@@ -132,16 +133,18 @@ typedef enum {
extern "C" {
#endif
-int sqfs_compressor_config_init(sqfs_compressor_config_t *cfg,
- E_SQFS_COMPRESSOR id,
- size_t block_size, uint16_t flags);
+SQFS_API int sqfs_compressor_config_init(sqfs_compressor_config_t *cfg,
+ E_SQFS_COMPRESSOR id,
+ size_t block_size, uint16_t flags);
-bool sqfs_compressor_exists(E_SQFS_COMPRESSOR id);
+SQFS_API bool sqfs_compressor_exists(E_SQFS_COMPRESSOR id);
+SQFS_API
sqfs_compressor_t *sqfs_compressor_create(const sqfs_compressor_config_t *cfg);
-const char *sqfs_compressor_name_from_id(E_SQFS_COMPRESSOR id);
+SQFS_API const char *sqfs_compressor_name_from_id(E_SQFS_COMPRESSOR id);
+SQFS_API
int sqfs_compressor_id_from_name(const char *name, E_SQFS_COMPRESSOR *out);
#ifdef __cplusplus