Network support for the Lua language
Recent MinGW provides inet_pton(). There is our inet_pton()
implementation in src/inet.c. Our inet_pton() is declared in
src/inet.h but the declaration causes the following build error:
gcc -O2 -fPIC -c -o src/luasocket.o -IC://msys64/mingw64/include/luajit-2.0 src/luasocket.c -DLUA_COMPAT_APIINTCASTS -DLUASOCKET_DEBUG -DLUASOCKET_INET_PTON -DWINVER=0x0501 -DLUASOCKET_API=__declspec(dllexport) -DMIME_API=__declspec(dllexport)
src/inet.h:46:13: error: conflicting types for 'inet_ntop'
46 | const char *inet_ntop(int af, const void *src, char *dst, socklen_t cnt);
| ^~~~~~~~~
In file included from src/wsocket.h:12,
from src/socket.h:18,
from src/inet.h:18,
from src/luasocket.c:30:
C:/msys64/mingw64/x86_64-w64-mingw32/include/ws2tcpip.h:451:35: note: previous declaration of 'inet_ntop' was
here
451 | WINSOCK_API_LINKAGE LPCSTR WSAAPI InetNtopA(INT Family, LPCVOID pAddr, LPSTR pStringBuf, size_t StringBufSize);
| ^~~~~~~~~
In file included from src/luasocket.c:30:
src/inet.h:47:5: warning: 'inet_pton' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
47 | int inet_pton(int af, const char *src, void *dst);
| ^~~~~~~~~
We already know that we don't need our inet_pton() for recent MinGW.
|
||
---|---|---|
doc | ||
etc | ||
gem | ||
rockspec | ||
samples | ||
src | ||
test | ||
.gitignore | ||
.travis.yml | ||
FIX | ||
LICENSE | ||
linux.cmd | ||
logo.ps | ||
ltn012.wiki | ||
ltn013.wiki | ||
Lua.props | ||
luasocket.sln | ||
macosx.cmd | ||
makefile | ||
makefile.dist | ||
mime.vcxproj | ||
mingw.cmd | ||
NEW | ||
README | ||
socket.vcxproj | ||
TODO | ||
vc32.bat | ||
vc64.bat | ||
win32.cmd | ||
win64.cmd | ||
WISH |
This is the LuaSocket 3.0-rc1. It has been tested on Windows 7, Mac OS X, and Linux. Please use the project page at GitHub https://github.com/diegonehab/luasocket to file bug reports or propose changes. Have fun, Diego Nehab.