Add option to build with visibility=hidden + associated fixups.
SVN revision: 29454
This commit is contained in:
parent
b5f1cee3bc
commit
5d28b4ba22
24
configure.in
24
configure.in
|
@ -12,19 +12,11 @@ AC_C_BIGENDIAN
|
|||
AC_PROG_CC
|
||||
AM_PROG_AS
|
||||
|
||||
case $host_os in
|
||||
solaris*)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_CHECKING([if gcc supports __attribute__((visibility("hidden")))])
|
||||
AC_COMPILE_IFELSE([
|
||||
void __attribute__((visibility("hidden"))) func (void) {}
|
||||
],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(USE_HIDDEN_FUNCTION_ATTRIBUTE,1,
|
||||
[Define this to 1 if `hidden' attribute for internal functions is used.])],
|
||||
[AC_MSG_RESULT(no)])
|
||||
esac
|
||||
dnl Set default visibility to hidden?
|
||||
AC_ARG_ENABLE(visibility-hiding,
|
||||
[ --enable-visibility-hiding enable visibility hiding @<:@default=no@:>@],,
|
||||
enable_visibility_hiding=no
|
||||
)
|
||||
|
||||
AM_PROG_CC_STDC
|
||||
AC_HEADER_STDC
|
||||
|
@ -589,6 +581,10 @@ fi
|
|||
AM_CONDITIONAL(BUILD_ID3_LOADER, test "$id3_ok" = yes)
|
||||
AC_SUBST(ID3LIBS)
|
||||
|
||||
if test "x$enable_visibility_hiding" = xyes ; then
|
||||
CPPFLAGS="$CPPFLAGS -fvisibility=hidden"
|
||||
fi
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
imlib2.pc
|
||||
|
@ -636,6 +632,8 @@ echo
|
|||
echo "Use X86 MMX for speed.....: $mmx"
|
||||
echo "Use AMD64 for speed.......: $amd64"
|
||||
echo
|
||||
echo "Use visibility hiding.....: $enable_visibility_hiding"
|
||||
echo
|
||||
echo
|
||||
echo "Installation Path.........: $prefix"
|
||||
echo
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# define PR_(sym) __##sym
|
||||
#endif
|
||||
|
||||
#ifdef USE_HIDDEN_FUNCTION_ATTRIBUTE
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 4)
|
||||
# define HIDDEN_(sym) .hidden PR_(sym)
|
||||
#else
|
||||
# define HIDDEN_(sym)
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef USE_HIDDEN_FUNCTION_ATTRIBUTE
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 4)
|
||||
#define __hidden __attribute__((visibility("hidden")))
|
||||
#else
|
||||
#define __hidden
|
||||
|
|
|
@ -112,9 +112,10 @@ struct _imlibloader
|
|||
ImlibLoader *next;
|
||||
};
|
||||
|
||||
void __imlib_AttachTag(ImlibImage *im, const char *key, int val, void *data,
|
||||
EAPI void __imlib_AttachTag(ImlibImage *im, const char *key,
|
||||
int val, void *data,
|
||||
ImlibDataDestructorFunction destructor);
|
||||
ImlibImageTag *__imlib_GetTag(ImlibImage *im, const char *key);
|
||||
EAPI ImlibImageTag *__imlib_GetTag(ImlibImage *im, const char *key);
|
||||
__hidden ImlibImageTag *__imlib_RemoveTag(ImlibImage *im, const char *key);
|
||||
__hidden void __imlib_FreeTag(ImlibImage *im, ImlibImageTag *t);
|
||||
__hidden void __imlib_FreeAllTags(ImlibImage *im);
|
||||
|
@ -150,7 +151,7 @@ __hidden void __imlib_ConsumeLoader(ImlibLoader *l);
|
|||
__hidden void __imlib_RescanLoaders(void);
|
||||
__hidden void __imlib_RemoveAllLoaders(void);
|
||||
__hidden void __imlib_LoadAllLoaders(void);
|
||||
ImlibLoader *__imlib_FindBestLoaderForFile(const char *file, int for_save);
|
||||
EAPI ImlibLoader *__imlib_FindBestLoaderForFile(const char *file, int for_save);
|
||||
__hidden ImlibLoader *__imlib_FindBestLoaderForFileFormat(const char *file, char *format, int for_save);
|
||||
__hidden void __imlib_SetImageAlphaFlag(ImlibImage *im, char alpha);
|
||||
__hidden ImlibImage *__imlib_CreateImage(int w, int h, DATA32 *data);
|
||||
|
|
|
@ -10,6 +10,8 @@ INCLUDES = -I. \
|
|||
pkgdir = $(libdir)/imlib2/filters
|
||||
pkg_LTLIBRARIES = testfilter.la bumpmap.la colormod.la
|
||||
|
||||
EXTRA_DIST = filter_common.h
|
||||
|
||||
testfilter_la_SOURCES = filter_test.c
|
||||
testfilter_la_LDFLAGS = -module -avoid-version
|
||||
testfilter_la_LIBADD = $(top_builddir)/src/lib/libImlib2.la
|
||||
|
|
|
@ -1,14 +1,6 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "common.h"
|
||||
#include "filter_common.h"
|
||||
#include <string.h>
|
||||
|
||||
#include <math.h>
|
||||
#include "image.h"
|
||||
#include "script.h"
|
||||
#include "dynamic_filters.h"
|
||||
#include "colormod.h"
|
||||
#include "blend.h"
|
||||
|
||||
|
|
|
@ -1,14 +1,6 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "common.h"
|
||||
#include "filter_common.h"
|
||||
#include <string.h>
|
||||
|
||||
#include <math.h>
|
||||
#include "image.h"
|
||||
#include "script.h"
|
||||
#include "dynamic_filters.h"
|
||||
|
||||
#define GET_INT(x, ptr) (((ptr)->type == VAR_PTR) ? \
|
||||
(x) = (*(int *)(ptr)->data) : \
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
#ifndef __FILTER_COMMON_H
|
||||
#define __FILTER_COMMON_H 1
|
||||
|
||||
#include "config.h"
|
||||
#include "common.h"
|
||||
#include "dynamic_filters.h"
|
||||
#include "image.h"
|
||||
|
||||
EAPI void init(struct imlib_filter_info *info);
|
||||
EAPI void deinit(void);
|
||||
EAPI void *exec(char *filter, void *im, pIFunctionParam params);
|
||||
|
||||
#endif /* __FILTER_COMMON_H */
|
|
@ -1,16 +1,5 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "common.h"
|
||||
#include "filter_common.h"
|
||||
#include <string.h>
|
||||
#include "image.h"
|
||||
#include "script.h"
|
||||
#include "dynamic_filters.h"
|
||||
|
||||
void init(struct imlib_filter_info *info);
|
||||
void deinit(void);
|
||||
void *exec(char *filter, void *im, pIFunctionParam params);
|
||||
|
||||
void
|
||||
init(struct imlib_filter_info *info)
|
||||
|
|
|
@ -46,6 +46,8 @@ xpm.la \
|
|||
tga.la \
|
||||
lbm.la
|
||||
|
||||
EXTRA_DIST = loader_common.h
|
||||
|
||||
jpeg_la_SOURCES = loader_jpeg.c
|
||||
jpeg_la_LDFLAGS = -module -avoid-version
|
||||
jpeg_la_LIBADD = @JPEGLIBS@ $(top_builddir)/src/lib/libImlib2.la
|
||||
|
|
|
@ -1,17 +1,4 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "common.h"
|
||||
#include <string.h>
|
||||
|
||||
#include "image.h"
|
||||
|
||||
char load(ImlibImage * im, ImlibProgressFunction progress,
|
||||
char progress_granularity, char immediate_load);
|
||||
char save(ImlibImage * im, ImlibProgressFunction progress,
|
||||
char progress_granularity);
|
||||
void formats(ImlibLoader * l);
|
||||
#include "loader_common.h"
|
||||
|
||||
#define SWAP32(x) (x) = \
|
||||
((((x) & 0x000000ff ) << 24) |\
|
||||
|
|
|
@ -8,22 +8,8 @@
|
|||
* - Simplify and make secure RLE encoding
|
||||
* - Fix 16 and 32 bit depth (old code was incorrect and it's commented)
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "common.h"
|
||||
#include "loader_common.h"
|
||||
#include <sys/stat.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "image.h"
|
||||
|
||||
char load(ImlibImage * im, ImlibProgressFunction progress,
|
||||
char progress_granularity, char immediate_load);
|
||||
char save(ImlibImage * im, ImlibProgressFunction progress,
|
||||
char progress_granularity);
|
||||
void formats(ImlibLoader * l);
|
||||
|
||||
typedef struct tagRGBQUAD {
|
||||
unsigned char rgbBlue;
|
||||
|
|
|
@ -1,19 +1,10 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include "loader_common.h"
|
||||
#include <bzlib.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "image.h"
|
||||
|
||||
#define OUTBUF_SIZE 16384
|
||||
#define INBUF_SIZE 1024
|
||||
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
#ifndef __LOADER_COMMON_H
|
||||
#define __LOADER_COMMON_H 1
|
||||
|
||||
#include "config.h"
|
||||
#include "common.h"
|
||||
#include "image.h"
|
||||
|
||||
EAPI char load(ImlibImage * im, ImlibProgressFunction progress,
|
||||
char progress_granularity, char immediate_load);
|
||||
EAPI char save(ImlibImage * im, ImlibProgressFunction progress,
|
||||
char progress_granularity);
|
||||
EAPI void formats(ImlibLoader * l);
|
||||
|
||||
#endif /* __LOADER_COMMON_H */
|
|
@ -1,23 +1,9 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "common.h"
|
||||
#include <stdio.h>
|
||||
#include "loader_common.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "image.h"
|
||||
#include <gif_lib.h>
|
||||
|
||||
char load(ImlibImage * im, ImlibProgressFunction progress,
|
||||
char progress_granularity, char immediate_load);
|
||||
char save(ImlibImage * im, ImlibProgressFunction progress,
|
||||
char progress_granularity);
|
||||
void formats(ImlibLoader * l);
|
||||
|
||||
char
|
||||
load(ImlibImage * im, ImlibProgressFunction progress, char progress_granularity,
|
||||
char immediate_load)
|
||||
|
|
|
@ -1,19 +1,10 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include "loader_common.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include "image.h"
|
||||
|
||||
#include <id3tag.h>
|
||||
|
||||
#if ! defined (__STDC_VERSION__) || __STDC_VERSION__ < 199901L
|
||||
|
|
|
@ -1,11 +1,4 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "common.h"
|
||||
#include <string.h>
|
||||
|
||||
#include "image.h"
|
||||
#include "loader_common.h"
|
||||
#include <jpeglib.h>
|
||||
#include <setjmp.h>
|
||||
|
||||
|
@ -15,16 +8,7 @@ struct ImLib_JPEG_error_mgr {
|
|||
};
|
||||
typedef struct ImLib_JPEG_error_mgr *emptr;
|
||||
|
||||
void _JPEGFatalErrorHandler(j_common_ptr cinfo);
|
||||
void _JPEGErrorHandler(j_common_ptr cinfo);
|
||||
void _JPEGErrorHandler2(j_common_ptr cinfo, int msg_level);
|
||||
char load(ImlibImage * im, ImlibProgressFunction progress,
|
||||
char progress_granularity, char immediate_load);
|
||||
char save(ImlibImage * im, ImlibProgressFunction progress,
|
||||
char progress_granularity);
|
||||
void formats(ImlibLoader * l);
|
||||
|
||||
void
|
||||
static void
|
||||
_JPEGFatalErrorHandler(j_common_ptr cinfo)
|
||||
{
|
||||
emptr errmgr;
|
||||
|
@ -35,7 +19,7 @@ _JPEGFatalErrorHandler(j_common_ptr cinfo)
|
|||
return;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
_JPEGErrorHandler(j_common_ptr cinfo)
|
||||
{
|
||||
emptr errmgr;
|
||||
|
@ -46,7 +30,7 @@ _JPEGErrorHandler(j_common_ptr cinfo)
|
|||
return;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
_JPEGErrorHandler2(j_common_ptr cinfo, int msg_level)
|
||||
{
|
||||
emptr errmgr;
|
||||
|
|
|
@ -11,19 +11,7 @@
|
|||
* Version: 2004-08-28
|
||||
*------------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "common.h"
|
||||
#include "image.h"
|
||||
|
||||
char load(ImlibImage *im, ImlibProgressFunction progress, char progress_granularity, char immediate_load);
|
||||
#if 0
|
||||
char save(ImlibImage *im, ImlibProgressFunction progress, char progress_granularity);
|
||||
#endif
|
||||
void formats(ImlibLoader *l);
|
||||
|
||||
#include "loader_common.h"
|
||||
|
||||
#define L2RLONG(a) ((((long)((a)[0]) & 0xff) << 24) + (((long)((a)[1]) & 0xff) << 16) + (((long)((a)[2]) & 0xff) << 8) + ((long)((a)[3]) & 0xff))
|
||||
#define L2RWORD(a) ((((long)((a)[0]) & 0xff) << 8) + ((long)((a)[1]) & 0xff))
|
||||
|
@ -53,13 +41,6 @@ typedef struct ILBM {
|
|||
int rle;
|
||||
} ILBM;
|
||||
|
||||
static void freeilbm(ILBM *);
|
||||
static int loadchunks(char *, ILBM *, int);
|
||||
static void bodyrow(unsigned char *, int, ILBM *);
|
||||
static unsigned char scalegun(unsigned char, int);
|
||||
static void scalecmap(ILBM *);
|
||||
static void deplane(DATA32 *, int, ILBM *, unsigned char **);
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
* Frees memory allocated as part of an ILBM structure.
|
||||
|
|
|
@ -1,11 +1,4 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "common.h"
|
||||
#include <string.h>
|
||||
|
||||
#include "image.h"
|
||||
#include "loader_common.h"
|
||||
#include <png.h>
|
||||
|
||||
/* this is a quick sample png loader module... nice and small isnt it? */
|
||||
|
@ -13,13 +6,6 @@
|
|||
/* PNG stuff */
|
||||
#define PNG_BYTES_TO_CHECK 4
|
||||
|
||||
char load(ImlibImage * im, ImlibProgressFunction progress,
|
||||
char progress_granularity, char immediate_load);
|
||||
char save(ImlibImage * im, ImlibProgressFunction progress,
|
||||
char progress_granularity);
|
||||
void formats(ImlibLoader * l);
|
||||
|
||||
static void comment_free(ImlibImage * im, void *data);
|
||||
static void
|
||||
comment_free(ImlibImage * im, void *data)
|
||||
{
|
||||
|
|
|
@ -1,17 +1,5 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "common.h"
|
||||
#include <string.h>
|
||||
#include "loader_common.h"
|
||||
#include <ctype.h>
|
||||
#include "image.h"
|
||||
|
||||
char load(ImlibImage * im, ImlibProgressFunction progress,
|
||||
char progress_granularity, char immediate_load);
|
||||
char save(ImlibImage * im, ImlibProgressFunction progress,
|
||||
char progress_granularity);
|
||||
void formats(ImlibLoader * l);
|
||||
|
||||
char
|
||||
load(ImlibImage * im, ImlibProgressFunction progress,
|
||||
|
|
|
@ -9,26 +9,12 @@
|
|||
*
|
||||
* header/footer structures courtesy of the GIMP Targa plugin
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "common.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "loader_common.h"
|
||||
#include <sys/stat.h>
|
||||
#include <sys/mman.h>
|
||||
#include "image.h"
|
||||
#include "colormod.h"
|
||||
#include "blend.h"
|
||||
|
||||
char load(ImlibImage * im, ImlibProgressFunction progress,
|
||||
char progress_granularity, char immediate_load);
|
||||
char save(ImlibImage * im, ImlibProgressFunction progress,
|
||||
char progress_granularity);
|
||||
void formats(ImlibLoader * l);
|
||||
|
||||
/* flip an inverted image - see RLE reading below */
|
||||
static void tgaflip(DATA32 * in, int w, int h);
|
||||
|
||||
|
|
|
@ -1,17 +1,9 @@
|
|||
/* To do: */
|
||||
/* o Need code to handle tiff with different orientations */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "common.h"
|
||||
#include <string.h>
|
||||
|
||||
#include "loader_common.h"
|
||||
#include <setjmp.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include "image.h"
|
||||
#include <tiffio.h>
|
||||
|
||||
/* This is a wrapper data structure for TIFFRGBAImage, so that data can be */
|
||||
|
@ -31,21 +23,8 @@ struct TIFFRGBAImage_Extra {
|
|||
|
||||
typedef struct TIFFRGBAImage_Extra TIFFRGBAImage_Extra;
|
||||
|
||||
static void put_contig_and_raster(TIFFRGBAImage *, uint32 *,
|
||||
uint32, uint32, uint32, uint32, int32,
|
||||
int32, unsigned char *);
|
||||
static void put_separate_and_raster(TIFFRGBAImage *, uint32 *, uint32,
|
||||
uint32, uint32, uint32, int32,
|
||||
int32, unsigned char *,
|
||||
unsigned char *, unsigned char *,
|
||||
unsigned char *);
|
||||
static void raster(TIFFRGBAImage_Extra * img, uint32 * raster, uint32 x,
|
||||
uint32 y, uint32 w, uint32 h);
|
||||
char load(ImlibImage * im, ImlibProgressFunction progress,
|
||||
char progress_granularity, char immediate_load);
|
||||
char save(ImlibImage * im, ImlibProgressFunction progress,
|
||||
char progress_granularity);
|
||||
void formats(ImlibLoader * l);
|
||||
|
||||
static void
|
||||
put_contig_and_raster(TIFFRGBAImage * img, uint32 * rast,
|
||||
|
|
|
@ -1,21 +1,7 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "common.h"
|
||||
#include <stdio.h>
|
||||
#include "loader_common.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "image.h"
|
||||
|
||||
char load(ImlibImage * im, ImlibProgressFunction progress,
|
||||
char progress_granularity, char immediate_load);
|
||||
char save(ImlibImage * im, ImlibProgressFunction progress,
|
||||
char progress_granularity);
|
||||
void formats(ImlibLoader * l);
|
||||
|
||||
static FILE *rgb_txt = NULL;
|
||||
|
||||
|
|
|
@ -1,18 +1,10 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "loader_common.h"
|
||||
#include <zlib.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "image.h"
|
||||
|
||||
#define OUTBUF_SIZE 16484
|
||||
|
||||
static int uncompress_file (int src, int dest)
|
||||
|
|
Loading…
Reference in New Issue