fix lua tmpname() vs mkstemp() on linux
Avoid the warning that tmpname should be replaced by mkstemp by replacing tmpname with mkstemp. lua has code to do that but it isn't trivial to activate while leaving the lua distribution unmodified. [I've no idea whether nethack's usage even results in liblua ever creating any temporary files.] Using nethack's hints to pass -DLUA_USE_POSIX from top Makefile to lib/lua-$(LUA_VERSION)/Makefile has been tested, building liblua.a on linux with that has not.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# NetHack Top-level Makefile.
|
||||
# NetHack 3.6 Makefile.top $NHDT-Date: 1575932543 2019/12/09 23:02:23 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.44 $
|
||||
# NetHack 3.6 Makefile.top $NHDT-Date: 1589828477 2020/05/18 19:01:17 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.48 $
|
||||
# Copyright (c) 2015 by Kenneth Lorber, Kensington, Maryland
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
|
||||
@@ -105,7 +105,8 @@ $(GAME): lua_support
|
||||
lua_support: lib/lua/liblua.a include/nhlua.h
|
||||
@true
|
||||
lib/lua-$(LUA_VERSION)/src/liblua.a: lib/lua-$(LUA_VERSION)/src/lua.h
|
||||
( cd lib/lua-$(LUA_VERSION)/src ; make a ; cd ../../.. )
|
||||
( cd lib/lua-$(LUA_VERSION)/src \
|
||||
&& make SYSCFLAGS=$(SYSCFLAGS) a && cd ../../.. )
|
||||
lib/lua/liblua.a: lib/lua-$(LUA_VERSION)/src/liblua.a
|
||||
@( if [ ! -d lib/lua ] ; then mkdir -p lib/lua ; fi )
|
||||
cp lib/lua-$(LUA_VERSION)/src/liblua.a $@
|
||||
|
||||
Reference in New Issue
Block a user