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 /lib/sqfs | |
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 'lib/sqfs')
-rw-r--r-- | lib/sqfs/block_processor.c | 1 | ||||
-rw-r--r-- | lib/sqfs/block_processor_parallel.c | 1 | ||||
-rw-r--r-- | lib/sqfs/comp/compressor.c | 1 | ||||
-rw-r--r-- | lib/sqfs/comp/gzip.c | 1 | ||||
-rw-r--r-- | lib/sqfs/comp/internal.h | 8 | ||||
-rw-r--r-- | lib/sqfs/comp/lz4.c | 1 | ||||
-rw-r--r-- | lib/sqfs/comp/lzo.c | 1 | ||||
-rw-r--r-- | lib/sqfs/comp/xz.c | 1 | ||||
-rw-r--r-- | lib/sqfs/comp/zstd.c | 1 | ||||
-rw-r--r-- | lib/sqfs/dir_writer.c | 1 | ||||
-rw-r--r-- | lib/sqfs/id_table.c | 1 | ||||
-rw-r--r-- | lib/sqfs/meta_reader.c | 1 | ||||
-rw-r--r-- | lib/sqfs/meta_writer.c | 1 | ||||
-rw-r--r-- | lib/sqfs/process_block.c | 1 | ||||
-rw-r--r-- | lib/sqfs/read_inode.c | 1 | ||||
-rw-r--r-- | lib/sqfs/read_super.c | 1 | ||||
-rw-r--r-- | lib/sqfs/read_table.c | 1 | ||||
-rw-r--r-- | lib/sqfs/readdir.c | 1 | ||||
-rw-r--r-- | lib/sqfs/super.c | 1 | ||||
-rw-r--r-- | lib/sqfs/write_inode.c | 1 | ||||
-rw-r--r-- | lib/sqfs/write_table.c | 1 | ||||
-rw-r--r-- | lib/sqfs/xattr.c | 1 | ||||
-rw-r--r-- | lib/sqfs/xattr_reader.c | 1 |
23 files changed, 30 insertions, 0 deletions
diff --git a/lib/sqfs/block_processor.c b/lib/sqfs/block_processor.c index 5579eb5..3a57d14 100644 --- a/lib/sqfs/block_processor.c +++ b/lib/sqfs/block_processor.c @@ -4,6 +4,7 @@ * * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at> */ +#define SQFS_BUILDING_DLL #include "config.h" #include "sqfs/block_processor.h" diff --git a/lib/sqfs/block_processor_parallel.c b/lib/sqfs/block_processor_parallel.c index 5d505e1..d81ba91 100644 --- a/lib/sqfs/block_processor_parallel.c +++ b/lib/sqfs/block_processor_parallel.c @@ -4,6 +4,7 @@ * * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at> */ +#define SQFS_BUILDING_DLL #include "config.h" #include "sqfs/block_processor.h" diff --git a/lib/sqfs/comp/compressor.c b/lib/sqfs/comp/compressor.c index fef238a..005dbd4 100644 --- a/lib/sqfs/comp/compressor.c +++ b/lib/sqfs/comp/compressor.c @@ -4,6 +4,7 @@ * * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at> */ +#define SQFS_BUILDING_DLL #include "config.h" #include <string.h> diff --git a/lib/sqfs/comp/gzip.c b/lib/sqfs/comp/gzip.c index 39e101f..e80073d 100644 --- a/lib/sqfs/comp/gzip.c +++ b/lib/sqfs/comp/gzip.c @@ -4,6 +4,7 @@ * * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at> */ +#define SQFS_BUILDING_DLL #include "config.h" #include <stdbool.h> diff --git a/lib/sqfs/comp/internal.h b/lib/sqfs/comp/internal.h index 1f76a45..117bb82 100644 --- a/lib/sqfs/comp/internal.h +++ b/lib/sqfs/comp/internal.h @@ -9,21 +9,29 @@ #include "config.h" +#include "sqfs/predef.h" #include "sqfs/compress.h" #include "util.h" +SQFS_INTERNAL int sqfs_generic_write_options(int fd, const void *data, size_t size); +SQFS_INTERNAL int sqfs_generic_read_options(int fd, void *data, size_t size); +SQFS_INTERNAL sqfs_compressor_t *xz_compressor_create(const sqfs_compressor_config_t *cfg); +SQFS_INTERNAL sqfs_compressor_t *gzip_compressor_create(const sqfs_compressor_config_t *cfg); +SQFS_INTERNAL sqfs_compressor_t *lzo_compressor_create(const sqfs_compressor_config_t *cfg); +SQFS_INTERNAL sqfs_compressor_t *lz4_compressor_create(const sqfs_compressor_config_t *cfg); +SQFS_INTERNAL sqfs_compressor_t *zstd_compressor_create(const sqfs_compressor_config_t *cfg); #endif /* INTERNAL_H */ diff --git a/lib/sqfs/comp/lz4.c b/lib/sqfs/comp/lz4.c index ddfab5c..0893b34 100644 --- a/lib/sqfs/comp/lz4.c +++ b/lib/sqfs/comp/lz4.c @@ -4,6 +4,7 @@ * * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at> */ +#define SQFS_BUILDING_DLL #include "config.h" #include <stdbool.h> diff --git a/lib/sqfs/comp/lzo.c b/lib/sqfs/comp/lzo.c index 8512dfa..b01bf20 100644 --- a/lib/sqfs/comp/lzo.c +++ b/lib/sqfs/comp/lzo.c @@ -4,6 +4,7 @@ * * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at> */ +#define SQFS_BUILDING_DLL #include "config.h" #include <stdbool.h> diff --git a/lib/sqfs/comp/xz.c b/lib/sqfs/comp/xz.c index 6598de7..1f98a25 100644 --- a/lib/sqfs/comp/xz.c +++ b/lib/sqfs/comp/xz.c @@ -4,6 +4,7 @@ * * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at> */ +#define SQFS_BUILDING_DLL #include "config.h" #include <stdbool.h> diff --git a/lib/sqfs/comp/zstd.c b/lib/sqfs/comp/zstd.c index bd90207..8a1dbf3 100644 --- a/lib/sqfs/comp/zstd.c +++ b/lib/sqfs/comp/zstd.c @@ -4,6 +4,7 @@ * * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at> */ +#define SQFS_BUILDING_DLL #include "config.h" #include <stdbool.h> diff --git a/lib/sqfs/dir_writer.c b/lib/sqfs/dir_writer.c index 2fb655a..6ff9541 100644 --- a/lib/sqfs/dir_writer.c +++ b/lib/sqfs/dir_writer.c @@ -4,6 +4,7 @@ * * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at> */ +#define SQFS_BUILDING_DLL #include "config.h" #include "sqfs/inode.h" diff --git a/lib/sqfs/id_table.c b/lib/sqfs/id_table.c index 6d76f52..cf1fd9b 100644 --- a/lib/sqfs/id_table.c +++ b/lib/sqfs/id_table.c @@ -4,6 +4,7 @@ * * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at> */ +#define SQFS_BUILDING_DLL #include "config.h" #include "sqfs/id_table.h" diff --git a/lib/sqfs/meta_reader.c b/lib/sqfs/meta_reader.c index ac71d1c..c95360d 100644 --- a/lib/sqfs/meta_reader.c +++ b/lib/sqfs/meta_reader.c @@ -4,6 +4,7 @@ * * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at> */ +#define SQFS_BUILDING_DLL #include "config.h" #include "sqfs/meta_reader.h" diff --git a/lib/sqfs/meta_writer.c b/lib/sqfs/meta_writer.c index af73de3..8bea3a7 100644 --- a/lib/sqfs/meta_writer.c +++ b/lib/sqfs/meta_writer.c @@ -4,6 +4,7 @@ * * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at> */ +#define SQFS_BUILDING_DLL #include "config.h" #include "sqfs/meta_writer.h" diff --git a/lib/sqfs/process_block.c b/lib/sqfs/process_block.c index 5233ce1..9e1e8cc 100644 --- a/lib/sqfs/process_block.c +++ b/lib/sqfs/process_block.c @@ -4,6 +4,7 @@ * * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at> */ +#define SQFS_BUILDING_DLL #include "config.h" #include "sqfs/block_processor.h" diff --git a/lib/sqfs/read_inode.c b/lib/sqfs/read_inode.c index 90cc060..c249c95 100644 --- a/lib/sqfs/read_inode.c +++ b/lib/sqfs/read_inode.c @@ -4,6 +4,7 @@ * * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at> */ +#define SQFS_BUILDING_DLL #include "config.h" #include "sqfs/inode.h" diff --git a/lib/sqfs/read_super.c b/lib/sqfs/read_super.c index b9525b3..5bd5e50 100644 --- a/lib/sqfs/read_super.c +++ b/lib/sqfs/read_super.c @@ -4,6 +4,7 @@ * * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at> */ +#define SQFS_BUILDING_DLL #include "config.h" #include "sqfs/super.h" diff --git a/lib/sqfs/read_table.c b/lib/sqfs/read_table.c index fec71a5..d2664d4 100644 --- a/lib/sqfs/read_table.c +++ b/lib/sqfs/read_table.c @@ -4,6 +4,7 @@ * * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at> */ +#define SQFS_BUILDING_DLL #include "config.h" #include "sqfs/meta_reader.h" diff --git a/lib/sqfs/readdir.c b/lib/sqfs/readdir.c index 310929c..1c1082a 100644 --- a/lib/sqfs/readdir.c +++ b/lib/sqfs/readdir.c @@ -4,6 +4,7 @@ * * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at> */ +#define SQFS_BUILDING_DLL #include "config.h" #include "sqfs/dir.h" diff --git a/lib/sqfs/super.c b/lib/sqfs/super.c index 728c0e1..5541501 100644 --- a/lib/sqfs/super.c +++ b/lib/sqfs/super.c @@ -4,6 +4,7 @@ * * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at> */ +#define SQFS_BUILDING_DLL #include "config.h" #include "sqfs/super.h" diff --git a/lib/sqfs/write_inode.c b/lib/sqfs/write_inode.c index 408e428..7714da9 100644 --- a/lib/sqfs/write_inode.c +++ b/lib/sqfs/write_inode.c @@ -4,6 +4,7 @@ * * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at> */ +#define SQFS_BUILDING_DLL #include "config.h" #include "sqfs/inode.h" diff --git a/lib/sqfs/write_table.c b/lib/sqfs/write_table.c index 513a38d..a5b4c69 100644 --- a/lib/sqfs/write_table.c +++ b/lib/sqfs/write_table.c @@ -4,6 +4,7 @@ * * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at> */ +#define SQFS_BUILDING_DLL #include "config.h" #include "sqfs/meta_writer.h" diff --git a/lib/sqfs/xattr.c b/lib/sqfs/xattr.c index 378c53b..dd8f2ee 100644 --- a/lib/sqfs/xattr.c +++ b/lib/sqfs/xattr.c @@ -4,6 +4,7 @@ * * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at> */ +#define SQFS_BUILDING_DLL #include "config.h" #include "sqfs/xattr.h" diff --git a/lib/sqfs/xattr_reader.c b/lib/sqfs/xattr_reader.c index 60ffc58..11933d8 100644 --- a/lib/sqfs/xattr_reader.c +++ b/lib/sqfs/xattr_reader.c @@ -4,6 +4,7 @@ * * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at> */ +#define SQFS_BUILDING_DLL #include "config.h" #include "sqfs/meta_reader.h" |