]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: compiler: rename __unreachable() to my_unreachable()
authorWilly Tarreau <w@1wt.eu>
Sat, 20 Oct 2018 15:45:48 +0000 (17:45 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 20 Oct 2018 15:45:48 +0000 (17:45 +0200)
Olivier reported that on FreeBSD __unreachable is already defined
and causes build warnings. Let's rename it then.

include/common/compiler.h
src/hlua.c

index 8ebbf05ae98650f685d49fe19568228e49fdd2dd..2f3dd80bb12717d3ad8ddfbdfb40115d1f1dd50d 100644 (file)
@@ -89,9 +89,9 @@
  * below was introduced in gcc 4.5, and before it we didn't care.
  */
 #if __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
-#define __unreachable() __builtin_unreachable()
+#define my_unreachable() __builtin_unreachable()
 #else
-#define __unreachable()
+#define my_unreachable()
 #endif
 
 /*
index 451d6863af9331148f964ad8f4427e0345322eae..44fb04a7984c47f67172fdd49f313252e0610065 100644 (file)
@@ -68,7 +68,7 @@
  *   MAY_LJMP() marks an lua function that may use longjmp.
  */
 #define __LJMP
-#define WILL_LJMP(func) do { func; __unreachable(); } while(0)
+#define WILL_LJMP(func) do { func; my_unreachable(); } while(0)
 #define MAY_LJMP(func) func
 
 /* This couple of function executes securely some Lua calls outside of