diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f82ba9a18..a985234d07 100644 --- a/CMakeLists.txt +++ b/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 a/Makefile.nmake b/Makefile.nmake index b773832c0c..4cb88112bb 100644 --- a/Makefile.nmake +++ b/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 a/acinclude.m4 b/acinclude.m4 index ed0a1f6499..1aa56a9f14 100644 --- a/acinclude.m4 +++ b/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 a/cmakeconfig.h.in b/cmakeconfig.h.in index f0ed5fffd0..f2bd8e6944 100644 --- a/cmakeconfig.h.in +++ b/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 header file. */ #cmakedefine HAVE_LUA_H 1 diff --git a/config.h.win32 b/config.h.win32 index d66faeb8be..82130b2b50 100644 --- a/config.h.win32 +++ b/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 a/config.nmake b/config.nmake index 6f32dc6cba..d45e9b9c4d 100644 --- a/config.nmake +++ b/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 a/epan/epan.c b/epan/epan.c index 538026007f..f28cb6124d 100644 --- a/epan/epan.c +++ b/epan/epan.c @@ -54,7 +54,7 @@ #include "emem.h" #include "expert.h" -#ifdef HAVE_LUA_5_1 +#ifdef HAVE_LUA #include #include #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 a/epan/filesystem.c b/epan/filesystem.c index ea41a10eda..761d17013a 100644 --- a/epan/filesystem.c +++ b/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 a/epan/plugins.c b/epan/plugins.c index 2e8e863fa2..3af1d80907 100644 --- a/epan/plugins.c +++ b/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 a/epan/wslua/wslua.h b/epan/wslua/wslua.h index 8a70d20b44..da6ecbb11d 100644 --- a/epan/wslua/wslua.h +++ b/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 a/ui/gtk/about_dlg.c b/ui/gtk/about_dlg.c index 5c56ecbf81..e444cd0d71 100644 --- a/ui/gtk/about_dlg.c +++ b/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 a/ui/gtk/main_menubar.c b/ui/gtk/main_menubar.c index a768078128..f4e929507e 100644 --- a/ui/gtk/main_menubar.c +++ b/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 a/ui/gtk/plugins_dlg.c b/ui/gtk/plugins_dlg.c index 543cc5f5b9..c6f0c4e468 100644 --- a/ui/gtk/plugins_dlg.c +++ b/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 */