tile.c: fix TiFree() non-inline symbol should always be emitted
This is considered external public API for the tiles module, so
while internal magic code might inline all call sites internally
for performance the DSO (tclmagic.so) should always provide the
API symbol even if it does not use it.
This affects EL7 (gcc 4.8.5) and older:
#define __GNUC_GNU_INLINE__ 1
This does not affect newer GCC from EL8 (gcc 8.5.0) and later has:
#define __GNUC_STDC_INLINE__ 1
This can be seen as:
./Magic-8.3.536-x86_64-EL7.AppImage
/tmp/.mount_Magic-FDdbKA/bin/wish: symbol lookup error: /tmp/.mount_Magic-FDdbKA/lib/magic/tcl/tclmagic.so: undefined symbol: TiFree
This fixes the oversight introduced around commit f8ef715608
This commit is contained in:
parent
b577619395
commit
48dccc68c6
27
tiles/tile.c
27
tiles/tile.c
|
|
@ -769,6 +769,33 @@ extern inline void TiFree1(Tile **delay1, Tile *tile);
|
||||||
extern inline void TiJoinX1(Tile **delay1, Tile *tile1, Tile *tile2, Plane *plane);
|
extern inline void TiJoinX1(Tile **delay1, Tile *tile1, Tile *tile2, Plane *plane);
|
||||||
extern inline void TiJoinY1(Tile **delay1, Tile *tile1, Tile *tile2, Plane *plane);
|
extern inline void TiJoinY1(Tile **delay1, Tile *tile1, Tile *tile2, Plane *plane);
|
||||||
#else
|
#else
|
||||||
|
#ifdef HAVE_SYS_MMAN_H
|
||||||
|
void
|
||||||
|
TiFree(Tile *tile)
|
||||||
|
{
|
||||||
|
tile->ti_client = PTR2CD(TileStoreFreeList);
|
||||||
|
TileStoreFreeList = tile;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
/*
|
||||||
|
* --------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* TiFree ---
|
||||||
|
*
|
||||||
|
* Release memory allocation for tiles
|
||||||
|
*
|
||||||
|
* Results:
|
||||||
|
* None.
|
||||||
|
*
|
||||||
|
* --------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
TiFree(Tile *tile)
|
||||||
|
{
|
||||||
|
freeMagic((char *)tile);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* To support older compilers (that don't auto emit based on -O level) */
|
/* To support older compilers (that don't auto emit based on -O level) */
|
||||||
void
|
void
|
||||||
TiFreeIf(Tile *tile)
|
TiFreeIf(Tile *tile)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue