summaryrefslogtreecommitdiff
path: root/lang/lua52/patches/patch-ac
blob: a1b4a5da18cdec5488cb02c972b08005f1ad3b53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
$NetBSD: patch-ac,v 1.2 2015/12/29 23:34:51 dholland Exp $

- allow LUA_ROOT to be set from the pkgsrc makefile
- solaris fix for PR 43350

--- src/luaconf.h.orig	2013-03-16 21:10:18.000000000 +0000
+++ src/luaconf.h
@@ -100,7 +100,9 @@
 #else			/* }{ */
 
 #define LUA_VDIR	LUA_VERSION_MAJOR "." LUA_VERSION_MINOR "/"
+#ifndef LUA_ROOT
 #define LUA_ROOT	"/usr/local/"
+#endif
 #define LUA_LDIR	LUA_ROOT "share/lua/" LUA_VDIR
 #define LUA_CDIR	LUA_ROOT "lib/lua/" LUA_VDIR
 #define LUA_PATH_DEFAULT  \
@@ -175,7 +177,7 @@
 ** default definition.
 */
 #if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 302) && \
-    defined(__ELF__)		/* { */
+    defined(__ELF__) && !defined(__sun)	/* { */
 #define LUAI_FUNC	__attribute__((visibility("hidden"))) extern
 #define LUAI_DDEC	LUAI_FUNC
 #define LUAI_DDEF	/* empty */