summaryrefslogtreecommitdiff
path: root/include/sqfs/id_table.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/id_table.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/id_table.h')
-rw-r--r--include/sqfs/id_table.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/include/sqfs/id_table.h b/include/sqfs/id_table.h
index 0e652ec..f8b3b5c 100644
--- a/include/sqfs/id_table.h
+++ b/include/sqfs/id_table.h
@@ -12,7 +12,8 @@
#include <stdint.h>
#include <stddef.h>
-#include "compress.h"
+#include "sqfs/predef.h"
+#include "sqfs/compress.h"
typedef struct sqfs_id_table_t sqfs_id_table_t;
@@ -21,26 +22,27 @@ extern "C" {
#endif
/* Prints error message to stderr on failure. */
-sqfs_id_table_t *sqfs_id_table_create(void);
+SQFS_API sqfs_id_table_t *sqfs_id_table_create(void);
-void sqfs_id_table_destroy(sqfs_id_table_t *tbl);
+SQFS_API void sqfs_id_table_destroy(sqfs_id_table_t *tbl);
/* Resolve a 32 bit to a 16 bit table index.
Returns 0 on success. Internally prints errors to stderr. */
-int sqfs_id_table_id_to_index(sqfs_id_table_t *tbl, uint32_t id, uint16_t *out);
+SQFS_API int sqfs_id_table_id_to_index(sqfs_id_table_t *tbl, uint32_t id,
+ uint16_t *out);
/* Write an ID table to a SquashFS image.
Returns 0 on success. Internally prints error message to stderr. */
-int sqfs_id_table_write(sqfs_id_table_t *tbl, int outfd, sqfs_super_t *super,
- sqfs_compressor_t *cmp);
+SQFS_API int sqfs_id_table_write(sqfs_id_table_t *tbl, int outfd,
+ sqfs_super_t *super, sqfs_compressor_t *cmp);
/* Read an ID table from a SquashFS image.
Returns 0 on success. Internally prints error messages to stderr. */
-int sqfs_id_table_read(sqfs_id_table_t *tbl, int fd, sqfs_super_t *super,
- sqfs_compressor_t *cmp);
+SQFS_API int sqfs_id_table_read(sqfs_id_table_t *tbl, int fd,
+ sqfs_super_t *super, sqfs_compressor_t *cmp);
-int sqfs_id_table_index_to_id(const sqfs_id_table_t *tbl, uint16_t index,
- uint32_t *out);
+SQFS_API int sqfs_id_table_index_to_id(const sqfs_id_table_t *tbl,
+ uint16_t index, uint32_t *out);
#ifdef __cplusplus
}