Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mathis Rosenhauer
libaec
Commits
459aa6b4
Commit
459aa6b4
authored
Oct 07, 2016
by
Mathis Rosenhauer
Browse files
Add gcc visibility only for API functions
parent
97331a01
Changes
10
Hide whitespace changes
Inline
Side-by-side
configure.ac
View file @
459aa6b4
...
...
@@ -7,7 +7,7 @@ AC_CONFIG_SRCDIR([src/libaec.h])
AC_CONFIG_HEADERS(config/config.h)
LT_INIT
gl_VISIBILITY
AM_INIT_AUTOMAKE
# Checks for programs.
...
...
@@ -35,5 +35,4 @@ AM_EXTRA_RECURSIVE_TARGETS([bench benc bdec])
AC_CONFIG_FILES([Makefile \
src/Makefile \
tests/Makefile])
AC_OUTPUT
src/CMakeLists.txt
View file @
459aa6b4
...
...
@@ -10,8 +10,8 @@ SET_TARGET_PROPERTIES(sz PROPERTIES
TARGET_LINK_LIBRARIES
(
sz aec
)
IF
(
WIN32 AND BUILD_SHARED_LIBS
)
SET_TARGET_PROPERTIES
(
aec PROPERTIES DEFINE_SYMBOL
"
AECDLL_EXPORTS
"
)
SET_TARGET_PROPERTIES
(
sz PROPERTIES DEFINE_SYMBOL
"
AECDLL_EXPORTS
"
)
SET_TARGET_PROPERTIES
(
aec PROPERTIES DEFINE_SYMBOL
"
BUILDING_LIBAEC
"
)
SET_TARGET_PROPERTIES
(
sz PROPERTIES DEFINE_SYMBOL
"
BUILDING_LIBAEC
"
)
SET_TARGET_PROPERTIES
(
sz PROPERTIES OUTPUT_NAME
"szip"
)
ENDIF
(
WIN32 AND BUILD_SHARED_LIBS
)
...
...
src/Makefile.am
View file @
459aa6b4
AM_CFLAGS
=
@CFLAG_VISIBILITY@
AM_CPPFLAGS
=
-DBUILDING_LIBAEC
lib_LTLIBRARIES
=
libaec.la libsz.la
libaec_la_SOURCES
=
encode.c encode_accessors.c decode.c
\
encode.h encode_accessors.h decode.h
...
...
src/decode.c
View file @
459aa6b4
...
...
@@ -52,8 +52,8 @@
#include
<stdlib.h>
#include
<string.h>
#include
"libaec.h"
#include
"decode.h"
#include
"libaec.h"
#if HAVE_BSR64
# include <intrin.h>
...
...
src/decode.h
View file @
459aa6b4
...
...
@@ -63,6 +63,8 @@
#define MIN(a, b) (((a) < (b))? (a): (b))
struct
aec_stream
;
struct
internal_state
{
int
(
*
mode
)(
struct
aec_stream
*
);
...
...
src/encode.c
View file @
459aa6b4
...
...
@@ -52,9 +52,9 @@
#include
<stdlib.h>
#include
<string.h>
#include
"libaec.h"
#include
"encode.h"
#include
"encode_accessors.h"
#include
"libaec.h"
static
int
m_get_block
(
struct
aec_stream
*
strm
);
...
...
src/encode.h
View file @
459aa6b4
...
...
@@ -68,6 +68,8 @@
/* Marker for Remainder Of Segment condition in zero block encoding */
#define ROS -1
struct
aec_stream
;
struct
internal_state
{
int
(
*
mode
)(
struct
aec_stream
*
);
uint32_t
(
*
get_sample
)(
struct
aec_stream
*
);
...
...
src/libaec.h
View file @
459aa6b4
...
...
@@ -52,14 +52,14 @@
#include
<stddef.h>
#if
_WIN32
#
if
def
AECDLL_EXPORT
S
#
define AEC_SCOPE __declspec(dllexport)
#
else
#
define
AEC_SCOPE extern __declspec(dllimport)
#
endif
#if
BUILDING_LIBAEC && HAVE_VISIBILITY
# def
ine LIB
AEC
_
DLL_EXPORT
ED __attribute__((__visibility__("default")))
#
elif BUILDING_LIBAEC && defined _MSC_VER
#
define LIBAEC_DLL_EXPORTED __declspec(dllexport)
#
elif
define
d _MSC_VER
#
define LIBAEC_DLL_EXPORTED __declspec(dllimport)
#else
# define AEC_
SCOPE extern
# define
LIB
AEC_
DLL_EXPORTED
#endif
struct
internal_state
;
...
...
@@ -151,18 +151,18 @@ struct aec_stream {
/*********************************************/
/* Streaming encoding and decoding functions */
/*********************************************/
AEC_
SCOPE
int
aec_encode_init
(
struct
aec_stream
*
strm
);
AEC_
SCOPE
int
aec_encode
(
struct
aec_stream
*
strm
,
int
flush
);
AEC_
SCOPE
int
aec_encode_end
(
struct
aec_stream
*
strm
);
LIB
AEC_
DLL_EXPORTED
int
aec_encode_init
(
struct
aec_stream
*
strm
);
LIB
AEC_
DLL_EXPORTED
int
aec_encode
(
struct
aec_stream
*
strm
,
int
flush
);
LIB
AEC_
DLL_EXPORTED
int
aec_encode_end
(
struct
aec_stream
*
strm
);
AEC_
SCOPE
int
aec_decode_init
(
struct
aec_stream
*
strm
);
AEC_
SCOPE
int
aec_decode
(
struct
aec_stream
*
strm
,
int
flush
);
AEC_
SCOPE
int
aec_decode_end
(
struct
aec_stream
*
strm
);
LIB
AEC_
DLL_EXPORTED
int
aec_decode_init
(
struct
aec_stream
*
strm
);
LIB
AEC_
DLL_EXPORTED
int
aec_decode
(
struct
aec_stream
*
strm
,
int
flush
);
LIB
AEC_
DLL_EXPORTED
int
aec_decode_end
(
struct
aec_stream
*
strm
);
/***************************************************************/
/* Utility functions for encoding or decoding a memory buffer. */
/***************************************************************/
AEC_
SCOPE
int
aec_buffer_encode
(
struct
aec_stream
*
strm
);
AEC_
SCOPE
int
aec_buffer_decode
(
struct
aec_stream
*
strm
);
LIB
AEC_
DLL_EXPORTED
int
aec_buffer_encode
(
struct
aec_stream
*
strm
);
LIB
AEC_
DLL_EXPORTED
int
aec_buffer_decode
(
struct
aec_stream
*
strm
);
#endif
/* LIBAEC_H */
src/sz_compat.c
View file @
459aa6b4
#include
<stdio.h>
#include
<stdlib.h>
#include
<string.h>
#include
"szlib.h"
#if HAVE_CONFIG_H
# include <config.h>
#endif
#include
"szlib.h"
#define NOPTS 129
#define MIN(a, b) (((a) < (b))? (a): (b))
...
...
src/szlib.h
View file @
459aa6b4
...
...
@@ -31,13 +31,15 @@ typedef struct SZ_com_t_s
int
pixels_per_scanline
;
}
SZ_com_t
;
AEC_SCOPE
int
SZ_BufftoBuffCompress
(
void
*
dest
,
size_t
*
destLen
,
const
void
*
source
,
size_t
sourceLen
,
SZ_com_t
*
param
);
AEC_SCOPE
int
SZ_BufftoBuffDecompress
(
void
*
dest
,
size_t
*
destLen
,
const
void
*
source
,
size_t
sourceLen
,
SZ_com_t
*
param
);
AEC_SCOPE
int
SZ_encoder_enabled
(
void
);
LIBAEC_DLL_EXPORTED
int
SZ_BufftoBuffCompress
(
void
*
dest
,
size_t
*
destLen
,
const
void
*
source
,
size_t
sourceLen
,
SZ_com_t
*
param
);
LIBAEC_DLL_EXPORTED
int
SZ_BufftoBuffDecompress
(
void
*
dest
,
size_t
*
destLen
,
const
void
*
source
,
size_t
sourceLen
,
SZ_com_t
*
param
);
LIBAEC_DLL_EXPORTED
int
SZ_encoder_enabled
(
void
);
#endif
/* SZLIB_H */
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment