aboutsummaryrefslogtreecommitdiff
path: root/llimits.h
diff options
context:
space:
mode:
Diffstat (limited to 'llimits.h')
-rw-r--r--llimits.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/llimits.h b/llimits.h
index 21632543..fc5cb276 100644
--- a/llimits.h
+++ b/llimits.h
@@ -303,21 +303,21 @@ typedef unsigned long l_uint32;
303** LUAI_DDEF and LUAI_DDEC are marks for all extern (const) variables, 303** LUAI_DDEF and LUAI_DDEC are marks for all extern (const) variables,
304** none of which to be exported to outside modules (LUAI_DDEF for 304** none of which to be exported to outside modules (LUAI_DDEF for
305** definitions and LUAI_DDEC for declarations). 305** definitions and LUAI_DDEC for declarations).
306** Elf/gcc (versions 3.2 and later) mark them as "hidden" to optimize 306** Elf and MACH/gcc (versions 3.2 and later) mark them as "hidden" to
307** access when Lua is compiled as a shared library. Not all elf targets 307** optimize access when Lua is compiled as a shared library. Not all elf
308** support this attribute. Unfortunately, gcc does not offer a way to 308** targets support this attribute. Unfortunately, gcc does not offer
309** check whether the target offers that support, and those without 309** a way to check whether the target offers that support, and those
310** support give a warning about it. To avoid these warnings, change to 310** without support give a warning about it. To avoid these warnings,
311** the default definition. 311** change to the default definition.
312*/ 312*/
313#if !defined(LUAI_FUNC) 313#if !defined(LUAI_FUNC)
314 314
315#if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 302) && \ 315#if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 302) && \
316 defined(__ELF__) /* { */ 316 (defined(__ELF__) || defined(__MACH__))
317#define LUAI_FUNC __attribute__((visibility("internal"))) extern 317#define LUAI_FUNC __attribute__((visibility("internal"))) extern
318#else /* }{ */ 318#else
319#define LUAI_FUNC extern 319#define LUAI_FUNC extern
320#endif /* } */ 320#endif
321 321
322#define LUAI_DDEC(dec) LUAI_FUNC dec 322#define LUAI_DDEC(dec) LUAI_FUNC dec
323#define LUAI_DDEF /* empty */ 323#define LUAI_DDEF /* empty */