Skip to content

Commit

Permalink
Merge pull request #35 from salcock/develop
Browse files Browse the repository at this point in the history
Add DLLEXPORT to the *_open and *_wopen functions
  • Loading branch information
salcock authored May 13, 2019
2 parents 06f335f + f418ca0 commit b1f6e90
Show file tree
Hide file tree
Showing 21 changed files with 23 additions and 20 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Version 4.2.0
* Replaced 'off_t' parameters and return values with 'int64_t' in
recently added API functions.
* Fixed potential uninitialised memory error when closing a wandio writer.
* Export symbols for all format-specific open functions.

Version 4.1.2
=============
Expand Down
1 change: 1 addition & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ libwandio1 (4.2.0-1) unstable; urgency=medium
* Replaced 'off_t' parameters and return values with 'int64_t' in
recently added API functions.
* Fixed potential uninitialised memory error when closing a wandio writer.
* Export symbols for all format-specific 'open' functions.

-- Shane Alcock <[email protected]> Fri, 10 May 2019 13:31:49 +1200

Expand Down
2 changes: 1 addition & 1 deletion lib/ior-bzip.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ extern io_source_t bz_source;
#define DATA(io) ((struct bz_t *)((io)->data))
#define min(a, b) ((a) < (b) ? (a) : (b))

