]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: lua: use the build options list to report it
authorWilly Tarreau <w@1wt.eu>
Wed, 21 Dec 2016 18:04:56 +0000 (19:04 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 21 Dec 2016 20:30:54 +0000 (21:30 +0100)
This removes 1 #ifdef from haproxy.c. The "build without" version
is not reported anymore now.

src/haproxy.c
src/hlua.c

index e9dca47334d65237a9823f488cd5e3966b59b726..bf7dfc1d40f285678f85b40d6a7cc4d20380b72e 100644 (file)
@@ -425,12 +425,6 @@ static void display_build_opts()
        printf("Built without PCRE support (using libc's regex instead)\n");
 #endif
 
-#ifdef USE_LUA
-       printf("Built with Lua version : %s\n", LUA_RELEASE);
-#else
-       printf("Built without Lua support\n");
-#endif
-
        list_for_each_entry(item, &build_opts_list, list) {
                puts(item->str);
        }
index ef1dabfaef3c41fbf5c879956edc4323329de223..f423c6da3ce00e746929b971a86164edba79aee4 100644 (file)
@@ -7703,3 +7703,11 @@ void hlua_init(void)
 
        RESET_SAFE_LJMP(gL.T);
 }
+
+__attribute__((constructor))
+static void __hlua_init(void)
+{
+       char *ptr = NULL;
+       memprintf(&ptr, "Built with Lua version : %s", LUA_RELEASE);
+       hap_register_build_opts(ptr, 1);
+}