From ec79a3b59ba8b8fddfb15e9ce75c414cca83edc1 Mon Sep 17 00:00:00 2001 From: batrick Date: Sat, 6 Feb 2010 00:59:33 +0000 Subject: [PATCH] Use defines for library names "nmap" and "stdnse.c" --- nse_main.cc | 4 ++-- nse_nmaplib.h | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/nse_main.cc b/nse_main.cc index 2a7e7b8d8..e614c9f77 100644 --- a/nse_main.cc +++ b/nse_main.cc @@ -279,13 +279,13 @@ static void set_nmap_libraries (lua_State *L) { static const luaL_Reg libs[] = { {NSE_PCRELIBNAME, luaopen_pcrelib}, // pcre library - {"nmap", luaopen_nmap}, // nmap bindings + {NSE_NMAPLIBNAME, luaopen_nmap}, // nmap bindings {NSE_BINLIBNAME, luaopen_binlib}, {BITLIBNAME, luaopen_bit}, // bit library #ifdef HAVE_OPENSSL {OPENSSLLIBNAME, luaopen_openssl}, // openssl bindings #endif - {"stdnse.c", luaopen_stdnse_c}, + {NSE_STDNSELIBNAME, luaopen_stdnse_c}, {NULL, NULL} }; diff --git a/nse_nmaplib.h b/nse_nmaplib.h index d8249ca71..41eddc92d 100644 --- a/nse_nmaplib.h +++ b/nse_nmaplib.h @@ -1,6 +1,9 @@ #ifndef NSE_NMAPLIB #define NSE_NMAPLIB +#define NSE_NMAPLIBNAME "nmap" +#define NSE_STDNSELIBNAME "stdnse.c" + class Target; class Port;