io_t *bz_open(io_t *parent) {
DLLEXPORT io_t *bz_open(io_t *parent) {
io_t *io;
if (!parent)
return NULL;
Expand Down
5 changes: 3 additions & 2 deletions lib/ior-http.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,8 @@ static int fill_buffer(io_t *io) {
return DATA(io)->l_buf;
}

io_t *http_open_hdrs(const char *filename, char **hdrs, int hdrs_cnt) {
DLLEXPORT io_t *http_open_hdrs(const char *filename, char **hdrs, int hdrs_cnt)
{
io_t *io = malloc(sizeof(io_t));
if (!io)
return NULL;
Expand Down Expand Up @@ -270,7 +271,7 @@ io_t *http_open_hdrs(const char *filename, char **hdrs, int hdrs_cnt) {
return io;
}

io_t *http_open(const char *filename) {
DLLEXPORT io_t *http_open(const char *filename) {
return http_open_hdrs(filename, NULL, 0);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/ior-lzma.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ extern io_source_t lzma_source;
#define DATA(io) ((struct lzma_t *)((io)->data))
#define min(a, b) ((a) < (b) ? (a) : (b))

io_t *lzma_open(io_t *parent) {
DLLEXPORT io_t *lzma_open(io_t *parent) {
io_t *io;
if (!parent)
return NULL;
Expand Down
2 changes: 1 addition & 1 deletion lib/ior-peek.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ extern io_source_t peek_source;
#define DATA(io) ((struct peek_t *)((io)->data))
#define MIN(a, b) ((a) < (b) ? (a) : (b))

io_t *peek_open(io_t *child) {
DLLEXPORT io_t *peek_open(io_t *child) {
io_t *io;
if (!child)
return NULL;
Expand Down
2 changes: 1 addition & 1 deletion lib/ior-qat.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ struct qat_t {
enum err_t err;
};

io_t *qat_open(io_t *parent) {
DLLEXPORT io_t *qat_open(io_t *parent) {

int x;
io_t *io;
Expand Down
2 changes: 1 addition & 1 deletion lib/ior-stdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ extern io_source_t stdio_source;

#define DATA(io) ((struct stdio_t *)((io)->data))

io_t *stdio_open(const char *filename) {
DLLEXPORT io_t *stdio_open(const char *filename) {
io_t *io = malloc(sizeof(io_t));
io->data = malloc(sizeof(struct stdio_t));

Expand Down
2 changes: 1 addition & 1 deletion lib/ior-swift.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ extern io_source_t swift_source;
#define SWIFT_PFX_LEN 8
#define SWIFT_AUTH_TOKEN_HDR "X-Auth-Token: "

io_t *swift_open(const char *filename);
DLLEXPORT io_t *swift_open(const char *filename);
static int64_t swift_read(io_t *io, void *buffer, int64_t len);
static int64_t swift_tell(io_t *io);
static int64_t swift_seek(io_t *io, int64_t offset, int whence);
Expand Down
2 changes: 1 addition & 1 deletion lib/ior-thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ static void *thread_producer(void *userdata) {
return NULL;
}

io_t *thread_open(io_t *parent) {
DLLEXPORT io_t *thread_open(io_t *parent) {
io_t *state;
sigset_t set;
int s;
Expand Down
2 changes: 1 addition & 1 deletion lib/ior-zlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ extern io_source_t zlib_source;
#define DATA(io) ((struct zlib_t *)((io)->data))
#define min(a, b) ((a) < (b) ? (a) : (b))

io_t *zlib_open(io_t *parent) {
DLLEXPORT io_t *zlib_open(io_t *parent) {
io_t *io;
if (!parent)
return NULL;
Expand Down
2 changes: 1 addition & 1 deletion lib/ior-zstd-lz4.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ struct zstd_lz4_t {
#define DATA(io) ((struct zstd_lz4_t *)((io)->data))
extern io_source_t zstd_lz4_source;

io_t *zstd_lz4_open(io_t *parent) {
DLLEXPORT io_t *zstd_lz4_open(io_t *parent) {
io_t *io;
if (!parent) {
return NULL;
Expand Down
2 changes: 1 addition & 1 deletion lib/iow-bzip.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ extern iow_source_t bz_wsource;
#define DATA(iow) ((struct bzw_t *)((iow)->data))
#define min(a, b) ((a) < (b) ? (a) : (b))

iow_t *bz_wopen(iow_t *child, int compress_level) {
DLLEXPORT iow_t *bz_wopen(iow_t *child, int compress_level) {
iow_t *iow;
if (!child)
return NULL;
Expand Down
2 changes: 1 addition & 1 deletion lib/iow-lz4.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ struct lz4w_t {
#define DATA(iow) ((struct lz4w_t *)((iow)->data))
extern iow_source_t lz4_wsource;

iow_t *lz4_wopen(iow_t *child, int compress_level) {
DLLEXPORT iow_t *lz4_wopen(iow_t *child, int compress_level) {
iow_t *iow;
if (!child) {
return NULL;
Expand Down
2 changes: 1 addition & 1 deletion lib/iow-lzma.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ extern iow_source_t lzma_wsource;
#define DATA(iow) ((struct lzmaw_t *)((iow)->data))
#define min(a, b) ((a) < (b) ? (a) : (b))

iow_t *lzma_wopen(iow_t *child, int compress_level) {
DLLEXPORT iow_t *lzma_wopen(iow_t *child, int compress_level) {
iow_t *iow;
if (!child)
return NULL;
Expand Down
2 changes: 1 addition & 1 deletion lib/iow-lzo.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ static void *lzo_compress_thread(void *data) {
return NULL;
}

iow_t *lzo_wopen(iow_t *child, int compress_level) {
DLLEXPORT iow_t *lzo_wopen(iow_t *child, int compress_level) {
const int opt_filter = 0;
int flags;
iow_t *iow;
Expand Down
2 changes: 1 addition & 1 deletion lib/iow-qat.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ static void qat_perror(int errcode) {
}
}

iow_t *qat_wopen(iow_t *child, int compress_level) {
DLLEXPORT iow_t *qat_wopen(iow_t *child, int compress_level) {

iow_t *iow;
QzSessionParams_T params;
Expand Down
2 changes: 1 addition & 1 deletion lib/iow-stdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ static int safe_open(const char *filename, int flags) {
return fd;
}

iow_t *stdio_wopen(const char *filename, int flags) {
DLLEXPORT iow_t *stdio_wopen(const char *filename, int flags) {
iow_t *iow = malloc(sizeof(iow_t));
iow->source = &stdio_wsource;
iow->data = malloc(sizeof(struct stdiow_t));
Expand Down
2 changes: 1 addition & 1 deletion lib/iow-thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ static void *thread_consumer(void *userdata) {
return NULL;
}

iow_t *thread_wopen(iow_t *child) {
DLLEXPORT iow_t *thread_wopen(iow_t *child) {
iow_t *state;

if (!child) {
Expand Down
2 changes: 1 addition & 1 deletion lib/iow-zlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ extern iow_source_t zlib_wsource;
#define DATA(iow) ((struct zlibw_t *)((iow)->data))
#define min(a, b) ((a) < (b) ? (a) : (b))

iow_t *zlib_wopen(iow_t *child, int compress_level) {
DLLEXPORT iow_t *zlib_wopen(iow_t *child, int compress_level) {
iow_t *iow;
if (!child)
return NULL;
Expand Down
2 changes: 1 addition & 1 deletion lib/iow-zstd.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ struct zstdw_t {
#define DATA(iow) ((struct zstdw_t *)((iow)->data))
extern iow_source_t zstd_wsource;

iow_t *zstd_wopen(iow_t *child, int compress_level) {
DLLEXPORT iow_t *zstd_wopen(iow_t *child, int compress_level) {
iow_t *iow;
if (!child)
return NULL;
Expand Down

0 comments on commit b1f6e90

Please sign in to comment.