Commit graph

7 commits

Author SHA1 Message Date
Sutou Kouhei
5a07f531e5 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.
2020-07-10 16:12:55 +09:00
E. Westbrook
ab3b0ef5c9 rockspec/luasocket-scm-2.rockspec 2019-04-21 09:41:17 -06:00
E. Westbrook
9acb6dc81a move SCM rockspec to rockspec folder; rename consistent with luarocks repository 2019-04-21 09:31:08 -06:00
E. Westbrook
3a37ab8890 rockspecs: unix += compat 2019-03-10 00:04:20 -07:00
E. Westbrook
33883e78c8 rockspecs: serial += compat 2019-03-10 00:04:20 -07:00
E. Westbrook
e2e43d62fa rockspecs: remove visibility and dllexport defines in favor of in-source labeling 2019-02-25 16:07:36 -07:00
Alex R
3abd1f2dd0 Added future release rockspec file 2016-06-15 15:27:07 -07:00