Rename __internal_linkage to pixman_private.

Track rename to pixman_private and move it to before the function return value to quiet gcc warnings about visibility attribute ignored for non-class type.
This commit is contained in:
Carl Worth 2004-12-23 11:10:08 +00:00
parent cd21775ef9
commit f76d898cf1
7 changed files with 69 additions and 41 deletions

View file

@ -1,5 +1,20 @@
2004-12-23 Carl Worth <cworth@cworth.org>
* src/slim_internal.h: Rename __internal_linkage to
pixman_private.
* src/icrop.h:
* src/icint.h:
* src/icimage.h: Track rename to pixman_private and move it to
before the function return value to quiet gcc warnings about
visibility attribute ignored for non-class type.
* configure.in:
* src/Makefile.am (INCLUDES): Add the following warnings when
compiling with gcc: -Wall -Wpointer-arith -Wstrict-prototypes
-Wmissing-prototypes -Wmissing-declarations -Wnested-externs
-fno-strict-aliasing
* src/icrect.c (pixman_color_rects): Fix to actually call
pixman_fill_rect_32bpp in the 32 bpp case. Thanks to
TOKUNAGA Hiroyuki <tkng@xem.jp>.

View file

@ -36,6 +36,18 @@ AM_PROG_LIBTOOL
AC_C_BIGENDIAN
dnl Use lots of warning flags with GCC
WARN_CFLAGS=""
if test "x$GCC" = "xyes"; then
WARN_CFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes \
-Wmissing-prototypes -Wmissing-declarations \
-Wnested-externs -fno-strict-aliasing"
fi
AC_SUBST(WARN_CFLAGS)
dnl ===========================================================================
AC_OUTPUT([

View file

@ -26,4 +26,4 @@ libpixman_la_SOURCES = \
libpixman_la_LDFLAGS = -version-info @VERSION_INFO@ -no-undefined
INCLUDES = -I$(srcdir)
INCLUDES = -I$(srcdir) $(WARN_CFLAGS)

View file

@ -153,25 +153,25 @@ typedef struct _IcIndexed {
#define IcIndexToEntY24(icf,rgb24) ((icf)->ent[CvtR8G8B8toY15(rgb24)])
/*
extern int __internal_linkage
pixman_private int
IcCreatePicture (PicturePtr pPicture);
*/
extern void __internal_linkage
pixman_private void
pixman_image_init (pixman_image_t *image);
extern void __internal_linkage
pixman_private void
pixman_image_destroyClip (pixman_image_t *image);
/*
extern void __internal_linkage
pixman_private void
IcValidatePicture (PicturePtr pPicture,
Mask mask);
*/
/* XXX: What should this be?
extern int __internal_linkage
pixman_private int
IcClipPicture (pixman_region16_t *region,
pixman_image_t *image,
int16_t xReg,
@ -180,7 +180,7 @@ IcClipPicture (pixman_region16_t *region,
int16_t yPict);
*/
extern int __internal_linkage
pixman_private int
IcComputeCompositeRegion (pixman_region16_t *region,
pixman_image_t *iSrc,
pixman_image_t *iMask,
@ -195,12 +195,12 @@ IcComputeCompositeRegion (pixman_region16_t *region,
uint16_t height);
/*
extern int __internal_linkage
pixman_private int
IcPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats);
*/
/*
extern void __internal_linkage
pixman_private void
IcGlyphs (pixman_operator_t op,
PicturePtr pSrc,
PicturePtr pDst,
@ -213,7 +213,7 @@ IcGlyphs (pixman_operator_t op,
*/
/*
extern void __internal_linkage
pixman_private void
pixman_compositeRects (pixman_operator_t op,
PicturePtr pDst,
xRenderColor *color,
@ -221,7 +221,7 @@ pixman_compositeRects (pixman_operator_t op,
xRectangle *rects);
*/
extern pixman_image_t * __internal_linkage
pixman_private pixman_image_t *
IcCreateAlphaPicture (pixman_image_t *dst,
pixman_format_t *format,
uint16_t width,
@ -307,7 +307,7 @@ typedef struct _IcCompSrc {
uint32_t alpha;
} IcCompSrc;
extern int __internal_linkage
pixman_private int
IcBuildCompositeOperand (pixman_image_t *image,
pixman_compositeOperand op[4],
int16_t x,
@ -315,7 +315,7 @@ IcBuildCompositeOperand (pixman_image_t *image,
int transform,
int alpha);
extern void __internal_linkage
pixman_private void
pixman_compositeGeneral (pixman_operator_t op,
pixman_image_t *iSrc,
pixman_image_t *iMask,

View file

@ -557,7 +557,7 @@ extern void IcSetBits (IcStip *bits, int stride, IcStip data);
/*
* icblt.c
*/
extern void __internal_linkage
pixman_private void
IcBlt (pixman_bits_t *src,
IcStride srcStride,
int srcX,
@ -576,7 +576,7 @@ IcBlt (pixman_bits_t *src,
int reverse,
int upsidedown);
extern void __internal_linkage
pixman_private void
IcBlt24 (pixman_bits_t *srcLine,
IcStride srcStride,
int srcX,
@ -594,7 +594,7 @@ IcBlt24 (pixman_bits_t *srcLine,
int reverse,
int upsidedown);
extern void __internal_linkage
pixman_private void
IcBltStip (IcStip *src,
IcStride srcStride, /* in IcStip units, not pixman_bits_t units */
int srcX,
@ -613,7 +613,7 @@ IcBltStip (IcStip *src,
/*
* icbltone.c
*/
extern void __internal_linkage
pixman_private void
IcBltOne (IcStip *src,
IcStride srcStride,
int srcX,
@ -631,7 +631,7 @@ IcBltOne (IcStip *src,
pixman_bits_t bgxor);
#ifdef IC_24BIT
extern void __internal_linkage
pixman_private void
IcBltOne24 (IcStip *src,
IcStride srcStride, /* IcStip units per scanline */
int srcX, /* bit position of source */
@ -653,13 +653,13 @@ IcBltOne24 (IcStip *src,
* icstipple.c
*/
extern void __internal_linkage
pixman_private void
IcTransparentSpan (pixman_bits_t *dst,
pixman_bits_t stip,
pixman_bits_t fgxor,
int n);
extern void __internal_linkage
pixman_private void
IcEvenStipple (pixman_bits_t *dst,
IcStride dstStride,
int dstX,
@ -680,7 +680,7 @@ IcEvenStipple (pixman_bits_t *dst,
int xRot,
int yRot);
extern void __internal_linkage
pixman_private void
IcOddStipple (pixman_bits_t *dst,
IcStride dstStride,
int dstX,
@ -702,7 +702,7 @@ IcOddStipple (pixman_bits_t *dst,
int xRot,
int yRot);
extern void __internal_linkage
pixman_private void
IcStipple (pixman_bits_t *dst,
IcStride dstStride,
int dstX,
@ -751,7 +751,7 @@ typedef struct _IcPixels {
typedef uint32_t Pixel;
/* icutil.c */
extern pixman_bits_t __internal_linkage
pixman_private pixman_bits_t
IcReplicatePixel (Pixel p, int bpp);
/* XXX: This is to avoid including gc.h from the server includes */
@ -786,35 +786,35 @@ _IcOnes(unsigned long mask);
/* icformat.c */
extern void __internal_linkage
pixman_private void
pixman_format_init (pixman_format_t *format, int format_code);
/* icimage.c */
extern pixman_image_t * __internal_linkage
pixman_private pixman_image_t *
pixman_image_createForPixels (IcPixels *pixels,
pixman_format_t *format);
/* icpixels.c */
extern IcPixels * __internal_linkage
pixman_private IcPixels *
IcPixelsCreate (int width, int height, int depth);
extern IcPixels * __internal_linkage
pixman_private IcPixels *
IcPixelsCreateForData (pixman_bits_t *data, int width, int height, int depth, int bpp, int stride);
extern void __internal_linkage
pixman_private void
IcPixelsDestroy (IcPixels *pixels);
/* ictransform.c */
extern int __internal_linkage
pixman_private int
pixman_transform_point (pixman_transform_t *transform,
pixman_vector_t *vector);
/* ictrap.c */
extern void __internal_linkage
pixman_private void
IcRasterizeTrapezoid (pixman_image_t *pMask,
const pixman_trapezoid_t *pTrap,
int x_off,
@ -968,7 +968,7 @@ typedef struct _Picture *PicturePtr;
#define PictureCmapPolicyColor 3
#define PictureCmapPolicyAll 4
extern int PictureCmapPolicy __internal_linkage;
pixman_private int PictureCmapPolicy;
int PictureParseCmapPolicy (const char *name);

View file

@ -29,7 +29,7 @@ typedef struct _mergeRopBits {
pixman_bits_t ca1, cx1, ca2, cx2;
} IcMergeRopRec, *IcMergeRopPtr;
extern const IcMergeRopRec IcMergeRopBits[16] __internal_linkage;
extern const IcMergeRopRec IcMergeRopBits[16] pixman_private;
#define IcDeclareMergeRop() pixman_bits_t _ca1, _cx1, _ca2, _cx2;
#define IcDeclarePrebuiltMergeRop() pixman_bits_t _cca, _ccx;
@ -98,11 +98,11 @@ extern const IcMergeRopRec IcMergeRopBits[16] __internal_linkage;
*/
/* half of table */
extern const pixman_bits_t icStipple16Bits[256] __internal_linkage;
pixman_private const pixman_bits_t icStipple16Bits[256];
#define IcStipple16Bits(b) \
(icStipple16Bits[(b)&0xff] | icStipple16Bits[(b) >> 8] << IC_HALFUNIT)
extern const pixman_bits_t * __internal_linkage
pixman_private const pixman_bits_t *
IcStippleTable(int bits);
#define IcStippleRRop(dst, b, fa, fx, ba, bx) \

View file

@ -33,23 +33,24 @@
internals that may change in future releases. It also allows the
compiler to generate slightly more efficient code in some cases.
The macro should be placed either immediately before a function name,
The macro should be placed either immediately before the return type in
a function declaration:
extern int __internal_linkage
pixman_private int
somefunction(void);
or after a data name,
extern int somedata __internal_linkage;
extern int somedata pixman_private;
The ELF visibility attribute did not exist before gcc 3.3. */
/* ??? Not marked with "slim" because that makes it look too much
like the function name instead of just an attribute. */
#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__)
#define __internal_linkage __attribute__((__visibility__("hidden")))
#define pixman_private __attribute__((__visibility__("hidden")))
#else
#define __internal_linkage
#define pixman_private
#endif
/* The following macros are used for PLT bypassing. First of all,
@ -71,7 +72,7 @@
slim_hidden_def (foo);
This works by arranging for the C symbol "foo" to be renamed to
"INT_foo" at the assembly level, which is marked __internal_linkage.
"INT_foo" at the assembly level, which is marked pixman_private.
We then create another symbol at the same address (an alias) with
the C symbol "EXT_foo", which is renamed to "foo" at the assembly
level. */
@ -82,7 +83,7 @@
# define slim_hidden_proto1(name, internal) \
extern __typeof (name) name \
__asm__ (slim_hidden_asmname (internal)) \
__internal_linkage;
pixman_private;
# define slim_hidden_def1(name, internal) \
extern __typeof (name) EXT_##name __asm__(slim_hidden_asmname(name)) \
__attribute__((__alias__(slim_hidden_asmname(internal))))