mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 10:03:45 +01:00
Fix Windows build, clean up included headers
Also fix a startup error caused by s_security.cpp
This commit is contained in:
parent
e13d2bafc6
commit
39869aaa25
@ -17,11 +17,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <strings.h>
|
|
||||||
#include "objdef.h"
|
#include "objdef.h"
|
||||||
#include "util/numeric.h"
|
#include "util/numeric.h"
|
||||||
#include "debug.h"
|
|
||||||
#include "porting.h"
|
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "gamedef.h"
|
#include "gamedef.h"
|
||||||
|
|
||||||
|
@ -20,9 +20,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
#ifndef OBJDEF_HEADER
|
#ifndef OBJDEF_HEADER
|
||||||
#define OBJDEF_HEADER
|
#define OBJDEF_HEADER
|
||||||
|
|
||||||
#include <string>
|
#include "porting.h"
|
||||||
#include <vector>
|
|
||||||
#include "irrlichttypes.h"
|
|
||||||
|
|
||||||
class IGameDef;
|
class IGameDef;
|
||||||
class INodeDefManager;
|
class INodeDefManager;
|
||||||
|
@ -264,7 +264,7 @@ bool ScriptApiSecurity::safeLoadFile(lua_State *L, const char *path)
|
|||||||
fp = stdin;
|
fp = stdin;
|
||||||
chunk_name = const_cast<char *>("=stdin");
|
chunk_name = const_cast<char *>("=stdin");
|
||||||
} else {
|
} else {
|
||||||
fp = fopen(path, "r");
|
fp = fopen(path, "rb");
|
||||||
if (!fp) {
|
if (!fp) {
|
||||||
lua_pushfstring(L, "%s: %s", path, strerror(errno));
|
lua_pushfstring(L, "%s: %s", path, strerror(errno));
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user