mirror of
https://github.com/lua/lua.git
synced 2026-01-26 07:37:58 +00:00
Added "attribute internal" to __MACH__ platforms
Also, makefile does not add compiling options (LOCAL) to linker flags (MYLDFLAGS).
This commit is contained in:
parent
b352217b84
commit
26755cad99
18
llimits.h
18
llimits.h
@ -303,21 +303,21 @@ typedef unsigned long l_uint32;
|
||||
** LUAI_DDEF and LUAI_DDEC are marks for all extern (const) variables,
|
||||
** none of which to be exported to outside modules (LUAI_DDEF for
|
||||
** definitions and LUAI_DDEC for declarations).
|
||||
** Elf/gcc (versions 3.2 and later) mark them as "hidden" to optimize
|
||||
** access when Lua is compiled as a shared library. Not all elf targets
|
||||
** support this attribute. Unfortunately, gcc does not offer a way to
|
||||
** check whether the target offers that support, and those without
|
||||
** support give a warning about it. To avoid these warnings, change to
|
||||
** the default definition.
|
||||
** Elf and MACH/gcc (versions 3.2 and later) mark them as "hidden" to
|
||||
** optimize access when Lua is compiled as a shared library. Not all elf
|
||||
** targets support this attribute. Unfortunately, gcc does not offer
|
||||
** a way to check whether the target offers that support, and those
|
||||
** without support give a warning about it. To avoid these warnings,
|
||||
** change to the default definition.
|
||||
*/
|
||||
#if !defined(LUAI_FUNC)
|
||||
|
||||
#if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 302) && \
|
||||
defined(__ELF__) /* { */
|
||||
(defined(__ELF__) || defined(__MACH__))
|
||||
#define LUAI_FUNC __attribute__((visibility("internal"))) extern
|
||||
#else /* }{ */
|
||||
#else
|
||||
#define LUAI_FUNC extern
|
||||
#endif /* } */
|
||||
#endif
|
||||
|
||||
#define LUAI_DDEC(dec) LUAI_FUNC dec
|
||||
#define LUAI_DDEF /* empty */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user