Remove LUASOCKET_INET_PTON from *.rockspec

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.
78a1657c7d (#300) removed
-DLUASOCKET_INET_PTON but LUASOCKET_INET_PTON in *.rockspec wasn't
removed.

It causes "luarocks install luasocket" for MinGW causes the above
build error.
This commit is contained in:
Sutou Kouhei 2020-07-10 16:10:58 +09:00
parent 5b18e475f3
commit 5a07f531e5
2 changed files with 0 additions and 2 deletions

View file

@ -34,7 +34,6 @@ local function make_plat(plat)
},
mingw32 = {
"LUASOCKET_DEBUG",
"LUASOCKET_INET_PTON",
"WINVER=0x0501"
}
}

View file

@ -34,7 +34,6 @@ local function make_plat(plat)
},
mingw32 = {
"LUASOCKET_DEBUG",
"LUASOCKET_INET_PTON",
"WINVER=0x0501"
}
}