Files
haikuports/dev-lang/lua/patches/lua-5.4.0~beta.gcc2.patchset
Schrijvers Luc 45aa3d127a lua, bump version, add test (#4320)
Disabled for now as it's still in beta fase
2020-02-09 14:55:19 +01:00

38 lines
961 B
Plaintext

From 0fe2f71f6eb7fb099b4ad950b50e2f27d919ea67 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Tue, 11 Aug 2015 17:13:15 +0000
Subject: gcc2 patch
diff --git a/src/Makefile b/src/Makefile
index d0c4194..f5491cf 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -6,8 +6,8 @@
# Your platform. See PLATS for possible values.
PLAT= none
-CC= gcc -std=gnu99
-CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_3 $(SYSCFLAGS) $(MYCFLAGS)
+CC= gcc
+CFLAGS= -O2 -Wall -DLUA_COMPAT_5_3 $(SYSCFLAGS) $(MYCFLAGS)
LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
LIBS= -lm $(SYSLIBS) $(MYLIBS)
diff --git a/src/llimits.h b/src/llimits.h
index 2b52c83..ddbc51a 100644
--- a/src/llimits.h
+++ b/src/llimits.h
@@ -146,7 +146,7 @@ typedef LUAI_UACINT l_uacInt;
*/
#if !defined(likely)
-#if defined(__GNUC__)
+#if defined(__GNUC__) > 3
#define likely(x) (__builtin_expect(((x) != 0), 1))
#define unlikely(x) (__builtin_expect(((x) != 0), 0))
#else
--
2.23.0