You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.3 KiB

  1. commit 9011ff6c9fb5128dd50b4210e05199ea6337b82b
  2. Author: Willy Tarreau <w@1wt.eu>
  3. Date: Sat Oct 20 17:45:48 2018 +0200
  4. BUILD: compiler: rename __unreachable() to my_unreachable()
  5. Olivier reported that on FreeBSD __unreachable is already defined
  6. and causes build warnings. Let's rename it then.
  7. (cherry picked from commit 4e7cc3381b27e3971b02b73a113ecc13916e1f20)
  8. Signed-off-by: Willy Tarreau <w@1wt.eu>
  9. diff --git a/include/common/compiler.h b/include/common/compiler.h
  10. index 6f4f5a67..60549307 100644
  11. --- a/include/common/compiler.h
  12. +++ b/include/common/compiler.h
  13. @@ -89,9 +89,9 @@
  14. * below was introduced in gcc 4.5, and before it we didn't care.
  15. */
  16. #if __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
  17. -#define __unreachable() __builtin_unreachable()
  18. +#define my_unreachable() __builtin_unreachable()
  19. #else
  20. -#define __unreachable()
  21. +#define my_unreachable()
  22. #endif
  23. /*
  24. diff --git a/src/hlua.c b/src/hlua.c
  25. index c3bb269a..085544dc 100644
  26. --- a/src/hlua.c
  27. +++ b/src/hlua.c
  28. @@ -64,7 +64,7 @@
  29. * MAY_LJMP() marks an lua function that may use longjmp.
  30. */
  31. #define __LJMP
  32. -#define WILL_LJMP(func) do { func; __unreachable(); } while(0)
  33. +#define WILL_LJMP(func) do { func; my_unreachable(); } while(0)
  34. #define MAY_LJMP(func) func
  35. /* This couple of function executes securely some Lua calls outside of