Skip to content

Commit

Permalink
fix compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
pangweiwei committed Aug 14, 2018
1 parent 03a0b68 commit e5cbc3e
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 17 deletions.
13 changes: 3 additions & 10 deletions LICENSE.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,12 @@ The below software in this distribution may have been modified by THL A29 Limite
1. Lua 5.3.4
Copyright © 1994–2017 Lua.org, PUC-Rio.

2. LuaSocket 3.0
Copyright © 2004-2013 Diego Nehab


Terms of the MIT License:
---------------------------------------------------
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


2. LuaSocket 3.0
--------------------------------------------------------------------
Copyright © 2004-2013 Diego Nehab

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@

#include "inet.h"

namespace NS_SLUA {
#ifdef _WIN32
#define gai_strerror gai_strerrorA
#endif

namespace NS_SLUA {

/*=========================================================================*\
* Internal function prototypes.
Expand Down Expand Up @@ -253,7 +257,7 @@ int inet_meth_getpeername(lua_State *L, p_socket ps, int family)
port, sizeof(port), NI_NUMERICHOST | NI_NUMERICSERV);
if (err) {
lua_pushnil(L);
lua_pushstring(L, gai_strerrorA(err));
lua_pushstring(L, gai_strerror(err));
return 2;
}
lua_pushstring(L, name);
Expand Down Expand Up @@ -287,7 +291,7 @@ int inet_meth_getsockname(lua_State *L, p_socket ps, int family)
name, INET6_ADDRSTRLEN, port, 6, NI_NUMERICHOST | NI_NUMERICSERV);
if (err) {
lua_pushnil(L);
lua_pushstring(L, gai_strerrorA(err));
lua_pushstring(L, gai_strerror(err));
return 2;
}
lua_pushstring(L, name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@

#include "mime.h"

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wchar-subscripts"


namespace NS_SLUA {

/*=========================================================================*\
Expand Down Expand Up @@ -730,3 +734,5 @@ static int mime_global_dot(lua_State *L)


} // end NS_SLUA

#pragma clang diagnostic pop
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
#define MAX(x, y) ((x) > (y) ? x : y)
#endif

#ifdef _WIN32
#define gai_strerror gai_strerrorA
#endif

namespace NS_SLUA {

/*=========================================================================*\
Expand Down Expand Up @@ -180,7 +184,7 @@ static int udp_meth_sendto(lua_State *L) {
err = getaddrinfo(ip, port, &aihint, &ai);
if (err) {
lua_pushnil(L);
lua_pushstring(L, gai_strerrorA(err));
lua_pushstring(L, gai_strerror(err));
return 2;
}
timeout_markstart(tm);
Expand Down Expand Up @@ -250,7 +254,7 @@ static int udp_meth_receivefrom(lua_State *L)
INET6_ADDRSTRLEN, portstr, 6, NI_NUMERICHOST | NI_NUMERICSERV);
if (err) {
lua_pushnil(L);
lua_pushstring(L, gai_strerrorA(err));
lua_pushstring(L, gai_strerror(err));
return 2;
}
lua_pushlstring(L, buffer, got);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
/*=========================================================================*\
* WinSock include files
\*=========================================================================*/
#ifdef _WIN32
#include <winsock2.h>
#include <ws2tcpip.h>

Expand All @@ -33,5 +34,5 @@ typedef t_socket *p_socket;
#endif

} // end NS_SLUA

#endif
#endif /* WSOCKET_H */
2 changes: 1 addition & 1 deletion Plugins/slua_unreal/Source/slua_unreal/Public/LuaMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ namespace slua {

private:
FScriptMap map;
FScriptMapHelper helper;
UProperty* keyProp;
UProperty* valueProp;
FScriptMapHelper helper;
bool createdByBp;

static int setupMT(lua_State* L);
Expand Down

0 comments on commit e5cbc3e

Please sign in to comment.