290 lines
8.2 KiB
Diff
290 lines
8.2 KiB
Diff
diff --git CMakeLists.txt CMakeLists.txt
|
|
index 4f82ba9..a985234 100644
|
|
--- CMakeLists.txt
|
|
+++ CMakeLists.txt
|
|
@@ -365,7 +365,7 @@ if(HAVE_LIBPYTHON)
|
|
endif()
|
|
if(HAVE_LIBLUA)
|
|
set(HAVE_LUA_H 1)
|
|
- set(HAVE_LUA_5_1 1)
|
|
+ set(HAVE_LUA 1)
|
|
endif()
|
|
if(HAVE_LIBKERBEROS)
|
|
set(HAVE_KERBEROS 1)
|
|
diff --git Makefile.nmake Makefile.nmake
|
|
index a6ecdf8..ac4c410 100644
|
|
--- Makefile.nmake
|
|
+++ Makefile.nmake
|
|
@@ -409,7 +409,7 @@ config.h : config.h.win32 config.nmake
|
|
-e "s/@HAVE_LIBGNUTLS@/$(GNUTLS_CONFIG)/" \
|
|
-e "s/@HAVE_LIBGCRYPT@/$(LIBGCRYPT_CONFIG)/" \
|
|
-e "s/@HAVE_LUA@/$(LUA_CONFIG)/" \
|
|
- -e "s/@HAVE_LUA_5_1@/$(LUA_VERSION)/" \
|
|
+ -e "s/@HAVE_LUA@/$(LUA_VERSION)/" \
|
|
-e "s/@HAVE_PYTHON@/$(PYTHON_CONFIG)/" \
|
|
-e "s/@HAVE_AIRPCAP@/$(AIRPCAP_CONFIG)/" \
|
|
-e "s/@HAVE_AIRPDCAP@/$(AIRPDCAP_CONFIG)/" \
|
|
diff --git acinclude.m4 acinclude.m4
|
|
index 4ddc54c..ee63237 100644
|
|
--- acinclude.m4
|
|
+++ acinclude.m4
|
|
@@ -938,7 +938,7 @@ AC_DEFUN([AC_WIRESHARK_LIBLUA_CHECK],[
|
|
LUA_LIBS="-llua -lm"
|
|
LUA_INCLUDES=""
|
|
fi
|
|
- AC_DEFINE(HAVE_LUA_5_1, 1, [Define to use Lua ${lua_ver}])
|
|
+ AC_DEFINE(HAVE_LUA, 1, [Define to use Lua ${lua_ver}])
|
|
want_lua=yes
|
|
|
|
],[
|
|
@@ -954,7 +954,7 @@ AC_DEFUN([AC_WIRESHARK_LIBLUA_CHECK],[
|
|
# Lua found
|
|
#
|
|
LUA_LIBS=" -llua${lua_ver} -lm"
|
|
- AC_DEFINE(HAVE_LUA_5_1, 1, [Define to use Lua ${lua_ver}])
|
|
+ AC_DEFINE(HAVE_LUA, 1, [Define to use Lua ${lua_ver}])
|
|
want_lua=yes
|
|
],[
|
|
#
|
|
diff --git cmakeconfig.h.in cmakeconfig.h.in
|
|
index f0ed5ff..f2bd8e6 100644
|
|
--- cmakeconfig.h.in
|
|
+++ cmakeconfig.h.in
|
|
@@ -136,7 +136,7 @@
|
|
#cmakedefine HAVE_LUALIB_H 1
|
|
|
|
/* Define to use Lua 5.1 */
|
|
-#cmakedefine HAVE_LUA_5_1 1
|
|
+#cmakedefine HAVE_LUA 1
|
|
|
|
/* Define to 1 if you have the <lua.h> header file. */
|
|
#cmakedefine HAVE_LUA_H 1
|
|
diff --git config.h.win32 config.h.win32
|
|
index d66faeb..82130b2 100644
|
|
--- config.h.win32
|
|
+++ config.h.win32
|
|
@@ -203,7 +203,7 @@
|
|
|
|
/* Define to use Lua */
|
|
@HAVE_LUA@
|
|
-@HAVE_LUA_5_1@
|
|
+@HAVE_LUA@
|
|
|
|
/* Define to use Python */
|
|
@HAVE_PYTHON@
|
|
diff --git config.nmake config.nmake
|
|
index 6f32dc6..d45e9b9 100644
|
|
--- config.nmake
|
|
+++ config.nmake
|
|
@@ -1274,7 +1274,7 @@ LUA_CFLAGS=/I$(LUA_DIR)\include
|
|
LUA_LIBS=$(LUA_DIR)\lua5.1.lib
|
|
# Nmake uses carets to escape special characters
|
|
LUA_CONFIG=^#define HAVE_LUA 1
|
|
-LUA_VERSION=^#define HAVE_LUA_5_1 1
|
|
+LUA_VERSION=^#define HAVE_LUA 1
|
|
!else
|
|
LUA_CFLAGS=
|
|
LUA_LIBS=
|
|
diff --git epan/epan.c epan/epan.c
|
|
index 5380260..f28cb61 100644
|
|
--- epan/epan.c
|
|
+++ epan/epan.c
|
|
@@ -54,7 +54,7 @@
|
|
#include "emem.h"
|
|
#include "expert.h"
|
|
|
|
-#ifdef HAVE_LUA_5_1
|
|
+#ifdef HAVE_LUA
|
|
#include <lua.h>
|
|
#include <wslua/wslua.h>
|
|
#endif
|
|
@@ -117,7 +117,7 @@ epan_init(void (*register_all_protocols_func)(register_cb cb, gpointer client_da
|
|
final_registration_all_protocols();
|
|
host_name_lookup_init();
|
|
expert_init();
|
|
-#ifdef HAVE_LUA_5_1
|
|
+#ifdef HAVE_LUA
|
|
wslua_init(cb, client_data);
|
|
#endif
|
|
#ifdef HAVE_GEOIP
|
|
@@ -295,12 +295,12 @@ epan_get_compiled_version_info(GString *str)
|
|
|
|
/* LUA */
|
|
g_string_append(str, ", ");
|
|
-#ifdef HAVE_LUA_5_1
|
|
+#ifdef HAVE_LUA
|
|
g_string_append(str, "with ");
|
|
g_string_append(str, LUA_VERSION);
|
|
#else
|
|
g_string_append(str, "without Lua");
|
|
-#endif /* HAVE_LUA_5_1 */
|
|
+#endif /* HAVE_LUA */
|
|
|
|
g_string_append(str, ", ");
|
|
#ifdef HAVE_PYTHON
|
|
diff --git epan/filesystem.c epan/filesystem.c
|
|
index ea41a10..761d170 100644
|
|
--- epan/filesystem.c
|
|
+++ epan/filesystem.c
|
|
@@ -771,7 +771,7 @@ get_wspython_dir(void)
|
|
}
|
|
|
|
|
|
-#if defined(HAVE_PLUGINS) || defined(HAVE_LUA_5_1)
|
|
+#if defined(HAVE_PLUGINS) || defined(HAVE_LUA)
|
|
/*
|
|
* Find the directory where the plugins are stored.
|
|
*
|
|
@@ -850,7 +850,7 @@ init_plugin_dir(void)
|
|
}
|
|
#endif
|
|
}
|
|
-#endif /* HAVE_PLUGINS || HAVE_LUA_5_1 */
|
|
+#endif /* HAVE_PLUGINS || HAVE_LUA */
|
|
|
|
/*
|
|
* Get the directory in which the plugins are stored.
|
|
@@ -858,7 +858,7 @@ init_plugin_dir(void)
|
|
const char *
|
|
get_plugin_dir(void)
|
|
{
|
|
-#if defined(HAVE_PLUGINS) || defined(HAVE_LUA_5_1)
|
|
+#if defined(HAVE_PLUGINS) || defined(HAVE_LUA)
|
|
if (!plugin_dir) init_plugin_dir();
|
|
return plugin_dir;
|
|
#else
|
|
diff --git epan/plugins.c epan/plugins.c
|
|
index 2e8e863..3af1d80 100644
|
|
--- epan/plugins.c
|
|
+++ epan/plugins.c
|
|
@@ -519,7 +519,7 @@ plugins_dump_all(void)
|
|
plugin *pt_plug;
|
|
const char *sep;
|
|
#endif
|
|
-#ifdef HAVE_LUA_5_1
|
|
+#ifdef HAVE_LUA
|
|
wslua_plugin *lua_plug;
|
|
#endif
|
|
|
|
@@ -552,7 +552,7 @@ plugins_dump_all(void)
|
|
}
|
|
#endif
|
|
|
|
-#ifdef HAVE_LUA_5_1
|
|
+#ifdef HAVE_LUA
|
|
for (lua_plug = wslua_plugin_list; lua_plug != NULL; lua_plug = lua_plug->next)
|
|
{
|
|
printf("%s\t%s\tlua script\t%s\n", lua_plug->name, lua_plug->version, lua_plug->filename);
|
|
diff --git epan/wslua/wslua.h epan/wslua/wslua.h
|
|
index a919543..4c0faab 100644
|
|
--- epan/wslua/wslua.h
|
|
+++ epan/wslua/wslua.h
|
|
@@ -297,7 +297,7 @@ C shift##C(lua_State* L,int i) { \
|
|
} \
|
|
typedef int dummy##C
|
|
|
|
-#ifdef HAVE_LUA_5_1
|
|
+#ifdef HAVE_LUA
|
|
|
|
#if LUA_VERSION_NUM == 502
|
|
#define WSLUA_REGISTER_CLASS(C) { \
|
|
diff --git ui/gtk/about_dlg.c ui/gtk/about_dlg.c
|
|
index 5c56ecb..e444cd0 100644
|
|
--- ui/gtk/about_dlg.c
|
|
+++ ui/gtk/about_dlg.c
|
|
@@ -247,7 +247,7 @@ splash_update(register_action_e action, const char *message, gpointer client_dat
|
|
dissectors, listeners,
|
|
registering plugins, handingoff plugins,
|
|
preferences and configuration */
|
|
-#ifdef HAVE_LUA_5_1
|
|
+#ifdef HAVE_LUA
|
|
ul_count++; /* additional one for lua plugins */
|
|
#endif
|
|
#ifdef HAVE_PYTHON
|
|
@@ -438,7 +438,7 @@ about_folders_page_new(void)
|
|
about_folders_row(table, "Program", constpath,
|
|
"program files");
|
|
|
|
-#if defined(HAVE_PLUGINS) || defined(HAVE_LUA_5_1)
|
|
+#if defined(HAVE_PLUGINS) || defined(HAVE_LUA)
|
|
/* pers plugins */
|
|
path = get_plugins_pers_dir();
|
|
about_folders_row(table, "Personal Plugins", path,
|
|
@@ -509,7 +509,7 @@ about_wireshark_cb( GtkWidget *w _U_, gpointer data _U_ )
|
|
GtkWidget *main_box, *main_nb, *bbox, *ok_btn;
|
|
GtkWidget *page_lb, *about_page, *folders_page;
|
|
|
|
-#if defined(HAVE_PLUGINS) || defined(HAVE_LUA_5_1)
|
|
+#if defined(HAVE_PLUGINS) || defined(HAVE_LUA)
|
|
GtkWidget *plugins_page;
|
|
#endif
|
|
|
|
@@ -553,7 +553,7 @@ about_wireshark_cb( GtkWidget *w _U_, gpointer data _U_ )
|
|
page_lb = gtk_label_new("Folders");
|
|
gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), folders_page, page_lb);
|
|
|
|
-#if defined(HAVE_PLUGINS) || defined(HAVE_LUA_5_1)
|
|
+#if defined(HAVE_PLUGINS) || defined(HAVE_LUA)
|
|
plugins_page = about_plugins_page_new();
|
|
page_lb = gtk_label_new("Plugins");
|
|
gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), plugins_page, page_lb);
|
|
diff --git ui/gtk/main_menubar.c ui/gtk/main_menubar.c
|
|
index ab62ec9..17fe44c 100644
|
|
--- ui/gtk/main_menubar.c
|
|
+++ ui/gtk/main_menubar.c
|
|
@@ -3708,7 +3708,7 @@ make_menu_xml(const char *path) {
|
|
* Creates an action group for the menu items in xpath, and returns it. The caller should
|
|
* use g_object_unref() on the returned pointer if transferring scope.
|
|
*/
|
|
-#ifdef HAVE_LUA_5_1
|
|
+#ifdef HAVE_LUA
|
|
/* NOTE currently only used from Lua, remove this ifdef when used
|
|
outside of #ifdef LUA */
|
|
static GtkActionGroup*
|
|
@@ -3797,7 +3797,7 @@ make_menu_actions(const char *path, const menu_item_t *menu_item_data) {
|
|
static void
|
|
merge_lua_menu_items(GList *merge_lua_menu_items_list _U_)
|
|
{
|
|
-#ifdef HAVE_LUA_5_1
|
|
+#ifdef HAVE_LUA
|
|
guint merge_id;
|
|
GtkActionGroup *action_group;
|
|
menu_item_t *menu_item_data;
|
|
diff --git ui/gtk/plugins_dlg.c ui/gtk/plugins_dlg.c
|
|
index 543cc5f..c6f0c4e 100644
|
|
--- ui/gtk/plugins_dlg.c
|
|
+++ ui/gtk/plugins_dlg.c
|
|
@@ -35,7 +35,7 @@
|
|
#include "ui/gtk/plugins_dlg.h"
|
|
|
|
|
|
-#if defined(HAVE_PLUGINS) || defined(HAVE_LUA_5_1)
|
|
+#if defined(HAVE_PLUGINS) || defined(HAVE_LUA)
|
|
|
|
/*
|
|
* Fill the list widget with a list of the plugin modules.
|
|
@@ -48,7 +48,7 @@ plugins_scan(GtkWidget *list)
|
|
plugin *pt_plug;
|
|
const char *sep;
|
|
#endif
|
|
-#ifdef HAVE_LUA_5_1
|
|
+#ifdef HAVE_LUA
|
|
wslua_plugin *lua_plug;
|
|
#endif
|
|
GString *type;
|
|
@@ -86,7 +86,7 @@ plugins_scan(GtkWidget *list)
|
|
}
|
|
#endif
|
|
|
|
-#ifdef HAVE_LUA_5_1
|
|
+#ifdef HAVE_LUA
|
|
for (lua_plug = wslua_plugin_list; lua_plug != NULL; lua_plug = lua_plug->next)
|
|
{
|
|
type = g_string_new("");
|
|
@@ -119,4 +119,4 @@ about_plugins_page_new(void)
|
|
return scrolledwindow;
|
|
}
|
|
|
|
-#endif /* HAVE_PLUGINS || HAVE_LUA_5_1 */
|
|
+#endif /* HAVE_PLUGINS || HAVE_LUA */
|