diff --git a/CHANGELOG b/CHANGELOG index 00ac33908..c5d301b67 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,8 @@ #Nmap Changelog ($Id$); -*-text-*- +o [GH#1355] When searching for Lua header files, actually use them where they + are found instead of forcing /usr/include. [Fabrice Fontaine, Daniel Miller] + o [NSE][GH#1331] Script traceroute-geolocation no longer crashes when www.GeoPlugin.net returns null coordinates [Michal Kubenka, nnposter] diff --git a/Makefile.in b/Makefile.in index cd1f85f79..69e8eef9d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -21,7 +21,6 @@ export NSOCKDIR=@NSOCKDIR@ export LIBLUADIR = @LIBLUADIR@ export LIBLINEARDIR = @LIBLINEARDIR@ export NDIR=$(shell pwd) -export LIBLUA_LIBS = @LIBLUA_LIBS@ export LIBLINEAR_LIBS = @LIBLINEAR_LIBS@ export NCATDIR=@NCATDIR@ CC = @CC@ @@ -91,7 +90,7 @@ UNINSTALLZENMAP=@UNINSTALLZENMAP@ UNINSTALLNDIFF=@UNINSTALLNDIFF@ UNINSTALLNPING=@UNINSTALLNPING@ -ifneq (@LIBLUA_LIBS@,) +ifneq (@NOLUA@,yes) NSE_SRC=nse_main.cc nse_utility.cc nse_nsock.cc nse_dnet.cc nse_fs.cc nse_nmaplib.cc nse_debug.cc nse_pcrelib.cc nse_lpeg.cc NSE_HDRS=nse_main.h nse_utility.h nse_nsock.h nse_dnet.h nse_fs.h nse_nmaplib.h nse_debug.h nse_pcrelib.h nse_lpeg.h NSE_OBJS=nse_main.o nse_utility.o nse_nsock.o nse_dnet.o nse_fs.o nse_nmaplib.o nse_debug.o nse_pcrelib.o nse_lpeg.o diff --git a/configure b/configure index 4249d4b3a..79a10e770 100755 --- a/configure +++ b/configure @@ -653,6 +653,7 @@ LUA_CLEAN LUA_BUILD LIBLUADIR LIBLUA_LIBS +NOLUA DNET_DIST_CLEAN DNET_CLEAN DNET_BUILD @@ -2014,48 +2015,6 @@ $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func - -# ac_fn_cxx_try_run LINENO -# ------------------------ -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_cxx_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_run cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. @@ -7079,6 +7038,8 @@ if test "${with_liblua+set}" = set; then : LUA_DIST_CLEAN="distclean-lua" have_lua="yes" +$as_echo "#define LUA_INCLUDED 1" >>confdefs.h + ;; no) no_lua="yes" @@ -7154,7 +7115,7 @@ fi if test "$no_lua" = "yes"; then trace_no_use="$trace_no_use lua" CPPFLAGS="-DNOLUA $CPPFLAGS" - LIBLUA_LIBS="" + NOLUA="yes" LUA_BUILD="" LUA_CLEAN="" LUA_DIST_CLEAN="" @@ -7173,149 +7134,93 @@ if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lua_isyieldable in -llua5.3" >&5 -$as_echo_n "checking for lua_isyieldable in -llua5.3... " >&6; } -if ${ac_cv_lib_lua5_3_lua_isyieldable+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-llua5.3 -lm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char lua_isyieldable (); -int -main () -{ -return lua_isyieldable (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_lua5_3_lua_isyieldable=yes -else - ac_cv_lib_lua5_3_lua_isyieldable=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lua5_3_lua_isyieldable" >&5 -$as_echo "$ac_cv_lib_lua5_3_lua_isyieldable" >&6; } -if test "x$ac_cv_lib_lua5_3_lua_isyieldable" = xyes; then : - have_lua=yes; LIBLUA_LIBS="-llua5.3"; CPPFLAGS="-I/usr/include/lua5.3 $CPPFLAGS"; break -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lua_isyieldable in -llua53" >&5 -$as_echo_n "checking for lua_isyieldable in -llua53... " >&6; } -if ${ac_cv_lib_lua53_lua_isyieldable+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-llua53 -lm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char lua_isyieldable (); -int -main () -{ -return lua_isyieldable (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_lua53_lua_isyieldable=yes -else - ac_cv_lib_lua53_lua_isyieldable=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lua53_lua_isyieldable" >&5 -$as_echo "$ac_cv_lib_lua53_lua_isyieldable" >&6; } -if test "x$ac_cv_lib_lua53_lua_isyieldable" = xyes; then : - have_lua=yes; LIBLUA_LIBS="-llua53"; CPPFLAGS="-I/usr/include/lua53 $CPPFLAGS"; break -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lua_isyieldable in -llua" >&5 -$as_echo_n "checking for lua_isyieldable in -llua... " >&6; } -if ${ac_cv_lib_lua_lua_isyieldable+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-llua -lm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char lua_isyieldable (); -int -main () -{ -return lua_isyieldable (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_lua_lua_isyieldable=yes -else - ac_cv_lib_lua_lua_isyieldable=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lua_lua_isyieldable" >&5 -$as_echo "$ac_cv_lib_lua_lua_isyieldable" >&6; } -if test "x$ac_cv_lib_lua_lua_isyieldable" = xyes; then : - have_lua=yes; LIBLUA_LIBS="-llua"; CPPFLAGS="-I/usr/include/lua $CPPFLAGS"; break -fi - - + break fi done + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing lua_isyieldable" >&5 +$as_echo_n "checking for library containing lua_isyieldable... " >&6; } +if ${ac_cv_search_lua_isyieldable+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char lua_isyieldable (); +int +main () +{ +return lua_isyieldable (); + ; + return 0; +} +_ACEOF +for ac_lib in '' lua5.3 lua53 lua; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib -lm $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_lua_isyieldable=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_lua_isyieldable+:} false; then : + break +fi +done +if ${ac_cv_search_lua_isyieldable+:} false; then : - # We need Lua 5.2 exactly +else + ac_cv_search_lua_isyieldable=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_lua_isyieldable" >&5 +$as_echo "$ac_cv_search_lua_isyieldable" >&6; } +ac_res=$ac_cv_search_lua_isyieldable +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + have_lua=yes +fi + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + # We need Lua 5.3 exactly { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lua version == 503" >&5 $as_echo_n "checking for lua version == 503... " >&6; } - -if test "$cross_compiling" = yes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling -- assuming yes" >&5 -$as_echo "cross-compiling -- assuming yes" >&6; }; have_lua=yes -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include + + #ifdef HAVE_LUA5_3_LUA_H + #include + #elif defined HAVE_LUA_5_3_LUA_H + #include + #elif defined HAVE_LUA_H || defined LUA_INCLUDED + #include + #elif defined HAVE_LUA_LUA_H + #include + #endif + + #if (LUA_VERSION_NUM != 503) + #error Incorrect Lua version + #endif + int main () { @@ -7323,16 +7228,14 @@ if(LUA_VERSION_NUM != 503) return 1; ; return 0; } + _ACEOF -if ac_fn_cxx_try_run "$LINENO"; then : +if ac_fn_c_try_cpp "$LINENO"; then : have_lua=yes else have_lua=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - +rm -f conftest.err conftest.i conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -7377,6 +7280,7 @@ fi + LIBLINEARDIR=liblinear have_liblinear=no @@ -7896,6 +7800,7 @@ fi done + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' diff --git a/configure.ac b/configure.ac index 06da8193e..013b52f0f 100644 --- a/configure.ac +++ b/configure.ac @@ -821,7 +821,7 @@ AC_SEARCH_LIBS(dlopen, dl) if test "$no_lua" = "yes"; then trace_no_use="$trace_no_use lua" CPPFLAGS="-DNOLUA $CPPFLAGS" - LIBLUA_LIBS="" + NOLUA="yes" LUA_BUILD="" LUA_CLEAN="" LUA_DIST_CLEAN="" @@ -832,20 +832,30 @@ else # If they didn't specify it, we try to find it if test $have_lua != yes; then - AC_CHECK_HEADERS([lua5.3/lua.h lua/5.3/lua.h lua.h lua/lua.h], - AC_CHECK_LIB(lua5.3, lua_isyieldable, [have_lua=yes; LIBLUA_LIBS="-llua5.3"; CPPFLAGS="-I/usr/include/lua5.3 $CPPFLAGS"; break],, [-lm]) - AC_CHECK_LIB(lua53, lua_isyieldable, [have_lua=yes; LIBLUA_LIBS="-llua53"; CPPFLAGS="-I/usr/include/lua53 $CPPFLAGS"; break],, [-lm]) - AC_CHECK_LIB(lua, lua_isyieldable, [have_lua=yes; LIBLUA_LIBS="-llua"; CPPFLAGS="-I/usr/include/lua $CPPFLAGS"; break],, [-lm]) - ) - - AC_LANG_PUSH(C++) - # We need Lua 5.2 exactly + AC_CHECK_HEADERS([lua5.3/lua.h lua/5.3/lua.h lua.h lua/lua.h], [break]) + AC_SEARCH_LIBS(lua_isyieldable, [lua5.3 lua53 lua], [have_lua=yes],, [-lm]) + AC_LANG_PUSH(C) + # We need Lua 5.3 exactly AC_MSG_CHECKING([for lua version == 503]) - AC_RUN_IFELSE([ AC_LANG_PROGRAM( - [[#include ]], - [[if(LUA_VERSION_NUM != 503) return 1;]])], - have_lua=yes, have_lua=no, AC_MSG_RESULT(cross-compiling -- assuming yes); have_lua=yes) - AC_LANG_POP(C++) + AC_PREPROC_IFELSE([ AC_LANG_PROGRAM( [[ + #ifdef HAVE_LUA5_3_LUA_H + #include + #elif defined HAVE_LUA_5_3_LUA_H + #include + #elif defined HAVE_LUA_H || defined LUA_INCLUDED + #include + #elif defined HAVE_LUA_LUA_H + #include + #endif + + #if (LUA_VERSION_NUM != 503) + #error Incorrect Lua version + #endif + ]], + [[if(LUA_VERSION_NUM != 503) return 1;]]) + ], + [have_lua=yes], [have_lua=no]) + AC_LANG_POP(C) LUA_BUILD="" LUA_CLEAN="" @@ -869,6 +879,7 @@ else NSE_CHECK="check-nse" fi +AC_SUBST(NOLUA) AC_SUBST(LIBLUA_LIBS) AC_SUBST(LIBLUADIR) AC_SUBST(LUA_BUILD) diff --git a/lpeg.c b/lpeg.c index 8cf871738..19a801b1b 100644 --- a/lpeg.c +++ b/lpeg.c @@ -16,8 +16,6 @@ #include #include -#include "lua.h" - #define VERSION "0.12" @@ -332,8 +330,6 @@ void checkrule (lua_State *L, Instruction *op, int from, int to, #if !defined(lpcode_h) #define lpcode_h -#include "lua.h" - int tocharset (TTree *tree, Charset *cs); int checkaux (TTree *tree, int pred); @@ -394,8 +390,6 @@ void printcaplist (Capture *cap, Capture *limit); ** Copyright 2007, Lua.org & PUC-Rio (see 'lpeg.html' for license) */ -#include "lua.h" -#include "lauxlib.h" @@ -932,8 +926,6 @@ int getcaptures (lua_State *L, const char *s, const char *r, int ptop) { #include -#include "lua.h" -#include "lauxlib.h" @@ -2136,8 +2128,6 @@ void printktable (lua_State *L, int idx) { #include -#include "lua.h" -#include "lauxlib.h" @@ -3362,8 +3352,6 @@ LUALIB_API int luaopen_lpeg (lua_State *L) { #include -#include "lua.h" -#include "lauxlib.h" diff --git a/nmap_config.h.in b/nmap_config.h.in index 6d0d0d454..524ff7437 100644 --- a/nmap_config.h.in +++ b/nmap_config.h.in @@ -257,4 +257,10 @@ extern "C" int gethostname (char *, unsigned int); #undef PCAP_NETMASK_UNKNOWN #undef HAVE_PCAP_SET_IMMEDIATE_MODE +/* Various possibilities for lua.h */ +#undef HAVE_LUA5_3_LUA_H +#undef HAVE_LUA_5_3_LUA_H +#undef HAVE_LUA_H +#undef HAVE_LUA_LUA_H + #endif /* CONFIG_H */ diff --git a/nse_debug.cc b/nse_debug.cc index f9df13ccc..c0379a90b 100644 --- a/nse_debug.cc +++ b/nse_debug.cc @@ -1,9 +1,5 @@ -extern "C" { - #include "lua.h" - #include "lauxlib.h" -} - +#include "nse_lua.h" #include "nse_debug.h" #include "output.h" #undef NDEBUG diff --git a/nse_dnet.cc b/nse_dnet.cc index 98289f53c..e597f3205 100644 --- a/nse_dnet.cc +++ b/nse_dnet.cc @@ -9,11 +9,7 @@ #include "struct_ip.h" -extern "C" { -#include "lua.h" -#include "lauxlib.h" -#include "lualib.h" -} +#include "nse_lua.h" #include diff --git a/nse_fs.cc b/nse_fs.cc index 8955abea5..b1548afb3 100644 --- a/nse_fs.cc +++ b/nse_fs.cc @@ -26,10 +26,7 @@ * **/ -extern "C" { - #include "lauxlib.h" - #include "lua.h" -} +#include "nse_lua.h" #include "nmap.h" #include "nse_fs.h" diff --git a/nse_libssh2.cc b/nse_libssh2.cc index afc9aa483..6a18c0c85 100644 --- a/nse_libssh2.cc +++ b/nse_libssh2.cc @@ -8,10 +8,9 @@ */ extern "C" { -#include "lua.h" -#include "lauxlib.h" #include "libssh2.h" } +#include "nse_lua.h" #include "nse_debug.h" #include "nse_nsock.h" diff --git a/nse_lpeg.cc b/nse_lpeg.cc index 6c3393744..ec7b6c48c 100644 --- a/nse_lpeg.cc +++ b/nse_lpeg.cc @@ -1,7 +1,4 @@ -extern "C" { - #include "lauxlib.h" - #include "lua.h" -} +#include "nse_lua.h" /* Lua 5.3 support */ #define luaL_checkint luaL_checkinteger diff --git a/nse_lua.h b/nse_lua.h new file mode 100644 index 000000000..aa5d4bb29 --- /dev/null +++ b/nse_lua.h @@ -0,0 +1,32 @@ +#ifndef NSE_LUA_H +#define NSE_LUA_H + +#include "nmap_config.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef HAVE_LUA5_3_LUA_H + #include + #include + #include +#elif defined HAVE_LUA_5_3_LUA_H + #include + #include + #include +#elif defined HAVE_LUA_H || defined LUA_INCLUDED + #include + #include + #include +#elif defined HAVE_LUA_LUA_H + #include + #include + #include +#endif + +#ifdef __cplusplus +} /* End of 'extern "C"' */ +#endif + +#endif /* NSE_LUA_H */ diff --git a/nse_main.h b/nse_main.h index 2cf735b07..d403f4634 100644 --- a/nse_main.h +++ b/nse_main.h @@ -5,11 +5,7 @@ #include #include -extern "C" { - #include "lua.h" - #include "lauxlib.h" - #include "lualib.h" -} +#include "nse_lua.h" #include "scan_lists.h" diff --git a/nse_nmaplib.cc b/nse_nmaplib.cc index 6e0b79b70..34419c124 100644 --- a/nse_nmaplib.cc +++ b/nse_nmaplib.cc @@ -1,9 +1,5 @@ -extern "C" { - #include "lua.h" - #include "lauxlib.h" - #include "lualib.h" -} +#include "nse_lua.h" #include diff --git a/nse_nsock.h b/nse_nsock.h index 2c6fcf5bd..713d6b8dc 100644 --- a/nse_nsock.h +++ b/nse_nsock.h @@ -1,9 +1,7 @@ #ifndef NMAP_LUA_NSOCK_H #define NMAP_LUA_NSOCK_H -extern "C" { - #include "lua.h" -} +#include "nse_lua.h" LUALIB_API int luaopen_nsock (lua_State *); diff --git a/nse_openssl.cc b/nse_openssl.cc index eedc331ac..55c2ffe82 100644 --- a/nse_openssl.cc +++ b/nse_openssl.cc @@ -36,14 +36,11 @@ #define PASS_EVP_CTX(ctx) (&(ctx)) #endif -extern "C" { - #include "lua.h" - #include "lauxlib.h" +#include "nse_lua.h" #if OPENSSL_API_COMPAT >= 0x10100000L /* Needed for get_random_bytes, since RAND_pseudo_bytes is gone */ #include #endif -} #include "nse_openssl.h" diff --git a/nse_pcrelib.cc b/nse_pcrelib.cc index 20119f5f7..adc52c68f 100644 --- a/nse_pcrelib.cc +++ b/nse_pcrelib.cc @@ -7,10 +7,7 @@ #include #include -extern "C" { - #include "lua.h" - #include "lauxlib.h" -} +#include "nse_lua.h" #include diff --git a/nse_ssl_cert.cc b/nse_ssl_cert.cc index dc9646c4e..b6aae7c4c 100644 --- a/nse_ssl_cert.cc +++ b/nse_ssl_cert.cc @@ -159,11 +159,7 @@ #endif -extern "C" -{ -#include "lua.h" -#include "lauxlib.h" -} +#include "nse_lua.h" #include "nse_nsock.h" diff --git a/nse_zlib.cc b/nse_zlib.cc index 44f176941..5a422ed7d 100644 --- a/nse_zlib.cc +++ b/nse_zlib.cc @@ -25,10 +25,7 @@ #include #include -extern "C" { -#include "lua.h" -#include "lauxlib.h" -} +#include "nse_lua.h" #include