aboutsummaryrefslogtreecommitdiff
path: root/llimits.h
diff options
context:
space:
mode:
authorRoberto I <roberto@inf.puc-rio.br>2025-10-18 10:30:12 -0300
committerRoberto I <roberto@inf.puc-rio.br>2025-10-18 10:30:12 -0300
commit26755cad99cd2a362a3f149114a2e7f05928db0a (patch)
tree69e1b3c18a6871b6481a012d3ac75408f1ac69b2 /llimits.h
parentb352217b8498a5ed8f6c954b3da365fcbb89751f (diff)
downloadlua-26755cad99cd2a362a3f149114a2e7f05928db0a.tar.gz
lua-26755cad99cd2a362a3f149114a2e7f05928db0a.tar.bz2
lua-26755cad99cd2a362a3f149114a2e7f05928db0a.zip
Added "attribute internal" to __MACH__ platforms
Also, makefile does not add compiling options (LOCAL) to linker flags (MYLDFLAGS).
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 */